Re: [GENERAL] Relative path specified for data_directory is not working as expected
On Fri, Jun 24, 2011 at 09:42, Rob Sargent robjsarg...@gmail.com wrote: Can't the service script be something like cd d:/me/data/PostgreSQL; ./pg_ctl.exe runservice -N pgsql -D d:/me/etc/PostgreSQL Don't know about that, the service was installed by pg_ctl. Still, if two relative paths are based on one folder and the other relative path is based on another folder, I can call it a bug (or an undocumented feature). Have a nice day, Eduard -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Relative path specified for data_directory is not working as expected
Eduard-Cristian Stefan wrote: I have PostgreSQL 9.0.4-1 running as a service on Windows XP Home Edition, with the command line of the service being: D:\me\usr\PostgreSQL\bin/pg_ctl.exe runservice -N pgsql -D d:/me/etc/PostgreSQL In the postgresql.conf file I have the following settings: data_directory = '../../data/PostgreSQL' external_pid_file = '../../var/run/PostgreSQL.pid' log_directory = '../../var/log/PostgreSQL' In this configuration the PostgreSQL service fails to start with the message: FATAL: data directory C:/WINDOWS/system32/../../data/PostgreSQL does not exist If using an absolute path for data_directory like this: data_directory = 'd:/me/data/PostgreSQL' then the service starts ok, with the curent directory of pg_ctl.exe being C:\WINDOWS\system32\, while the pid file and the logs are set to the desired location. I can confirm this behavior by running postgres.exe from the console, and for relative paths the data_directory is relative to the current folder from where postgres.exe is launched, and both external_pid_file and log_directory are relative to the directory specified with the -D option of the command line. For the record, there is no PGDATA environment variable defined. Have a nice day, Eduard Can't the service script be something like cd d:/me/data/PostgreSQL; ./pg_ctl.exe runservice -N pgsql -D d:/me/etc/PostgreSQL -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Relative path specified for data_directory is not working as expected
I have PostgreSQL 9.0.4-1 running as a service on Windows XP Home Edition, with the command line of the service being: D:\me\usr\PostgreSQL\bin/pg_ctl.exe runservice -N pgsql -D d:/me/etc/PostgreSQL In the postgresql.conf file I have the following settings: data_directory = '../../data/PostgreSQL' external_pid_file = '../../var/run/PostgreSQL.pid' log_directory = '../../var/log/PostgreSQL' In this configuration the PostgreSQL service fails to start with the message: FATAL: data directory C:/WINDOWS/system32/../../data/PostgreSQL does not exist If using an absolute path for data_directory like this: data_directory = 'd:/me/data/PostgreSQL' then the service starts ok, with the curent directory of pg_ctl.exe being C:\WINDOWS\system32\, while the pid file and the logs are set to the desired location. I can confirm this behavior by running postgres.exe from the console, and for relative paths the data_directory is relative to the current folder from where postgres.exe is launched, and both external_pid_file and log_directory are relative to the directory specified with the -D option of the command line. For the record, there is no PGDATA environment variable defined. Have a nice day, Eduard -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Relative path specified for data_directory is not working as expected
On 06/23/2011 11:08 AM, Eduard-Cristian Stefan wrote: D:\me\usr\PostgreSQL\bin/pg_ctl.exe runservice -N pgsql -D d:/me/etc/PostgreSQL not very familiar with the windows version, but I think -D is supposed to point to the data directory which in your later info is listed as data_directory = 'd:/me/data/PostgreSQL' -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Relative path specified for data_directory is not working as expected
On 2011-06-23 19:15, Reid Thompson wrote: On 06/23/2011 11:08 AM, Eduard-Cristian Stefan wrote: D:\me\usr\PostgreSQL\bin/pg_ctl.exe runservice -N pgsql -D d:/me/etc/PostgreSQL not very familiar with the windows version, but I think -D is supposed to point to the data directory which in your later info is listed as data_directory = 'd:/me/data/PostgreSQL' I was following the documentation: If you wish to keep the configuration files elsewhere than the data directory, the postgres -D command-line option or PGDATA environment variable must point to the directory containing the configuration files, and the data_directory parameter must be set in postgresql.conf (or on the command line) to show where the data directory is actually located. Notice that data_directory overrides -D and PGDATA for the location of the data directory, but not for the location of the configuration files. Have a nice day, Eduard -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Relative path specified for data_directory is not working as expected
I have PostgreSQL 9.0.4-1 running as a service on Windows XP Home Edition, with the command line of the service being: D:\me\usr\PostgreSQL\bin/pg_ctl.exe runservice -N pgsql -D d:/me/etc/PostgreSQL In the postgresql.conf file I have the following settings: data_directory = '../../data/PostgreSQL' external_pid_file = '../../var/run/PostgreSQL.pid' log_directory = '../../var/log/PostgreSQL' In this configuration the PostgreSQL service fails to start with the message: FATAL: data directory C:/WINDOWS/system32/../../data/PostgreSQL does not exist If using an absolute path for data_directory like this: data_directory = 'd:/me/data/PostgreSQL' then the service starts ok, with the curent directory of pg_ctl.exe being C:\WINDOWS\system32\, while the pid file and the logs are set to the desired location. I can confirm this behavior by running postgres.exe from the console, and for relative paths the data_directory is relative to the current folder from where postgres.exe is launched, and both external_pid_file and log_directory are relative to the directory specified with the -D option of the command line. For the record, there is no PGDATA environment variable defined. Have a nice day, Eduard -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general