Re: BUG #17720: pg_dump creates a dump with primary key that cannot be restored, when specifying 'using index ...'

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, "David G. Johnston" <david.g.johnston@gmail.com>, "zedaardv@drizzle.com" <zedaardv@drizzle.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2022-12-16T16:12:17Z
Lists: pgsql-bugs
Daniel Gustafsson <daniel@yesql.se> writes:
> The attached removes the change from pg_dump and only prohibits the ALTER TABLE
> command for attaching the index.  Since it will render dumps unable to be
> restored I also added a check to pg_upgrade to cover the case.

That doesn't seem like a great answer.  I understood Peter to be
favoring both aspects of the previous patch.

			regards, tom lane



Commits

  1. Disallow NULLS NOT DISTINCT indexes for primary keys