1

I am trying to do a local installation of a large but simple installation PostgreSQL 9.3.2 to hold about 14 GB of data, currently in a CSV file. This is my first attempt to install any database other than SQLite. The installer is asking me questions that I do not know how to answer and that seem inappropriate for an installation that I do not want to make available to the internet. I expect to be interacting with it through the R package RPostgreSQL. The database will contain primarily US Census data that is publicly available for free, and so not a tempting target. For instance, the installer asks me what port to use, and seems to require that I set a password. I prefer to set it up with no internet or remote accessibility at all, even from me.

Could someone tell me or point me toward documentation for producing a strictly local installation with minimal irrelevant hoops to jump through, both on installation and on use? I did a series of searches on variant of PostgreSQL & “install locally” or “local installation” or “create local database”, etc. but these were unproductive.

This will be on an ancient but lightly rebuilt Compaq laptop, Intel Core 2 Duo, Windows XP OS with SP3.

Any help folks could offer much appreciated.

Milen A. Radev
  • 60,241
  • 22
  • 105
  • 110
andrewH
  • 2,281
  • 2
  • 22
  • 32
  • "The installer". Which installer, exactly, do you mean? There are (perhaps unfortunately) multiple different distributions of PostgreSQL. – Craig Ringer Feb 03 '14 at 02:57
  • The version 9.3.2 installer for Windows 32-bit from this page: http://www.enterprisedb.com/products-services-training/pgdownload#windows – andrewH Feb 04 '14 at 02:25
  • OK, and what exactly are your requirements for a "strictly local installation"? What does that mean to you? Keep in mind that PostgreSQL is a client/server database that communicates over TCP/IP (or unix sockets, but obviously not on Windows), so it *must* run a server, listen on a port, etc. – Craig Ringer Feb 04 '14 at 02:50
  • Ah! In that case my question makes less sense. I was hoping to do a simplified installation by not setting up that sort of capacity, but if that is the default or exclusive communications medium for which the DB is designed, then to do so would complicate things rather than simplifying them, if it is even possible at all. – andrewH Feb 05 '14 at 02:28
  • If you would like to frame your question along the lines of an answer (e.g. "You can't.") I would accept that. Thanks! I am still having some installation problems, but I am now attributing them to Windows access control/permissions rather than faulty communications settings. – andrewH Feb 05 '14 at 02:43

1 Answers1

1

If you're looking for an install that doesn't run a server and listen on TCP/IP, it isn't really possible, because PostgreSQL is a client/server database that (on Windows) communicates with clients solely over TCP/IP.

A "local only" install is one where the TCP/IP socket listens only on localhost, i.e. 127.0.0.1.

If you were really keen, you could not install the Windows service for the server at all, and just grab the binaries. To use PostgreSQL you would then have to initdb a new database directory, and start PostgreSQL when you wanted it with pg_ctl. See the user manual for details on these commands. When running, PostgreSQL would still be a server listening on a TCP/IP port, there's just no way around that on Windows.

On UNIX systems PostgreSQL can listen on a unix socket (a bit like a windows named pipe). This is not supported by PostgreSQL on Windows. Even then, it still has to run a server.

If you're looking for something like an embedded, on-demand, or in-memory PostgreSQL that runs out of the client library, there is no such thing.

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778