Re: Consistently use the XLogRecPtrIsInvalid() macro

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Quan Zongliang <quanzongliang(at)yeah(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro
Date: 2025-11-13 12:55:01
Message-ID: 202511131242.kcbmff4tc5ss@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-Nov-07, Bertrand Drouvot wrote:

> What do you think of the attached? It contains the ones you mentioned and some
> others. The patch attached has been generated by the .cocci script [1].
>
> [1]: https://github.com/bdrouvot/coccinelle_on_pg/blob/main/replace_literal_0_assignement_with_InvalidXLogRecPtr.cocci

Hmm, I tried to recreate your patch using this .cocci file, and in my
run, there's a few changes in your patch that my spatch run didn't
detect. I wonder if that's because my spatch version is buggy, or
because you hacked the .cocci file beyond what's in your github repo.

In case you're curious, here's two commits: what I got with my spatch
run as a first step, and then the patch you sent on top of that.

(I'm wondering if I should reproduce your previous patches in case there
were also differences there. Life is short though.)

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/

Attachment Content-Type Size
v9-0001-my-spatch-run.patch text/x-diff 5.1 KB
v9-0002-Replace-literal-0-with-InvalidXLogRecPtr-for-XLog.patch text/x-diff 3.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Kukushkin 2025-11-13 13:08:54 Re: Issue with logical replication slot during switchover
Previous Message Daniel Gustafsson 2025-11-13 12:49:27 Re: Few untranslated error messages in OAuth