pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Euler Taveira <euler@eulerto.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Subject: Re: Add a perl function in Cluster.pm to generate WAL
Date: Sun, 7 Jan 2024 16:10:50 +0900
Message-ID: <ZZpOenv6gv8TdZLE@paquier.xyz> (raw)
In-Reply-To: <2d39b5fa-ba90-48c8-4cde-ecba4a62fa3b@gmail.com>
References: <3a6978d6-e4fc-4014-b5f7-45db53d8fa53@app.fastmail.com>
	<ZYEaLlhZ5lgTqsaQ@paquier.xyz>
	<CALj2ACXppTLS1pKa=M-h-VxWHSTo4iJvHYik_J+pLQxdeLMAzQ@mail.gmail.com>
	<ZYIgg55UyDS56Y9l@paquier.xyz>
	<5d160064-8cbe-4b32-9c55-c983b1f63b12@app.fastmail.com>
	<ZYOTKV1MV7gDYpCV@paquier.xyz>
	<370894.1704325169@sss.pgh.pa.us>
	<2e203472-72b5-1b55-377a-824c3f28b190@gmail.com>
	<ZZdD0U0_cSZT4ZhA@paquier.xyz>
	<2d39b5fa-ba90-48c8-4cde-ecba4a62fa3b@gmail.com>

On Fri, Jan 05, 2024 at 11:00:00PM +0300, Alexander Lakhin wrote:
> Your suspicion was proved right. After
> git show c161ab74f src/test/recovery/t/035_standby_logical_decoding.plĀ  | git apply -R
> 20 iterations with 20 tests in parallel performed successfully for me
> (twice).
> 
> So it looks like c161ab74f really made the things worse.

We have two different failures here, one when VACUUM fails for a
shared relation:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2024-01-03%2017%3A09%3A27
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2024-01-01%2020%3A10%3A18

And the second failure happens for VACUUM FULL with a shared relation:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2024-01-03%2020%3A07%3A15

In the second case, the VACUUM FULL happens *BEFORE* the new
advance_wal(), making c161ab74f unrelated, no?

Anyway, if one looks at the buildfarm logs, this failure is more
ancient than c161ab74f.  We have many of them before that, some
reported back in October:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2023-10-19%2000%3A44%3A58
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2023-10-30%2013%3A39%3A20

I suspect on the contrary that c161ab74f may be actually helping here,
because we've switched the CREATE TABLE/INSERT queries to not use a
snapshot anymore, reducing the reasons why a slot conflict would
happen?  Or maybe that's just a matter of luck because the test is
racy anyway.

Anyway, this has the smell of a legit bug to me.  I am also a bit
dubious about the choice of pg_authid as shared catalog to choose for
the slot invalidation check.  Isn't that potentially racy with the
scans we may do on it at connection startup?  Something else should be
chosen, like pg_shdescription as it is non-critical?  I am adding in
CC Bertrand and Andres, as author and committer behind befcd77d53217b.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (24+ messages)  latest in thread

Message-ID: <ZZpOenv6gv8TdZLE@paquier.xyz>
Permalink:  ../ZZpOenv6gv8TdZLE@paquier.xyz/
Also on:    postgresql.org/message-id/ZZpOenv6gv8TdZLE@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, exclusion@gmail.com, tgl@sss.pgh.pa.us, euler@eulerto.com, bharath.rupireddyforpostgres@gmail.com, horikyota.ntt@gmail.com, alvherre@alvh.no-ip.org, andrew@dunslane.net, andres@anarazel.de, bertranddrouvot.pg@gmail.com
  Subject: Re: Add a perl function in Cluster.pm to generate WAL
  In-Reply-To: <ZZpOenv6gv8TdZLE@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox