Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-06 Thread Bruce Momjian
Bruce Momjian wrote: Bruce Momjian wrote: Bruce Momjian wrote: Robert Haas wrote: On Mon, Oct 3, 2011 at 11:04 PM, Bruce Momjian br...@momjian.us wrote: OK, here is a patch that adds a -C option to the postmaster so any config variable can be dumped, even while the server is

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Peter Eisentraut
On tis, 2011-10-04 at 17:49 -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Greg Stark wrote: An interactive tool can dwim automatically but that isn't appropriate for a startup script. A startupt script should always do the same thing exactly and do that based on the OS

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Peter Eisentraut
On mån, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people not using pg_ctl? Actually, a slight correction/addition here: The Debian init script does use pg_ctl to start the service. Seems to work fine. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Robert Haas
On Tue, Oct 4, 2011 at 8:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: I still think this is a matter for HEAD only.  We haven't supported these cases in back branches and so there is little argument for back-patching. According to Bruce's original post, there is at least one 9.1 regression here

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Tom Lane wrote: As of fairly recently, the Fedora package also uses pg_ctl for both starting and stopping. We've fixed all the reasons that formerly existed to avoid use of pg_ctl, and it's a real PITA to try to implement the

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Bruce Momjian
Peter Eisentraut wrote: On m?n, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people not using pg_ctl? Actually, a slight correction/addition here: The Debian init script does use pg_ctl to start the service. Seems to work fine. Yes. The script authors discovered a working

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On tis, 2011-10-04 at 17:49 -0400, Tom Lane wrote: As of fairly recently, the Fedora package also uses pg_ctl for both starting and stopping. We've fixed all the reasons that formerly existed to avoid use of pg_ctl, and it's a real PITA to try to

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Bruce Momjian
Robert Haas wrote: On Tue, Oct 4, 2011 at 8:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: I still think this is a matter for HEAD only. ?We haven't supported these cases in back branches and so there is little argument for back-patching. According to Bruce's original post, there is at least

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Bruce Momjian
Bruce Momjian wrote: Robert Haas wrote: On Mon, Oct 3, 2011 at 11:04 PM, Bruce Momjian br...@momjian.us wrote: OK, here is a patch that adds a -C option to the postmaster so any config variable can be dumped, even while the server is running (there is no security check because we don't

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Bruce Momjian
Bruce Momjian wrote: Bruce Momjian wrote: Robert Haas wrote: On Mon, Oct 3, 2011 at 11:04 PM, Bruce Momjian br...@momjian.us wrote: OK, here is a patch that adds a -C option to the postmaster so any config variable can be dumped, even while the server is running (there is no

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Mr. Aaron W. Swenson
On Wed, Oct 05, 2011 at 10:44:38AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: On m?n, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people not using pg_ctl? Actually, a slight correction/addition here: The Debian init script does use pg_ctl to start the service.

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Bruce Momjian
Mr. Aaron W. Swenson wrote: -- Start of PGP signed section. On Wed, Oct 05, 2011 at 10:44:38AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: On m?n, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people not using pg_ctl? Actually, a slight correction/addition here:

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Mr. Aaron W. Swenson
On Wed, Oct 05, 2011 at 07:20:16PM -0400, Bruce Momjian wrote: Mr. Aaron W. Swenson wrote: -- Start of PGP signed section. On Wed, Oct 05, 2011 at 10:44:38AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: On m?n, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Bruce Momjian
Mr. Aaron W. Swenson wrote: With the patch I am going to commit, you will not need to use one of the -D flags because pg_ctl will find the data directory location; you will just specify the config-only directory with one -D, and the --data-directory. So, you're saying that my passing

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-05 Thread Mr. Aaron W. Swenson
On Wed, Oct 05, 2011 at 07:59:07PM -0400, Bruce Momjian wrote: Mr. Aaron W. Swenson wrote: With the patch I am going to commit, you will not need to use one of the -D flags because pg_ctl will find the data directory location; you will just specify the config-only directory with one -D,

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Peter Eisentraut
On mån, 2011-10-03 at 17:12 -0400, Andrew Dunstan wrote: On 10/03/2011 04:41 PM, Peter Eisentraut wrote: On mån, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people not using pg_ctl? Because of the limitations which were fixed in PG 9.1? As Dave already said, windows already

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Peter Eisentraut
On mån, 2011-10-03 at 18:44 -0400, Bruce Momjian wrote: Agreed. You could argue that pg_ctl 9.1 is much better than anything anyone would be able to craft in a script. And what facts support that argument? Anyway, this comes back to your favorite argument upthread. pg_ctl has had occasional

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Robert Haas
On Mon, Oct 3, 2011 at 11:04 PM, Bruce Momjian br...@momjian.us wrote: OK, here is a patch that adds a -C option to the postmaster so any config variable can be dumped, even while the server is running (there is no security check because we don't have a user name at this point), e.g.:        

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Bruce Momjian
Peter Eisentraut wrote: On m?n, 2011-10-03 at 18:44 -0400, Bruce Momjian wrote: Agreed. You could argue that pg_ctl 9.1 is much better than anything anyone would be able to craft in a script. And what facts support that argument? Because pg_ctl 9.1 will read postmaster.pid and find the

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Greg Stark
On Tue, Oct 4, 2011 at 2:42 PM, Bruce Momjian br...@momjian.us wrote: Because pg_ctl 9.1 will read postmaster.pid and find the port number, socket location, and listen host for wait mode --- I doubt someone would do that work in a script. But this is the whole difference between them. An

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Bruce Momjian
Robert Haas wrote: On Mon, Oct 3, 2011 at 11:04 PM, Bruce Momjian br...@momjian.us wrote: OK, here is a patch that adds a -C option to the postmaster so any config variable can be dumped, even while the server is running (there is no security check because we don't have a user name at this

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Robert Haas
On Tue, Oct 4, 2011 at 10:55 AM, Bruce Momjian br...@momjian.us wrote: It seems both ugly and unnecessary to declare dump_config_variable as char[MAXPGPATH].  MAXPGPATH doesn't seem like the right length for a buffer intended to hold a GUC name, but in fact I don't think you need a buffer at

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Bruce Momjian
Robert Haas wrote: On Tue, Oct 4, 2011 at 10:55 AM, Bruce Momjian br...@momjian.us wrote: It seems both ugly and unnecessary to declare dump_config_variable as char[MAXPGPATH]. ?MAXPGPATH doesn't seem like the right length for a buffer intended to hold a GUC name, but in fact I don't think

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread jreidthompson
. Alvaro Herrera-7 wrote: I dunno what about Gentoo. - some info about gentoo http://pastebin.com/9hbLmVJA http://www.gentoo.org/doc/en/postgres-howto.xml -- View this message in context:

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Mr. Aaron W. Swenson
On Tue, Oct 04, 2011 at 09:42:42AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: On m?n, 2011-10-03 at 18:44 -0400, Bruce Momjian wrote: Agreed. You could argue that pg_ctl 9.1 is much better than anything anyone would be able to craft in a script. And what facts support that

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Mr. Aaron W. Swenson
On Mon, Oct 03, 2011 at 04:49:21PM -0300, Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 16:09:08 -0300 2011: Yes, auto-creation of symlinks would be useful, but at that point pg_ctl and pg_upgrade would have to use the real data directory, so I again wonder

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Bruce Momjian
Greg Stark wrote: On Tue, Oct 4, 2011 at 2:42 PM, Bruce Momjian br...@momjian.us wrote: Because pg_ctl 9.1 will read postmaster.pid and find the port number, socket location, and listen host for wait mode --- I doubt someone would do that work in a script. But this is the whole

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Greg Stark wrote: An interactive tool can dwim automatically but that isn't appropriate for a startup script. A startupt script should always do the same thing exactly and do that based on the OS policy, not based on inspecting what programs are actually

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Greg Stark wrote: An interactive tool can dwim automatically but that isn't appropriate for a startup script. A startupt script should always do the same thing exactly and do that based on the OS policy, not based on inspecting what

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-04 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Tom Lane wrote: As of fairly recently, the Fedora package also uses pg_ctl for both starting and stopping. We've fixed all the reasons that formerly existed to avoid use of pg_ctl, and it's a real PITA to try to implement the waiting logic at shell

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Fujii Masao wrote: On Sun, Oct 2, 2011 at 7:54 AM, Bruce Momjian br...@momjian.us wrote: What exactly is your question? ?You are not using a config-only directory but the real data directory, so it should work fine. No. He is using PGDATA (= /etc/postgresql-9.0) as a config-only

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I am starting to question the value of config-only directories if pg_ctl stop doesn't work, or you have to specify a different directory for start and stop. Yup. Did we not think of these things when we designed config-only directories? I don't even

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Alvaro Herrera
Excerpts from Tom Lane's message of lun oct 03 12:34:22 -0300 2011: Bruce Momjian br...@momjian.us writes: I am starting to question the value of config-only directories if pg_ctl stop doesn't work, or you have to specify a different directory for start and stop. Yup. Did we not

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Tom Lane's message of lun oct 03 12:34:22 -0300 2011: Bruce Momjian br...@momjian.us writes: I am starting to question the value of config-only directories if pg_ctl stop doesn't work, or you have to specify a different directory for start and

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Config-only directories seem to be only adding confusion. All possible solutions seem to be adding more code and user requirements, which the creation of symlinks avoids. Is it time for me to ask on 'general' if removal of this feature is warranted?

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Peter Eisentraut
On mån, 2011-10-03 at 11:27 -0400, Bruce Momjian wrote: Frankly, I am confused how this breakage has gone unreported for so long. Well, nobody is required to use pg_ctl, and for the longest time, it was pg_ctl that was considered to be broken (for various other reasons) and avoided in packaged

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Dave Page
On Mon, Oct 3, 2011 at 7:07 PM, Peter Eisentraut pete...@gmx.net wrote: On mån, 2011-10-03 at 11:27 -0400, Bruce Momjian wrote: Frankly, I am confused how this breakage has gone unreported for so long. Well, nobody is required to use pg_ctl, You are if you wish to run as a service on

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Andrew Dunstan
On 10/03/2011 12:54 PM, Tom Lane wrote: I was never exactly thrilled with the separate-config-directory design to start with, so I'm probably not the person to opine on whether we could get away with removing it. The horse has well and truly bolted. We'd have a

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Andrew Dunstan wrote: On 10/03/2011 12:54 PM, Tom Lane wrote: I was never exactly thrilled with the separate-config-directory design to start with, so I'm probably not the person to opine on whether we could get away with removing it. The horse has well and

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Config-only directories seem to be only adding confusion. All possible solutions seem to be adding more code and user requirements, which the creation of symlinks avoids. Is it time for me to ask on 'general' if removal of this

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Andrew Dunstan
On 10/03/2011 02:15 PM, Bruce Momjian wrote: Andrew Dunstan wrote: On 10/03/2011 12:54 PM, Tom Lane wrote: I was never exactly thrilled with the separate-config-directory design to start with, so I'm probably not the person to opine on whether we could get away with removing it.

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Peter Eisentraut wrote: On m?n, 2011-10-03 at 11:27 -0400, Bruce Momjian wrote: Frankly, I am confused how this breakage has gone unreported for so long. Well, nobody is required to use pg_ctl, and for the longest time, it was pg_ctl that was considered to be broken (for various other

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Dave Page
On Mon, Oct 3, 2011 at 7:15 PM, Bruce Momjian br...@momjian.us wrote: Andrew Dunstan wrote: On 10/03/2011 12:54 PM, Tom Lane wrote: I was never exactly thrilled with the separate-config-directory design to start with, so I'm probably not the person to opine on whether we could get away

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Andrew Dunstan wrote: On 10/03/2011 02:15 PM, Bruce Momjian wrote: Andrew Dunstan wrote: On 10/03/2011 12:54 PM, Tom Lane wrote: I was never exactly thrilled with the separate-config-directory design to start with, so I'm probably not the person to opine on whether we could get

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Andrew Dunstan
On 10/03/2011 02:25 PM, Bruce Momjian wrote: Andrew Dunstan wrote: On 10/03/2011 02:15 PM, Bruce Momjian wrote: Andrew Dunstan wrote: On 10/03/2011 12:54 PM, Tom Lane wrote: I was never exactly thrilled with the separate-config-directory design to start with, so I'm probably not the

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Andrew Dunstan wrote: On 10/03/2011 02:25 PM, Bruce Momjian wrote: Andrew Dunstan wrote: On 10/03/2011 02:15 PM, Bruce Momjian wrote: Andrew Dunstan wrote: On 10/03/2011 12:54 PM, Tom Lane wrote: I was never exactly thrilled with the separate-config-directory design to start

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Magnus Hagander
On Mon, Oct 3, 2011 at 20:39, Andrew Dunstan and...@dunslane.net wrote: On 10/03/2011 02:25 PM, Bruce Momjian wrote: Andrew Dunstan wrote: On 10/03/2011 02:15 PM, Bruce Momjian wrote: Andrew Dunstan wrote: On 10/03/2011 12:54 PM, Tom Lane wrote: I was never exactly thrilled with the

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of lun oct 03 15:23:47 -0300 2011: Peter Eisentraut wrote: On m?n, 2011-10-03 at 11:27 -0400, Bruce Momjian wrote: Frankly, I am confused how this breakage has gone unreported for so long. Well, nobody is required to use pg_ctl, and for the

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Magnus Hagander wrote: So, you are saying that people who want config-only directories are just not people who normally use pg_ctl, because if they were, they would have reported the bug? ?That seems unlikely. ?I will admit the Gentoo case is exactly that. As Dave has pointed out there

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of lun oct 03 16:03:47 -0300 2011: I'm not sure how big the overlap is - would it be easier if you moved the required functionality into pg_upgrade itself, as you mentioned at some point? As in, would it be easier to fix the config-only directory

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 15:23:47 -0300 2011: Peter Eisentraut wrote: On m?n, 2011-10-03 at 11:27 -0400, Bruce Momjian wrote: Frankly, I am confused how this breakage has gone unreported for so long. Well, nobody is required

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 16:03:47 -0300 2011: I'm not sure how big the overlap is - would it be easier if you moved the required functionality into pg_upgrade itself, as you mentioned at some point? As in, would it be easier to fix the

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Robert Haas
On Mon, Oct 3, 2011 at 3:09 PM, Bruce Momjian br...@momjian.us wrote: Well, we are unlikely to backpatch that parse-and-report option so it would be +2 years before it could be expected to work for even single-major-version upgrades.  That just seems unworkable.  Yeah. :-( I'd like to see the

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of lun oct 03 16:09:08 -0300 2011: Alvaro Herrera wrote: My guess is that we could fix the simple case (the one that doesn't involve a -o datadir option) with the parse-and-report option that has been mentioned, and dictate that the other one doesn't

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 16:09:08 -0300 2011: Alvaro Herrera wrote: My guess is that we could fix the simple case (the one that doesn't involve a -o datadir option) with the parse-and-report option that has been mentioned, and

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Magnus Hagander
On Mon, Oct 3, 2011 at 21:55, Bruce Momjian br...@momjian.us wrote: Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 16:09:08 -0300 2011: Alvaro Herrera wrote: My guess is that we could fix the simple case (the one that doesn't involve a -o datadir option)

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Robert Haas wrote: On Mon, Oct 3, 2011 at 3:09 PM, Bruce Momjian br...@momjian.us wrote: Well, we are unlikely to backpatch that parse-and-report option so it would be +2 years before it could be expected to work for even single-major-version upgrades. ?That just seems unworkable. ?Yeah.

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Magnus Hagander wrote: Well, how does the server get from the config file to where the state file is? Can we do it the same way, or even expose it to the tools using a commandline parameter or something? In that case (the Gentoo example), they use --data-directory su -l postgres \

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of lun oct 03 16:55:54 -0300 2011: Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 16:09:08 -0300 2011: Alvaro Herrera wrote: My guess is that we could fix the simple case (the one that doesn't involve a -o

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of lun oct 03 17:06:16 -0300 2011: Magnus Hagander wrote: Well, how does the server get from the config file to where the state file is? Can we do it the same way, or even expose it to the tools using a commandline parameter or something? In that

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 17:06:16 -0300 2011: Magnus Hagander wrote: Well, how does the server get from the config file to where the state file is? Can we do it the same way, or even expose it to the tools using a commandline

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Peter Eisentraut
On mån, 2011-10-03 at 19:11 +0100, Dave Page wrote: On Mon, Oct 3, 2011 at 7:07 PM, Peter Eisentraut pete...@gmx.net wrote: On mån, 2011-10-03 at 11:27 -0400, Bruce Momjian wrote: Frankly, I am confused how this breakage has gone unreported for so long. Well, nobody is required to use

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Robert Haas
On Mon, Oct 3, 2011 at 3:59 PM, Bruce Momjian br...@momjian.us wrote: pg_ctl would have to do some detective work to see if PG_VERSION existed in that directory and adjust its behavior --- the pg_upgrade patch I posted does this kind of detection.  The goal is the change would happen only for

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of lun oct 03 17:28:53 -0300 2011: Alvaro Herrera wrote: Well, we have the Gentoo developer in this very thread. I'm sure they would fix their command line if we gave them a pg_ctl that worked. Surely the package that contains the init script also

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Peter Eisentraut
On mån, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people not using pg_ctl? Because of the limitations which were fixed in PG 9.1? As Dave already said, windows already has to use pg_ctl. Historically, pg_ctl has had a lot of limitations. Just off the top of my head,

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Andrew Dunstan
On 10/03/2011 04:41 PM, Peter Eisentraut wrote: On mån, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people not using pg_ctl? Because of the limitations which were fixed in PG 9.1? As Dave already said, windows already has to use pg_ctl. Historically, pg_ctl has had a lot of

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Andrew Dunstan wrote: On 10/03/2011 04:41 PM, Peter Eisentraut wrote: On m?n, 2011-10-03 at 15:09 -0400, Bruce Momjian wrote: Why were people not using pg_ctl? Because of the limitations which were fixed in PG 9.1? As Dave already said, windows already has to use pg_ctl.

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 17:28:53 -0300 2011: Alvaro Herrera wrote: Well, we have the Gentoo developer in this very thread. I'm sure they would fix their command line if we gave them a pg_ctl that worked. Surely the package that

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Aidan Van Dyk
On Mon, Oct 3, 2011 at 7:10 PM, Andrew Dunstan and...@dunslane.net wrote: Agreed.  If you remove that, the logical problem goes away and it becomes a simple problem of dumping the contents of postgresql.conf and having pg_ctl (and pg_upgrade) use that.  Let me look at how much code that would

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Andrew Dunstan wrote: On 10/03/2011 06:45 PM, Bruce Momjian wrote: Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 17:28:53 -0300 2011: Alvaro Herrera wrote: Well, we have the Gentoo developer in this very thread. I'm sure they would fix their command line

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Andrew Dunstan
On 10/03/2011 06:45 PM, Bruce Momjian wrote: Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 17:28:53 -0300 2011: Alvaro Herrera wrote: Well, we have the Gentoo developer in this very thread. I'm sure they would fix their command line if we gave them a pg_ctl that

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-03 Thread Bruce Momjian
Bruce Momjian wrote: Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of lun oct 03 17:28:53 -0300 2011: Alvaro Herrera wrote: Well, we have the Gentoo developer in this very thread. I'm sure they would fix their command line if we gave them a pg_ctl that

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-02 Thread Fujii Masao
On Sun, Oct 2, 2011 at 7:54 AM, Bruce Momjian br...@momjian.us wrote: What exactly is your question?  You are not using a config-only directory but the real data directory, so it should work fine. No. He is using PGDATA (= /etc/postgresql-9.0) as a config-only directory, and DATA_DIR (=

[HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-01 Thread Bruce Momjian
In researching pg_ctl -w/wait mode for pg_upgrade, I found that pg_ctl -w's handling of configuration-only directories is often incorrect. For example, 'pg_ctl -w stop' checks for the postmaster.pid file to determine when the server is shut down, but there is no postmaster.pid file in the config

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-01 Thread Mr. Aaron W. Swenson
On Sat, Oct 01, 2011 at 02:08:33PM -0400, Bruce Momjian wrote: In researching pg_ctl -w/wait mode for pg_upgrade, I found that pg_ctl -w's handling of configuration-only directories is often incorrect. For example, 'pg_ctl -w stop' checks for the postmaster.pid file to determine when the

Re: [HACKERS] Bug with pg_ctl -w/wait and config-only directories

2011-10-01 Thread Bruce Momjian
Mr. Aaron W. Swenson wrote: I went through several iterations trying to find a command that can work the way we'd like it to. (Essentially is works the way you're describing it should.) So, in Gentoo, for the initscript, we have this really ugly command to start the server: su -l