Обсуждение: pg_ctl bug or feature?

Поиск
Список
Период
Сортировка

pg_ctl bug or feature?

От
"Joshua D. Drake"
Дата:
PostgreSQL 8.0.2 - Fedora 3


data_directory = '/usr/local/pgsql/data2'               # use data in
hba_file = '/usr/local/pgsql/etc/pg_hba.conf'   # the host-based #
ident_file = 'ConfigDir/pg_ident.conf'  # the IDENT configuration file
external_pid_file = '/tmp/foo.pid'              # write an extra pid

as postgres:

-bash-3.00$ bin/pg_ctl -D /usr/local/pgsql/etc start
postmaster starting
-bash-3.00$ LOG:  could not open Ident usermap file
"/usr/local/pgsql/etc/pg_ident.conf": No such file or directory
LOG:  database system was shut down at 2005-05-06 13:11:18 PDT
LOG:  checkpoint record is at 0/A32B20
LOG:  redo record is at 0/A32B20; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 544; next OID: 17230
LOG:  database system is ready

-bash-3.00$ bin/pg_ctl -D /usr/local/pgsql/etc stop
pg_ctl: PID file "/usr/local/pgsql/etc/postmaster.pid" does not exist
Is postmaster running?
-bash-3.00$

Seems inconsistent? If I can start from etc... I should be able to stop
from it as well.

Sincerely,

Joshua D. Drake
Command Prompt, Inc.




--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

Re: pg_ctl bug or feature?

От
Jonel Rienton
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

your data directory points to /usr/local/pgsql/data2 and you've
started it with -D /usr/local/pgsql/etc

might be something to look at


regards,

- -----
Jonel Rienton
http://homepage.mac.com/jrienton
Software Developer, *nix Advocate

On May 6, 2005, at 3:12 PM, Joshua D. Drake wrote:

> PostgreSQL 8.0.2 - Fedora 3
>
>
> data_directory = '/usr/local/pgsql/data2'               # use data in
> hba_file = '/usr/local/pgsql/etc/pg_hba.conf'   # the host-based #
> ident_file = 'ConfigDir/pg_ident.conf'  # the IDENT configuration file
> external_pid_file = '/tmp/foo.pid'              # write an extra pid
>
> as postgres:
>
> -bash-3.00$ bin/pg_ctl -D /usr/local/pgsql/etc start
> postmaster starting
> -bash-3.00$ LOG:  could not open Ident usermap file "/usr/local/
> pgsql/etc/pg_ident.conf": No such file or directory
> LOG:  database system was shut down at 2005-05-06 13:11:18 PDT
> LOG:  checkpoint record is at 0/A32B20
> LOG:  redo record is at 0/A32B20; undo record is at 0/0; shutdown TRUE
> LOG:  next transaction ID: 544; next OID: 17230
> LOG:  database system is ready
>
> -bash-3.00$ bin/pg_ctl -D /usr/local/pgsql/etc stop
> pg_ctl: PID file "/usr/local/pgsql/etc/postmaster.pid" does not exist
> Is postmaster running?
> -bash-3.00$
>
> Seems inconsistent? If I can start from etc... I should be able to
> stop from it as well.
>
> Sincerely,
>
> Joshua D. Drake
> Command Prompt, Inc.
>
>
>
>
> --
> Your PostgreSQL solutions company - Command Prompt, Inc.
> 1.800.492.2240
> PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
> Managed Services, Shared and Dedication Hosting
> Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>
>


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.0 (Build 2001)

iQA/AwUBQnvUvuAwOVAnbsGCEQKVdgCfdbMaua/yiVNWPorQYx/f1XoKSqwAniuh
V3JsHJvl+QsqT/h+yAsBK+pb
=Ms3D
-----END PGP SIGNATURE-----

Re: pg_ctl bug or feature?

От
"Joshua D. Drake"
Дата:
Jonel Rienton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> your data directory points to /usr/local/pgsql/data2 and you've
> started it with -D /usr/local/pgsql/etc
>
> might be something to look at

In version 8 you can specify the location of the data_directory with the
data_directory option in the postgresql.conf file. The postgresql.conf
is located in /usr/local/pgsql/etc.

Sincerely,

Jsohua D. Drake
--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

Re: pg_ctl bug or feature?

От
Tom Lane
Дата:
"Joshua D. Drake" <jd@commandprompt.com> writes:
> data_directory = '/usr/local/pgsql/data2'               # use data in

> -bash-3.00$ bin/pg_ctl -D /usr/local/pgsql/etc stop

Fixing this would seem to require teaching pg_ctl how to parse the
postgresql.conf file, which might be worth doing but it's a bit of
a large pain in the neck compared to the benefit ...

(For the record, I never did like the file-location-configuration
patch, and one of the reasons is the havoc it plays with the apparently
simple meaning of the -D switch.)

            regards, tom lane

Re: pg_ctl bug or feature?

От
Jonel Rienton
Дата:
I just tried the same setup as yours, and it worked fine, i was able
to start and stop the instance.

could it be that the process didn't start at all when you started it?


regards,

-----
Jonel Rienton
http://homepage.mac.com/jrienton
Software Developer, *nix Advocate

On May 6, 2005, at 3:36 PM, Joshua D. Drake wrote:

> Jonel Rienton wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> your data directory points to /usr/local/pgsql/data2 and you've
>> started it with -D /usr/local/pgsql/etc
>> might be something to look at
>>
>
> In version 8 you can specify the location of the data_directory
> with the data_directory option in the postgresql.conf file. The
> postgresql.conf is located in /usr/local/pgsql/etc.
>
> Sincerely,
>
> Jsohua D. Drake
> --
> Your PostgreSQL solutions company - Command Prompt, Inc.
> 1.800.492.2240
> PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
> Managed Services, Shared and Dedication Hosting
> Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
>
>
>


Re: pg_ctl bug or feature?

От
Jonel Rienton
Дата:
you know what does work, if you issue the pg_ctl stop with /usr/local/
pgsql/data2 as the argument for -D

pg_ctl -D /usr/local/pgsql/data2 stop

odd tho.


On May 6, 2005, at 3:36 PM, Joshua D. Drake wrote:

> Jonel Rienton wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> your data directory points to /usr/local/pgsql/data2 and you've
>> started it with -D /usr/local/pgsql/etc
>> might be something to look at
>>
>
> In version 8 you can specify the location of the data_directory
> with the data_directory option in the postgresql.conf file. The
> postgresql.conf is located in /usr/local/pgsql/etc.
>
> Sincerely,
>
> Jsohua D. Drake
> --
> Your PostgreSQL solutions company - Command Prompt, Inc.
> 1.800.492.2240
> PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
> Managed Services, Shared and Dedication Hosting
> Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq
>
>
>


Re: pg_ctl bug or feature?

От
"Joshua D. Drake"
Дата:
Jonel Rienton wrote:
> you know what does work, if you issue the pg_ctl stop with /usr/local/
> pgsql/data2 as the argument for -D
>
> pg_ctl -D /usr/local/pgsql/data2 stop

Yes that does work as it should. However as Tom Lane pointed out the
problem is that pg_ctl can't parse the postgresql.conf so if you use the
/usr/local/pgsql/etc it doesn't work for stop.

I have no idea why it works for start though.

Sincerely,

Joshua D. Drake


>
> odd tho.
>
>
> On May 6, 2005, at 3:36 PM, Joshua D. Drake wrote:
>
>> Jonel Rienton wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>> your data directory points to /usr/local/pgsql/data2 and you've
>>> started it with -D /usr/local/pgsql/etc
>>> might be something to look at
>>>
>>
>> In version 8 you can specify the location of the data_directory  with
>> the data_directory option in the postgresql.conf file. The
>> postgresql.conf is located in /usr/local/pgsql/etc.
>>
>> Sincerely,
>>
>> Jsohua D. Drake
>> --
>> Your PostgreSQL solutions company - Command Prompt, Inc.  1.800.492.2240
>> PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
>> Managed Services, Shared and Dedication Hosting
>> Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
>>
>> ---------------------------(end of  broadcast)---------------------------
>> TIP 5: Have you checked our extensive FAQ?
>>
>>               http://www.postgresql.org/docs/faq
>>
>>
>>


--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/