Re: BUG #17756: Invalid replica indentity set order in a dump

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: sergey.belyashov@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2023-01-20T15:42:10Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow REPLICA IDENTITY to be set on an index that's not (yet) valid.

PG Bug reporting form <noreply@postgresql.org> writes:
> Some database have a partitioned table with unique index used as REPLICA
> IDENTITY. pg_dump places ALTER TABLE tbl REPLICA IDENTITY USING INDEX
> some_idx after partial index creation. But Postgresql fails to restore such
> dump because replica identity cannot be set on invalid index some_idx:
> partition indices are not created.

Please provide a concrete example, preferably a SQL script to create
a database that triggers the problem.  There are enough variables
here that nobody is likely to be excited about trying to reverse-
engineer a test case from only this amount of detail.

			regards, tom lane