Re: BUG #17103: WAL segments are not removed after exceeding max_slot_wal_keep_size
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, jeff.janes@gmail.com,
mk@071.ovh, pgsql-bugs@lists.postgresql.org
Date: 2021-07-28T15:38:28Z
Lists: pgsql-bugs
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > On 2021-Jul-19, Kyotaro Horiguchi wrote: >> What do you think about the attached? > Sounds sensible -- I verified the logs for one of the cases that failed > in the buildfarm, and indeed the "checkpoint ended" message appears > after the s2 slot is created, so it should fix the problem. (I didn't > actually try to reproduce the problem locally, so I didn't verify the > fix any further than ensuring the test still passes.) This test is still unstable :-( https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=tern&dt=2021-07-20%2012%3A46%3A11 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=kittiwake&dt=2021-07-20%2015%3A05%3A39 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=kittiwake&dt=2021-07-28%2014%3A33%3A01 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=kittiwake&dt=2021-07-28%2014%3A33%3A01 These all look like # Failed test 'check that segments have been removed' # at t/019_replslot_limit.pl line 226. # got: '000000010000000000000020' # expected: '000000010000000000000024' # Looks like you failed 1 test of 16. with varying values mentioned. It looks to me like WAL file cleanup is not as synchronous with slot creation as the test thinks. Maybe it needs to loop until the oldest WAL file matches what it expects? regards, tom lane
Commits
-
Close yet another race condition in replication slot test code
- 41d27ee7b870 13.4 landed
- f951f6f69c7e 14.0 landed
- ce197e91d02c 15.0 landed
-
Make new replication slot test code even less racy
- ce413eba4116 13.4 landed
- 1e8751380836 14.0 landed
- 0d2cb6b2bbc3 15.0 landed
-
Make new replication slot test code less racy
- d8f3b021c618 14.0 landed
- 8589299e03ff 15.0 landed
- 7099ba058035 13.4 landed
-
Advance old-segment horizon properly after slot invalidation
- ead9e51e8236 15.0 landed
- e5bcbb10707b 14.0 landed
- 866237a6fa01 13.4 landed