Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: > On 2017-01-19 20:45:57 -0500, Stephen Frost wrote: > > * Andres Freund (and...@anarazel.de) wrote: > > > On 2017-01-19 10:06:09 -0500, Stephen Frost wrote: > > > > WAL replay does do more work, generally speaking (the WAL has to be > > > > read, the

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Andres Freund
On 2017-01-19 20:45:57 -0500, Stephen Frost wrote: > * Andres Freund (and...@anarazel.de) wrote: > > On 2017-01-19 10:06:09 -0500, Stephen Frost wrote: > > > WAL replay does do more work, generally speaking (the WAL has to be > > > read, the checksum validated on it, and then the write has to go

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: > On 2017-01-19 10:06:09 -0500, Stephen Frost wrote: > > WAL replay does do more work, generally speaking (the WAL has to be > > read, the checksum validated on it, and then the write has to go out, > > while the checkpointer just writes the page out

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Fri, Jan 20, 2017 at 12:06 AM, Stephen Frost wrote: > > We did make the WAL checksum routines a lot > > faster with 9.6, as I recall, so perhaps there's been some change there > > too. > > 9.5, commit 5028f22f with

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Andres Freund
On 2017-01-19 10:06:09 -0500, Stephen Frost wrote: > WAL replay does do more work, generally speaking (the WAL has to be > read, the checksum validated on it, and then the write has to go out, > while the checkpointer just writes the page out from memory), but it's > also dealing with less

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Michael Paquier
On Fri, Jan 20, 2017 at 12:06 AM, Stephen Frost wrote: > We did make the WAL checksum routines a lot > faster with 9.6, as I recall, so perhaps there's been some change there > too. 9.5, commit 5028f22f with Abhijit's and Heikki's work on CRC-32 computations. -- Michael --

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 1/19/17 9:53 AM, Stephen Frost wrote: > > Sure, but we're talking about replaying WAL vs. doing a checkpoint, not > > about writing WAL vs. replaying WAL. Replaying WAL and doing a > > checkpoint both require writing to lots of

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Peter Eisentraut
On 1/18/17 3:47 PM, Robert Haas wrote: > Anybody who has got a script that runs pg_ctl unattended mode likely > now has to go update that script to add --no-wait. The state of init scripts and other start scripts out there is such a mess, it's hard to make general statements like this. Many

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 1/18/17 3:12 PM, Stephen Frost wrote: > > I don't understand what I'm missing when it comes to checkpoint_timeout > > and the time required to recover from a crash. You aren't the first > > person to question that

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Peter Eisentraut
On 1/19/17 9:53 AM, Stephen Frost wrote: > Sure, but we're talking about replaying WAL vs. doing a checkpoint, not > about writing WAL vs. replaying WAL. Replaying WAL and doing a > checkpoint both require writing to lots of different places across the > filesystem, of course. Yeah, but they are

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 1/18/17 3:47 PM, Robert Haas wrote: > > Anybody who has got a script that runs pg_ctl unattended mode likely > > now has to go update that script to add --no-wait. > > The state of init scripts and other start scripts out there is

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-19 Thread Peter Eisentraut
On 1/18/17 3:12 PM, Stephen Frost wrote: > I don't understand what I'm missing when it comes to checkpoint_timeout > and the time required to recover from a crash. You aren't the first > person to question that association, but it seems pretty clear to me. > > When doing recovery, we have to

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Ryan Murphy
> The on-screen output isn't all that helpful for diagnosing what went > wrong. You might learn more by looking at the regression.diffs files. > Remember that errors tend to cascade, so the first one(s) in any > particular test suite are the most important --- the rest might just > be fallout. >

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Tom Lane
Ryan Murphy writes: > So I ran "make -i installcheck-world" and it ran to completion. This is on > a freshly "git pull"ed postgres source tree. Certain tests failed, but > most succeeded. Those results look pretty broken :-( > There was no "overall" indication of

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Ryan Murphy
> > Jim Nasby said I shouldn't necessarily need to build the docs / the whole > world in order to review patches. But the Review form needs a `make > installworld-check`. Do I need to install the whole world in order to meet > this requirement? Happy to do so if required, but in that case, I

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Ryan Murphy
> > > Ryan try to run 'make install-world' then 'make -i installcheck-world', -i > option will ignore the error and proceed. You can check if any other tests > fails. This is a separate issue, unrelated to this patch. I do not think > we should stop from changing the status because of this. > >

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Jan 19, 2017 at 5:01 AM, Peter Eisentraut > wrote: > > On 1/18/17 8:25 AM, Stephen Frost wrote: > >> I was actually thinking about it the other way- start out by changing > >> them to both be 5m and

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Jan 19, 2017 at 6:20 AM, Stephen Frost wrote: > > On Wed, Jan 18, 2017 at 16:15 Robert Haas wrote: > >> On Wed, Jan 18, 2017 at 3:59 PM, Stephen Frost wrote: > >> > For

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Michael Paquier
On Thu, Jan 19, 2017 at 5:01 AM, Peter Eisentraut wrote: > On 1/18/17 8:25 AM, Stephen Frost wrote: >> I was actually thinking about it the other way- start out by changing >> them to both be 5m and then document next to checkpoint_timeout (and >> max_wal_size,

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Michael Paquier
On Thu, Jan 19, 2017 at 6:20 AM, Stephen Frost wrote: > On Wed, Jan 18, 2017 at 16:15 Robert Haas wrote: >> On Wed, Jan 18, 2017 at 3:59 PM, Stephen Frost wrote: >> > For non-cold standby configurations, pg_ctl is going to return

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
On Wed, Jan 18, 2017 at 16:15 Robert Haas wrote: > On Wed, Jan 18, 2017 at 3:59 PM, Stephen Frost wrote: > > > For non-cold standby configurations, pg_ctl is going to return just as > > > soon as the database has finished crash recovery, which in most

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 3:59 PM, Stephen Frost wrote: > For non-cold standby configurations, pg_ctl is going to return just as > soon as the database has finished crash recovery, which in most cases > will probably be on the order of a few seconds. /me is poleaxed. --

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jan 18, 2017 at 3:43 PM, Stephen Frost wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > >> I think we've changed the defaults to make things better for an > >> attended startup and worse for an unattended

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Robert Haas
On Wed, Jan 18, 2017 at 3:43 PM, Stephen Frost wrote: > * Robert Haas (robertmh...@gmail.com) wrote: >> On Tue, Jan 17, 2017 at 5:31 PM, Stephen Frost wrote: >> > If I'm understanding your concern correctly, you're worried about the >> > case of a cold

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Tue, Jan 17, 2017 at 5:31 PM, Stephen Frost wrote: > > If I'm understanding your concern correctly, you're worried about the > > case of a cold standby where the database is only replaying WAL but not > > configured to

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Robert Haas
On Tue, Jan 17, 2017 at 5:31 PM, Stephen Frost wrote: > If I'm understanding your concern correctly, you're worried about the > case of a cold standby where the database is only replaying WAL but not > configured to come up as a hot standby and therefore PQping() won't ever >

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 1/18/17 8:25 AM, Stephen Frost wrote: > > I was actually thinking about it the other way- start out by changing > > them to both be 5m and then document next to checkpoint_timeout (and > > max_wal_size, perhaps...) that if you go

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Peter Eisentraut
On 1/18/17 8:25 AM, Stephen Frost wrote: > I was actually thinking about it the other way- start out by changing > them to both be 5m and then document next to checkpoint_timeout (and > max_wal_size, perhaps...) that if you go changing those parameters (eg: > bumping up checkpoint_timeout to 30

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Wed, Jan 18, 2017 at 10:35 AM, Michael Paquier > wrote: > > On Wed, Jan 18, 2017 at 7:31 AM, Stephen Frost wrote: > >> Perhaps we need a way for pg_ctl to realize a cold-standby

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-18 Thread Stephen Frost
Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Wed, Jan 18, 2017 at 7:31 AM, Stephen Frost wrote: > > Perhaps we need a way for pg_ctl to realize a cold-standby case and > > throw an error or warning if --wait is specified then, but that hardly > > seems

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-17 Thread Peter Eisentraut
On 1/17/17 8:35 PM, Michael Paquier wrote: > Yeah, it seems to me that we are likely looking for a wait mode saying > to exit pg_ctl once Postgres is happily rejecting connections, because > that means that it is up and that it is sorting out something first > before accepting them. This would

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-17 Thread Michael Paquier
On Wed, Jan 18, 2017 at 10:35 AM, Michael Paquier wrote: > On Wed, Jan 18, 2017 at 7:31 AM, Stephen Frost wrote: >> Perhaps we need a way for pg_ctl to realize a cold-standby case and >> throw an error or warning if --wait is specified then, but

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-17 Thread Michael Paquier
On Wed, Jan 18, 2017 at 7:31 AM, Stephen Frost wrote: > Perhaps we need a way for pg_ctl to realize a cold-standby case and > throw an error or warning if --wait is specified then, but that hardly > seems like the common use-case. It also wouldn't make any sense to have >

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-17 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Tue, Jan 17, 2017 at 4:46 PM, Stephen Frost wrote: > >> But what if we're restarting after, say, rebooting? Then there's > >> nobody to see the progress messages, perhaps. The system just seems > >> to take an eternity to

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-17 Thread Robert Haas
On Tue, Jan 17, 2017 at 4:46 PM, Stephen Frost wrote: >> But what if we're restarting after, say, rebooting? Then there's >> nobody to see the progress messages, perhaps. The system just seems >> to take an eternity to return to the usual runlevel. > > Not unlike an fsck.

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-17 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Tue, Jan 17, 2017 at 11:27 AM, Peter Eisentraut > wrote: > > On 1/15/17 11:40 PM, Fujii Masao wrote: > >> This change may confuse the users who run "pg_ctl start" to perform a crash > >> recovery, archive recovery

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-17 Thread Robert Haas
On Tue, Jan 17, 2017 at 11:27 AM, Peter Eisentraut wrote: > On 1/15/17 11:40 PM, Fujii Masao wrote: >> This change may confuse the users who run "pg_ctl start" to perform a crash >> recovery, archive recovery and standby server (with hot_standby=off) because >>

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-17 Thread Peter Eisentraut
On 1/15/17 11:40 PM, Fujii Masao wrote: > This change may confuse the users who run "pg_ctl start" to perform a crash > recovery, archive recovery and standby server (with hot_standby=off) because > "pg_ctl start" would not return so long time. Well, this change was made because the previous

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-15 Thread Fujii Masao
On Sat, Jan 14, 2017 at 11:19 PM, Peter Eisentraut wrote: > On 1/11/17 11:20 AM, Ryan Murphy wrote: >> Thanks for the review Beena, I'm glad the patch is ready to go! > > committed, thanks Sorry for speaking up late. This change may confuse the users who run

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-14 Thread Peter Eisentraut
On 1/11/17 11:20 AM, Ryan Murphy wrote: > Thanks for the review Beena, I'm glad the patch is ready to go! committed, thanks -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-11 Thread Ryan Murphy
Thanks for the review Beena, I'm glad the patch is ready to go! I think because of my environment/setup, I get errors when I try "make install-world", but I'm at work now, when I have time I will go back and try again and figure out what is wrong. I'll let you guys know if I have any questions.

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-11 Thread Beena Emerson
Hello, On Wed, Jan 11, 2017 t 6:06 PM, Beena Emerson wrote: > > > On Fri, Jan 6, 2017 at 11:54 AM, Ryan Murphy > wrote: > >> The following review has been posted through the commitfest application: >> make installcheck-world: tested, failed >>

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-11 Thread Beena Emerson
On Fri, Jan 6, 2017 at 11:54 AM, Ryan Murphy wrote: > The following review has been posted through the commitfest application: > make installcheck-world: tested, failed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-08 Thread Jim Nasby
On 1/7/17 11:14 PM, Ryan Murphy wrote: So I realized that I've never actually done `make world` before, and when I try that I get a funny error: make -C doc all make -C src all make -C sgml all ... *** ERROR: `osx' is missing on your system. ... Do you have any idea what that means? I

Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-07 Thread Jim Nasby
On 1/6/17 12:24 AM, Ryan Murphy wrote: I don't actually believe this to indicate a problem though - I think perhaps there's a problem with this test, or with how I am running it. The only diff was that when it (correctly) complained of a nonexistent database, it referred to my username that I

[HACKERS] Re: Clarifying "server starting" messaging in pg_ctl start without --wait

2017-01-05 Thread Ryan Murphy
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed (Though I could not check "make installcheck-world" as