Re: [PATCH] reindexdb: Fix schema name lookup in parallel mode

From: "Koshi Shibagaki (Fujitsu)" <shibagaki(dot)koshi(at)fujitsu(dot)com>
To: João Rito <joaovictor(dot)rito(at)gmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] reindexdb: Fix schema name lookup in parallel mode
Date: 2026-11-10 12:49:42
Message-ID: TY5PR01MB1844575BDDB2E1B415E75A094FA722@TY5PR01MB18445.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi João,

Thank you for the thorough testing and detailed review.

>1. The new quoted-name test uses '"s1"', which is all lower case,
> so it never exercises a name that needs the quotes to keep its
> case, which is the case from the original report. A mixed-case
> schema (e.g. "S1x", passed as -S '"S1x"') would cover it.
I agree that the quoted-schema-name test should use a name whose
case is preserved only when quoted. In v2, I added the mixed-case
schema "S1x" and a table in it, and changed the test to pass
-S '"S1x"'.

>2. The comment says "makes a nonexistent schema an error, even if
> there are no tables". Fine, but the same lookup is also what
> makes -S TestSchema an error when only "TestSchema" exists; a
> short mention could help.

I left the comment unchanged. The existing comment says that each
schema name is resolved as an identifier rather than compared
literally with nspname. I think this already covers case folding, so
an additional mixed-case example there seemed redundant.

The v2 patch is attached.

Separately, I think this fix may be worth backpatching. The -j option
was introduced in PostgreSQL 13, so this issue also affects older
branches. Given that PostgreSQL 14 is scheduled to reach EOL on
November 12, would backpatching this through PostgreSQL 15 be
appropriate?

Regards,

Koshi Shibagaki
FUJITSU LIMITED
https://www.fujitsu.com/

Attachment Content-Type Size
v2-0001-reindexdb-Fix-schema-name-lookup-in-parallel-mode.patch application/octet-stream 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joao Rito 2026-11-10 13:01:04 Re: Wrong result for whole-row IS NOT NULL with dropped columns
Previous Message Jim Jones 2026-11-10 12:29:20 XMLElement() and XMLForest() embed the XML declaration of xml arguments