Re: Another reason why the recovery tests take a long time
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Date: 2017-06-26T18:01:04Z
Lists: pgsql-hackers
On 2017-06-26 13:42:52 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > On 2017-06-26 12:32:00 -0400, Tom Lane wrote: > >> ... But I wonder whether it's intentional that the old > >> walreceiver dies in the first place. That FATAL exit looks suspiciously > >> like it wasn't originally-designed-in behavior. > > > It's quite intentional afaik - I've complained about the bad error > > message recently (we really shouldn't say "no COPY in progress), but > > exiting seems quite reasonable. Otherwise we'd have add a separate > > retry logic into the walsender, that reconnects without a new walsender > > being started. > > Ah, I see. I'd misinterpreted the purpose of the infinite loop in > WalReceiverMain() --- now I see that's for receiving requests from the > startup proc for different parts of the WAL stream, not for reconnecting > to the master. Right. And if the connection fails, we intentionally (whether that's good or bad is another question) switch to restore_command (or pg_xlog...) based recovery, in which case we certainly do not want the walsender around. - Andres
Commits
-
Reduce wal_retrieve_retry_interval in applicable TAP tests.
- df31a9fc66f1 9.6.4 landed
- 2710ccd782d0 10.0 landed
-
Don't lose walreceiver start requests due to race condition in postmaster.
- e96adaacdc8f 9.2.22 landed
- e5d494d78cf6 10.0 landed
- dc311b5bd3cf 9.5.8 landed
- cb59949f6ec6 9.3.18 landed
- a4d1ce095bbe 9.6.4 landed
- 47fec424cbc9 9.4.13 landed