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/
v2-0001-reindexdb-Fix-schema-name-lookup-in-parallel-mode.patch
Description: v2-0001-reindexdb-Fix-schema-name-lookup-in-parallel-mode.patch
