On 07/11/2014 08:01 AM, Don Brown wrote: > Hello > > We are writing a small application and we are trying to determine if > PostgreSQL is the right database for us. > > The application at this stage is only for a single user and commonly for > persons with little computer expertise. > > When the database is installed a postgreSQL user account is created > which in most cases will be the second user account on the PC. The > result of this is the user now has to select the user account when ever > the computer is restarted. You must be using a very old installer. PostgreSQL switched to NETWORKSERVICE with the 9.2 installers. I also think that the login rights flag (that caused the account to show up as available for a user to log into) was fixed way before that, but I'm less sure about that. > The programmer working on this application has suggested looking at an > imbedded database, something like H2 as an alternative. H2 or SQLite can be very reasonable choices for in-app embedded databases, so long as your app can operate within their constraints on concurrency and data size. If you want to use PostgreSQL you should: * Use the current version and plan for upgrades * Bundle the .zip of the binaries in your installer rather than using the PostgreSQL installer * `initdb` a new data dir just for your app, in %PROGRAMDATA% * `pg_ctl register` a service under NETWORKSERVICE, or `pg_ctl` start and `pg_ctl stop` PostgreSQL on demand from the app * Run PostgreSQL on a non-default port. This is important. Please do not use port 5432 for embedded PostgreSQL installs. It'll confuse users if they later go to install PostgreSQL themselves. Also, please do not have your installer add the PostgreSQL binaries to the system or user PATH environment variables. Put them in the same directory as your application binaries, or use a relative path to them from your application. Remember to plan for upgrades. Your app should be able to do an upgrade of their PostgreSQL install when it's updated, either using pg_dump and pg_restore, or by using pg_upgrade after performing a backup. Don't get stuck on some ancient version because you didn't consider upgrades. (Perhaps we should add a section on this to the documentation?) -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services