public inbox for [email protected]  
help / color / mirror / Atom feed
From: Hayato Kuroda (Fujitsu) <[email protected]>
To: 'Bertrand Drouvot' <[email protected]>
Cc: Alexander Lakhin <[email protected]>
Cc: [email protected] <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: RE: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
Date: Tue, 9 Jun 2026 07:05:20 +0000
Message-ID: <TYRPR01MB12156D183BE5344DAA5F3ED1DF51D2@TYRPR01MB12156.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <aiessEw9U8r8fs7L@bdtpg>
References: <[email protected]>
	<aiP/X1FThlZRCFiN@bdtpg>
	<OS9PR01MB1214908BA67A7811BD6281208F51C2@OS9PR01MB12149.jpnprd01.prod.outlook.com>
	<aiaBtENl7tTf2MM8@bdtpg>
	<aiessEw9U8r8fs7L@bdtpg>

Dear Bertrand,

Thanks for re-posting. Let's focus on the logical decoding stuff.

> > 0004: Add a test for 0003

I found a comment for the test.

```
+# Issue SQL decoding (read_local_xlog_page_guts path) on the pre-connected
+# session.
+$decode_session->query_until(
+       qr/decoding_started/, qq(
+       \\echo decoding_started
+       SELECT count(*) FROM pg_logical_slot_peek_changes('race_slot_sql', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
+));
```

Not sure, pg_logical_slot_peek_changes() can be finished without waiting anything,
right? So why do we use query_until() and check the output here?
IIUC, the command can immediately raise an ERROR if the race happened. So isn't it
enough to use safe_psql() to ensure the SQL function can work?

Best regards,
Hayato Kuroda
FUJITSU LIMITED






view thread (24+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: RE: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
  In-Reply-To: <TYRPR01MB12156D183BE5344DAA5F3ED1DF51D2@TYRPR01MB12156.jpnprd01.prod.outlook.com>

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

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