Thread: Strange behaviour with Xfs filesystem and unix_socket_directory
We configured the unix_socket_directory in postgresql.conf to point to a folder in a xfs filesystem. The problem is that pg_ctl tries to start the daemon but after 1 minute it gives up with the following message: could not start postmaster. The strange thing is that the postmaster is there, up and alive... Moreover this does not happen with other filesystems... Any idea? We're running 8.1.9 on Linux Ubuntu with kernel 2.6.17-11 and xfs progs 2.8.10-1 Thank you in advance for your help, Denis
Denis Gasparin <denis@edistar.com> writes: > We configured the unix_socket_directory in postgresql.conf to point to a > folder in a xfs filesystem. I don't think pg_ctl can deal with nondefault settings of unix_socket_directory, because it does not make any attempt to parse the postmaster's postgresql.conf file. So it's still trying to contact the postmaster in /tmp, and of course not seeing any evidence the postmaster is up. You'll find that most other clients fail similarly. You might be able to make it work if you set PGHOST to the socket directory before running pg_ctl (and other clients). But I think if you really want this, you would be best advised to alter the default socket directory at build time, instead (see DEFAULT_PGSOCKET_DIR in pg_config_manual.h). regards, tom lane
Setting PGHOST solved the problem!
It was not clear to me that pg_ctl is actually a client and it doesn't read the configuration from postgresql.conf
Thank you,
Denis
Tom Lane ha scritto:
Denis Gasparin <denis@edistar.com> writes:We configured the unix_socket_directory in postgresql.conf to point to a folder in a xfs filesystem.I don't think pg_ctl can deal with nondefault settings of unix_socket_directory, because it does not make any attempt to parse the postmaster's postgresql.conf file. So it's still trying to contact the postmaster in /tmp, and of course not seeing any evidence the postmaster is up. You'll find that most other clients fail similarly. You might be able to make it work if you set PGHOST to the socket directory before running pg_ctl (and other clients). But I think if you really want this, you would be best advised to alter the default socket directory at build time, instead (see DEFAULT_PGSOCKET_DIR in pg_config_manual.h). regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly