Re: Proposal: Conflict log history table for Logical Replication - Mailing list pgsql-hackers

From Peter Smith
Subject Re: Proposal: Conflict log history table for Logical Replication
Date
Msg-id CAHut+PtE6TgoxYcKGB++TR_XRZmRUcHXq5VGyAOQfxhprkpapw@mail.gmail.com
Whole thread
In response to Re: Proposal: Conflict log history table for Logical Replication  (Shlok Kyal <shlok.kyal.oss@gmail.com>)
Responses RE: [Bug] pg_upgrade could fail for non-superuser subscriptions using foreign servers
List pgsql-hackers
On Wed, May 20, 2026 at 8:50 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
..
> Comments for 0002:
> 2. We can rename the schema pg_conflict to a different schema name.
> Is it ok to hardcode the schema name to 'pg_conflict'?
> -                errmsg("cannot move objects into or out of CONFLICT schema")));
> +                errmsg("cannot move objects into or out of
> pg_conflict schema")));
>
> Example:
> postgres=# ALTER SCHEMA pg_conflict RENAME TO sc1;
> ALTER SCHEMA
> postgres=# ALTER TABLE t2 SET SCHEMA sc1;
> ERROR:  cannot move objects into or out of pg_conflict schema
>

Yikes!

I am not sure that the error message is the problem here. There are
worse things that are similar to this. e.g. I found that you can do
the same trick of renaming the 'pg_catalog' schema, and it breaks
anything that refers to that schema by name -- all the internal SQL!!

test_pub=# ALTER SCHEMA pg_catalog RENAME TO mycatalog;
ALTER SCHEMA
test_pub=# \dRp+
ERROR:  relation "pg_catalog.pg_publication" does not exist
LINE 9: FROM pg_catalog.pg_publication
             ^

======
Kind Regards,
Peter Smith.
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: PSQL - prevent describe listing tables that are already in listed schemas
Next
From: Dave Cramer
Date:
Subject: Patch for bind message regarding the number of parameters and result column format codes