| From: | solai v <solai(dot)cdac(at)gmail(dot)com> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | wbernbaum(at)dwdev(dot)com, Andreas Karlsson <andreas(at)proxel(dot)se>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Fix pg_dump emitting OVERRIDING SYSTEM VALUE for tables with dropped identity columns |
| Date: | 2026-09-10 09:37:56 |
| Message-ID: | CAF0whucw-FBYpnTzanR7v3n1zSHff6cjv6n6sZ5perLLN68GCg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi William and everyone,
I was able to reproduce the reported issue on an unpatched PostgreSQL
20devel build.
I used the following scenario:
-Created a table with a GENERATED ALWAYS AS IDENTITY column.
-Inserted a row.
-Dropped the identity column.
-Added the primary key on the remaining columns.
-Ran pg_dump --data-only --inserts.
With the unpatched build, pg_dump produced:
INSERT INTO public.demo OVERRIDING SYSTEM VALUE VALUES (1, 2);
even though the table no longer had an identity column.
I then applied the v2 patch:
v2-0001-pg_dump-Don-t-emit-OVERRIDING-SYSTEM-VALUE-for-dr.patch
The patch applied cleanly, and git diff --check reported no issues.
After rebuilding PostgreSQL, I ran the same pg_dump command again.
This time the output was:
INSERT INTO public.demo VALUES (1, 2);
The OVERRIDING SYSTEM VALUE clause was no longer emitted.
So, based on this test, the patch fixes the reported behavior.
I will also run the added regression tests in
src/bin/pg_dump/t/002_pg_dump.pl to verify the test coverage.
Thanks for the patch and for the clear reproduction case.
Regards,
solai
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2026-09-10 09:41:04 | Re: PGQ catalog representation and pg_dump support |
| Previous Message | Chao Li | 2026-09-10 09:37:52 | Re: Review items for EXCEPT TABLE publication |