From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joe Conway <mail(at)joeconway(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, 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-02-19 18:48:29 |
Message-ID: | CAD21AoDDii+bEQbRQi6X720-RUwqH7rA7FRSqOGuwouwKfJD9g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Feb 18, 2025 at 3:23 PM Noah Misch <noah(at)leadboat(dot)com> wrote:
>
> Apart from two doc issues, this is ready:
>
> On Tue, Feb 18, 2025 at 01:23:20PM -0800, Masahiko Sawada wrote:
> > On Mon, Feb 17, 2025 at 2:57 PM Noah Misch <noah(at)leadboat(dot)com> wrote:
> > > On Fri, Jan 17, 2025 at 05:11:41PM -0800, Masahiko Sawada wrote:
>
> > + However, when upgrading from <productname>PostgreSQL</productname> 17 or,
> > + earlier <application>pg_upgrade</application> adopts the char signedness
>
> s/or, earlier/or earlier,/
>
> > --- a/doc/src/sgml/ref/pg_resetwal.sgml
> > +++ b/doc/src/sgml/ref/pg_resetwal.sgml
> > @@ -171,6 +171,22 @@ PostgreSQL documentation
> > </para>
> >
> > <variablelist>
> > + <varlistentry>
> > + <term><option>--char-signedness=<replaceable class="parameter">option</replaceable></option></term>
> > + <listitem>
> > + <para>
> > + Manually set the default char signedness. Possible values are
> > + <literal>signed</literal> and <literal>unsigned</literal>.
> > + </para>
> > + <para>
> > + A safe value for this option is, if known, the default char signedness
> > + of the platform where the database cluster was initialized. However,
>
> Only if initialized on v17 or earlier. I recommend this edit:
>
> diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml
> index a72678d..dd011d2 100644
> --- a/doc/src/sgml/ref/pg_resetwal.sgml
> +++ b/doc/src/sgml/ref/pg_resetwal.sgml
> @@ -179,8 +179,11 @@ PostgreSQL documentation
> <literal>signed</literal> and <literal>unsigned</literal>.
> </para>
> <para>
> - A safe value for this option is, if known, the default char signedness
> - of the platform where the database cluster was initialized. However,
> + For a database cluster that <command>pg_upgrade</command> upgraded from
> + a <productname>PostgreSQL</productname> version before 18, the safe
> + value would be the default <type>char</type> signedness of the platform
> + that ran the cluster before that upgrade. For all other
> + clusters, <literal>signed</literal> would be the safe value. However,
> this option is exclusively for use with <command>pg_upgrade</command>
> and should not normally be used manually.
> </para>
Thank you for reviewing the patches. I've fixed these issues and
attached the updated patches.
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. If we need, can
we bump it to 1800? or 1701?
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v5-0002-pg_resetwal-Add-char-signedness-option-to-change-.patch | application/x-patch | 5.4 KB |
v5-0005-Fix-an-issue-with-index-scan-using-pg_trgm-due-to.patch | application/x-patch | 4.3 KB |
v5-0003-pg_upgrade-Preserve-default-char-signedness-value.patch | application/x-patch | 8.6 KB |
v5-0001-Add-default_char_signedness-field-to-ControlFileD.patch | application/x-patch | 8.8 KB |
v5-0004-pg_upgrade-Add-set-char-signedness-to-set-the-def.patch | application/x-patch | 9.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2025-02-19 19:10:44 | Re: AIO v2.4 |
Previous Message | Pavel Stehule | 2025-02-19 18:32:04 | Re: missing assert in makeString |