Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joe Conway <mail(at)joeconway(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, "Guo, Adam" <adamguo(at)amazon(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Jim Mlodgenski <jimmy76(at)gmail(dot)com>
Subject: Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation
Date: 2025-03-19 20:42:43
Message-ID: CAD21AoBydZugOgF7BTSozVXM4j4acNP-imeSzdTTSC0XCaZvUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 19, 2025 at 2:58 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> On 21.02.25 20:39, Masahiko Sawada wrote:
> >>>> I have one question about the 0001 patch; since we add
> >>>> 'default_char_signedness' field to ControlFileData do we need to bump
> >>>> PG_CONTROL_VERSION? We have comments about bumping PG_CONTROL_VERSION
> >>>> when changing CheckPoint struct or DBState enum so it seems likely but
> >>>> I'd like to confirm just in case that we need to bump
> >>>> PG_CONTROL_VERSION also when changing ControlFileData.
> >>>
> >>> Yes. (I'm not aware of value we get from having distinct control file version
> >>> and catalog version, but we do have both.)
> >>>
> >>>> If we need, can
> >>>> we bump it to 1800? or 1701?
> >>>
> >>> I'd do 1800. The pattern seems to be to bump to 1800 for the first pg_control
> >>> change of the v18 cycle, then 1801, then 1802 for the third change of the
> >>> cycle. That's based on this history:
> >>>
> >>> git log -U0 -p src/include/catalog/pg_control.h | grep -E '^(Date|\+#define PG_CONTROL_VERSION)'
> >>
> >> Thank you for the confirmation. That makes sense to me.
> >>
> >> I'll push these patches with version bumps, barring any objections or
> >> further comments.
> >
> > Pushed.
>
> Is there a reason why the pg_controldata and pg_resetwal output are
> "Default char *data* signedness", while the rest of the patch and
> description just says "char signedness"? The word "data" doesn't mean
> anything here, does it?

I wanted to refer to the word "data" here to the relation data stored
as "char" type (without explicit signedness) into the database
cluster. But I admit some inconsistency. While pg_controldata outputs
"Default char data signedness", pg_control_init() SQL function outputs
it as default_char_signedness.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-03-19 20:51:53 Re: making EXPLAIN extensible
Previous Message Andrei Lepikhov 2025-03-19 20:37:23 Re: making EXPLAIN extensible