Search Postgresql Archives

Re: Some suggestions for the non Linux installers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 9, 2009 at 6:02 PM, Thomas Kellerer <spam_eater@xxxxxxx> wrote:
> Hi,
>
> I have been actively recommending Postgres in my company but had now three
> people coming back to me because they couldn't manage to install Postgres on
> Windows or MacOS.
>
> The common sympton is always that the installer (the PG installer as well as
> the EnterpriseDB installers) suggests to place the datadir into the same
> directory as the Postgres binaries (the default for Windows is c:\Program
> Files\Postgres\8.3\data).
>
> Now when doing this on Windows this is *bound* to fail because the "Program
> Files" are usually not writeable for non-admin users. The directory is
> created during installation by the user running the installation (which is
> usually an admin user). The PG service runs under a regular user account and
> thus fails to write to the data directory. The sympton is that the service
> simply fails, but you can't see any errors because PG can't write to the log
> file as well.

It's not bound to fail because part of the installation process is to
grant the require permissions on whatever directory is chosen for the
data. In the case of the one-click installers, this is tested
extensively before every release on a range of clean and dirty virtual
machines including XP, Vista, 2K3 and 2K8, and on the Mac on Leopard,
Tiger and Leopard Server.

Given that, and the thousands of downloads per week we get without
problems being reported, I suspect if you are seeing multiple failures
then it is likely a side effect of a local security policy or similar.
If you can supply an installation log that would help diagnose the
problem.

> I have never used a Mac but from the description of two of my co-workers it
> seems that under MacOS the same is happening.

Unlikely to be the same as the installation process is quite different.

> I would suggest that the installers (PGinstaller _and_ EnterpriseDB) are
> changed so that the default for the data directory is /outside/ the Postgres
> installation path.
>
> If it's hard to find a good default for the datadir I suggest to leave it
> completely empty and actively ask the user to specify a directory and give a
> big hint that this directory must be writeable for the postgres user
> account.

In the majority of installations the postgres account is created by
the installer so it's not feasible to grant the permissions in
advance.

> Additionally when creating the data dir from within the installer, it should
> set the permissions of that directory to make sure the postgres user can
> really write to it.

As I said above, they all do. I can point you at the code if you're interested.

> After all the installer is the first impression a new user gets, and if it's
> too complicated he might not even take a second look.
>
> The installer(s) should also ask some question for the default configuration
> so that pg_hba.conf and postgres.conf can be pre-configured to e.g. accept
> connections from other computers. A simple checkbox during the installation
> wizard would be enough for this, which would then adjust listen_address in
> postgresql.conf and the host entries in pg_hba.conf

Well, we intentionally don't do that in the one-click installers for
precisely the reason you give above! pgInstaller on Windows does have
an option to enable listenaddresses = * though - we recommend that for
advanced users that want the extra flexibility.

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux