On 2025-Nov-19, Robert Haas wrote:
> I do not know how to make the phrase "older minor releases" any more
> clear.
It's perfectly clear. I just don't believe this claim.
> You and Álvaro seem to be under the impression that nobody will
> ever try to compile code written after this change from a
On Wed, Nov 19, 2025 at 12:47 PM Bertrand Drouvot
wrote:
> > True, but if they write any new code, and care about it compiling with
> > older minor releases, this is a potential pitfall.
>
> Why given that 06edbed4786 has been back patched through 13?
I do not know how to make the phrase "older m
On 2025-11-19 12:27:30 -0500, Robert Haas wrote:
> It's possible, but fundamentally I think it's about replacing
> XLogRecPtrIsInvalid with XLogRecPtrIsValid, and what I'm saying is I
> wouldn't have chosen to do that. I agree that it would have been
> better to do it that way originally, but I dis
Hi,
On Wed, Nov 19, 2025 at 12:27:30PM -0500, Robert Haas wrote:
> On Wed, Nov 19, 2025 at 11:49 AM Álvaro Herrera wrote:
> > > I'm rather late to the party here, but for what it's worth, I don't
> > > really think this was a good idea. Anyone who wants to write
> > > out-of-core code that works
On Wed, Nov 19, 2025 at 11:49 AM Álvaro Herrera wrote:
> > I'm rather late to the party here, but for what it's worth, I don't
> > really think this was a good idea. Anyone who wants to write
> > out-of-core code that works in the back-branches must still write it
> > the old way, or it will poten
On 2025-Nov-19, Robert Haas wrote:
> On Thu, Nov 6, 2025 at 2:48 PM Álvaro Herrera wrote:
> > Okay, thanks, I have applied that one to all stable branches, except
> > I didn't add the judgemental comment about XLogRecPtrIsInvalid().
>
> I'm rather late to the party here, but for what it's worth,
On Thu, Nov 6, 2025 at 2:48 PM Álvaro Herrera wrote:
> Okay, thanks, I have applied that one to all stable branches, except I
> didn't add the judgemental comment about XLogRecPtrIsInvalid().
I'm rather late to the party here, but for what it's worth, I don't
really think this was a good idea. An
Hi,
On Tue, Nov 18, 2025 at 06:57:33PM +0100, Álvaro Herrera wrote:
> On 2025-Nov-18, Bertrand Drouvot wrote:
> > The patch makes use of it because it exists. I agree that we could
> > also remove it (for the reasons you mentioned above), I'll do that.
>
> RegProcedure actually predates all of ou
On 2025-Nov-18, Bertrand Drouvot wrote:
> Hi,
>
> On Tue, Nov 18, 2025 at 04:54:32PM +0100, Peter Eisentraut wrote:
> > RegProcedureIsValid() doesn't add any value over OidIsValid, and we
> > don't have any RegXXXIsValid() for any of the other regxxx types.
> > So if we were to do anything about
Hi,
On Tue, Nov 18, 2025 at 04:54:32PM +0100, Peter Eisentraut wrote:
> RegProcedureIsValid() doesn't add any value over OidIsValid, and we don't
> have any RegXXXIsValid() for any of the other regxxx types. So if we were
> to do anything about this, I would just remove it.
The patch makes use o
On 18.11.25 10:06, Bertrand Drouvot wrote:
Hi,
On Fri, Nov 07, 2025 at 03:03:03PM +, Bertrand Drouvot wrote:
I'm currently working on the RegProcedureIsValid() and OidIsValid() cases,
will share once done.
here they are, I'm not creating a new thread for those as this is the same
kind of
Hi,
On Mon, Nov 17, 2025 at 01:12:24PM +, Bertrand Drouvot wrote:
> The script has been updated and the patch too (finding a new replacement in
> gist.c).
Finally, adding GistNSN to the game (as a typedef XLogRecPtr) gives the
attached.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors
Hi,
On Thu, Nov 13, 2025 at 02:11:08PM +, Bertrand Drouvot wrote:
> On Fri, Nov 07, 2025 at 02:37:32PM +0100, Álvaro Herrera wrote:
>
> I guess/hope you'll get the same results if you use run_parallel.sh as
> mentioned
> above.
The .cocci script had an issue (not always detecting correctly
On Fri, Nov 07, 2025 at 02:37:32PM +0100, Álvaro Herrera wrote:
> 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
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_
Hi,
On Fri, Nov 07, 2025 at 05:18:41PM +, Dagfinn Ilmari Mannsåker wrote:
> Peter Eisentraut writes:
>
> > On 07.11.25 16:03, Bertrand Drouvot wrote:
> >
> >> +#define pg_attribute_deprecated(msg) [[deprecated(msg)]]
> >> +#elif defined(__GNUC__) || defined(__clang__)
> >
> > The __clang__ p
Hi,
On Fri, Nov 07, 2025 at 03:03:03PM +, Bertrand Drouvot wrote:
> Hi,
>
> On Fri, Nov 07, 2025 at 02:37:32PM +0100, Álvaro Herrera wrote:
> > On 2025-Nov-07, Bertrand Drouvot wrote:
> >
> > > Agree, will modify the .cocci scripts that way.
> >
> > I just noticed that we missed this ... ma
Peter Eisentraut writes:
> On 07.11.25 16:03, Bertrand Drouvot wrote:
>
>> +#define pg_attribute_deprecated(msg) [[deprecated(msg)]]
>> +#elif defined(__GNUC__) || defined(__clang__)
>
> The __clang__ part is not needed, because clang defines __GNUC__ also.
Or, to avoid having to know this, how
Hi,
On Fri, Nov 07, 2025 at 05:05:11PM +0100, Peter Eisentraut wrote:
> On 07.11.25 16:03, Bertrand Drouvot wrote:
> > +/*
> > + * Mark a declaration as deprecated with a custom message. The compiler
> > will
> > + * emit a warning when the deprecated entity is used.
> > + */
> > +#if defined(__S
On 07.11.25 16:03, Bertrand Drouvot wrote:
+/*
+ * Mark a declaration as deprecated with a custom message. The compiler will
+ * emit a warning when the deprecated entity is used.
+ */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L || \
+defined(__cplusplus) && __cplusplus >= 20140
Hi,
On Fri, Nov 07, 2025 at 02:37:32PM +0100, Álvaro Herrera wrote:
> On 2025-Nov-07, Bertrand Drouvot wrote:
>
> > Agree, will modify the .cocci scripts that way.
>
> I just noticed that we missed this ... maybe you want to include it also?
>
> - MyProc->waitLSN = 0;
> + MyProc->waitLS
On 2025-Nov-07, Bertrand Drouvot wrote:
> Agree, will modify the .cocci scripts that way.
I just noticed that we missed this ... maybe you want to include it also?
diff --git a/src/backend/replication/syncrep.c
b/src/backend/replication/syncrep.c
index a0c79958fd5..1f11c8646f5 100644
--- a/src/
Hi,
On Thu, Nov 06, 2025 at 08:48:11PM +0100, Álvaro Herrera wrote:
> On 2025-Nov-06, Bertrand Drouvot wrote:
>
> > I see, I would have introduced XLogRecPtrIsInvalid() on the back branches
> > only
> > if there is a need to (a bugfix that would make use of it). But yeah, I
> > agree
> > that w
On 2025-Nov-06, Bertrand Drouvot wrote:
> I see, I would have introduced XLogRecPtrIsInvalid() on the back branches only
> if there is a need to (a bugfix that would make use of it). But yeah, I agree
> that would add extra "unnecessary" work, so done as you suggested in the
> attached. I checked
Hi,
On Thu, Nov 06, 2025 at 10:06:13AM +0100, Álvaro Herrera wrote:
> On 2025-Nov-06, Bertrand Drouvot wrote:
>
> > Subject: [PATCH v5 1/4] Introduce XLogRecPtrIsValid() and replace
> > XLogRecPtrIsInvalid() calls
>
> > XLogRecPtrIsInvalid() is inconsistent with the affirmative form of other
>
On 2025-Nov-06, Bertrand Drouvot wrote:
> Subject: [PATCH v5 1/4] Introduce XLogRecPtrIsValid() and replace
> XLogRecPtrIsInvalid() calls
> XLogRecPtrIsInvalid() is inconsistent with the affirmative form of other
> *IsValid() macros and leads to awkward double negative.
>
> This commit introduc
Hi,
On Mon, Nov 03, 2025 at 07:47:28AM +, Bertrand Drouvot wrote:
> I think the way it is done in the attached makes sense, it:
>
> - introduces PG_DEPRECATED()
> - provides a use case on how to use it (i.e using a version that is currently
> in the future)
> - ensures that XLogRecPtrIsInvali
Hi,
On Fri, Oct 31, 2025 at 01:19:50PM +0100, Álvaro Herrera wrote:
> On 2025-Oct-31, Bertrand Drouvot wrote:
>
> > After giving it more thought, I'm inclined to postpone the compiler warning
> > until XLogRecPtrIsValid() has been available for some time. The question is
> > for
> > how long?
>
On 2025-Oct-31, Bertrand Drouvot wrote:
> After giving it more thought, I'm inclined to postpone the compiler warning
> until XLogRecPtrIsValid() has been available for some time. The question is
> for
> how long?
Maybe we can mark it so that it becomes obsolete in a future version,
#if PG_VERS
Hi,
On Fri, Oct 31, 2025 at 08:41:46AM +0100, Peter Eisentraut wrote:
> On 31.10.25 05:31, Bertrand Drouvot wrote:
> > For PG19, we could:
> >
> > Add a comment in the code documenting that XLogRecPtrIsInvalid() is
> > deprecated
> > and that we will enforce a "deprecated" attribute on it in PG2
On 31.10.25 05:31, Bertrand Drouvot wrote:
For PG19, we could:
Add a comment in the code documenting that XLogRecPtrIsInvalid() is deprecated
and that we will enforce a "deprecated" attribute on it in PG24.
Just a code comment for now seems reasonable. I wouldn't make any
predictions about t
Hi,
On Thu, Oct 30, 2025 at 02:55:51PM +0100, Peter Eisentraut wrote:
> On 30.10.25 10:17, Bertrand Drouvot wrote:
> > - 0002 deprecates XLogRecPtrIsInvalid(): it emits a warning message at
> > compilation
> > time if XLogRecPtrIsInvalid() is in use in the code base.
>
> Surely this could be fac
On 30.10.25 10:17, Bertrand Drouvot wrote:
- 0002 deprecates XLogRecPtrIsInvalid(): it emits a warning message at
compilation
time if XLogRecPtrIsInvalid() is in use in the code base.
Surely this could be factored out in macro in such a way that the
warning message is a macro argument and we
Hi,
On Wed, Oct 29, 2025 at 05:50:13PM +0100, Peter Eisentraut wrote:
> On 28.10.25 13:33, Bertrand Drouvot wrote:
> > I do prefer to introduce XLogRecPtrIsValid(x) and switch to that. Then, do
> > the
> > same kind of work on OidIsValid() and TransactionIdIsValid() and add an
> > annual
> > che
Hi,
On Tue, Oct 28, 2025 at 05:57:54PM +, Bertrand Drouvot wrote:
> Hi,
>
> On Tue, Oct 28, 2025 at 04:05:34PM +0200, Álvaro Herrera wrote:
> >
> > BTW we could use Coccinelle to replace all the XLogRecPtrIsInvalid()
> > calls with !XLogRecPtrIsValid(), as well as all places comparing an LSN
On 28.10.25 13:33, Bertrand Drouvot wrote:
I do prefer to introduce XLogRecPtrIsValid(x) and switch to that. Then, do the
same kind of work on OidIsValid() and TransactionIdIsValid() and add an annual
check.
Idea is to get some code consistency while keeping macros which are valuable for
readabi
Hi,
On Tue, Oct 28, 2025 at 04:05:34PM +0200, Álvaro Herrera wrote:
>
> BTW we could use Coccinelle to replace all the XLogRecPtrIsInvalid()
> calls with !XLogRecPtrIsValid(), as well as all places comparing an LSN
> to InvalidXLogRecPtr or literal zero.
I did v1 the old way (shell script) and d
On 2025-Oct-28, Michael Paquier wrote:
> The annoying part with eliminating XLogRecPtrIsInvalid() or replacing
> it is that a bunch of external code would be broken, particularly
> backup tools. I'd rather leave the beast alone.
Well, we don't have to remove it right away. We can simply not use
On Tue, Oct 28, 2025 at 01:40:24PM +0200, Heikki Linnakangas wrote:
> It's also a bit cumbersome that we have XLogRecPtrIsInvalid() rather than
> XLogRecPtrIsValid(). That's inconsistent with OidIsValid and
> TransactionIdInValid, and it leads to an awkward double negative 'if
> (!XLogRecPtrIsInval
Hi,
On Tue, Oct 28, 2025 at 01:40:24PM +0200, Heikki Linnakangas wrote:
> On 28/10/2025 10:53, Quan Zongliang wrote:
> > On 10/28/25 4:13 PM, Bertrand Drouvot wrote:
> > > While working on refactoring some code in [1], one of the changes was:
> > >
> > > - if (initial_restart_lsn != Invalid
On 28/10/2025 10:53, Quan Zongliang wrote:
On 10/28/25 4:13 PM, Bertrand Drouvot wrote:
While working on refactoring some code in [1], one of the changes was:
- if (initial_restart_lsn != InvalidXLogRecPtr &&
- initial_restart_lsn < oldestLSN)
+ XLogRecPtr restart_lsn = s
On 10/28/25 4:13 PM, Bertrand Drouvot wrote:
Hi hackers,
While working on refactoring some code in [1], one of the changes was:
- if (initial_restart_lsn != InvalidXLogRecPtr &&
- initial_restart_lsn < oldestLSN)
+ XLogRecPtr restart_lsn = s->data.restart_lsn;
+
+
Hi hackers,
While working on refactoring some code in [1], one of the changes was:
- if (initial_restart_lsn != InvalidXLogRecPtr &&
- initial_restart_lsn < oldestLSN)
+ XLogRecPtr restart_lsn = s->data.restart_lsn;
+
+ if (restart_lsn != InvalidXLogRecPtr &&
+
43 matches
Mail list logo