From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_basebackup WAL streamer shutdown is bogus - leading to slow tests |
Date: | 2022-01-31 00:41:45 |
Message-ID: | 20220131004145.ek7bbv2s25aj5gsh@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2022-01-29 13:47:13 -0800, Andres Freund wrote:
> Here's a version of the patch only creating the event once. Needs a small bit
> of comment polishing, but otherwise I think it's sane?
Ah, it needs a bit more. I was not cleaning up the event at the exit of
ReceiveXlogStream(). For pg_basebackup that perhaps wouldn't matter, but
pg_receivewal loops...
We don't have a good spot for cleaning up right now. ReceiveXlogStream() has
plenty returns. The attached changes those to a goto done; but pretty it is
not. But probably still the best way for the backbranches?
I think the receivelog.c interface probably could do with a bit of
cleanup... The control flow is quite complicated, with repeated checks all
over etc :(. And the whole thing with giving the appearance of being
instantiatable multiple times, but then using global variables for state, is
...
Attached a revised version.
Greetings,
Andres Freund
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Avoid-slow-shutdown-of-pg_basebackup-windows-edit.patch | text/x-diff | 12.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2022-01-31 00:52:48 | Re: row filtering for logical replication |
Previous Message | Andres Freund | 2022-01-30 23:34:14 | Re: plperl on windows |