From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
Cc: | 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Fix 035_standby_logical_decoding.pl race conditions |
Date: | 2025-04-01 08:32:35 |
Message-ID: | Z+uko5kbw/ek/h0F@ip-10-97-1-34.eu-west-3.compute.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Kuroda-san,
On Tue, Apr 01, 2025 at 01:22:49AM +0000, Hayato Kuroda (Fujitsu) wrote:
> Dear Bertrand,
>
Thanks for the updated patch!
> > s/to avoid the seeing a xl_running_xacts/to avoid seeing a xl_running_xacts/?
>
> Fixed.
hmm, not sure as I still can see:
+# Note that injection_point is used to avoid the seeing the xl_running_xacts
=== 1
+ * XXX What value should we return here? Originally this returns the
+ * inserted location of RUNNING_XACT record. Based on that, here
+ * returns the latest insert location for now.
+ */
+ return GetInsertRecPtr();
Looking at the LogStandbySnapshot() that are using the output lsn, i.e:
pg_log_standby_snapshot()
BackgroundWriterMain()
ReplicationSlotReserveWal()
It looks ok to me to use GetInsertRecPtr().
But if we "really" want to produce a "new" WAL record, what about using
LogLogicalMessage()? It could also be used for debugging purpose. Bonus point:
it does not need wal_level to be set to logical. Thoughts?
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien Coelho | 2025-04-01 08:58:17 | Re: Add partial :-variable expansion to psql \copy |
Previous Message | Michael Banck | 2025-04-01 08:18:41 | Re: pg_recvlogical cannot create slots with failover=true |