From: | li jie <ggysxcq(at)gmail(dot)com> |
---|---|
To: | Zheng Li <zhengli10(at)gmail(dot)com> |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, rajesh singarapu <rajesh(dot)rs0541(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Support logical replication of DDLs |
Date: | 2022-11-28 03:27:03 |
Message-ID: | CAGfChW7-qMXzgVH18b1vpetXV1A8-M0g7VHPwqyRbb9YarTtRA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
>
>
> All three commands are captured by the event trigger. The first and
> second command ends up getting deparsed, WAL-logged and
> replayed on the subscriber. The replay of the ALTER TABLE command
> causes a duplicate constraint error. The problem is that
> while subcommands are captured by event triggers by default, they
> don't need to be deparsed and WAL-logged for DDL replication.
> To do that we can pass the isCompleteQuery variable in
> ProcessUtilitySlow to EventTriggerCollectSimpleCommand() and
> EventTriggerAlterTableEnd() and make this information available in
> CollectedCommand so that any subcommands can be skipped.
>
May not be able to skip any subcommands.
like ' ALTER TABLE ctlt1_like ALTER COLUMN b SET STORAGE EXTERNAL;'
It cannot be represented in the CREATE TABLE statement.
Regards, Adger
From | Date | Subject | |
---|---|---|---|
Next Message | Zheng Li | 2022-11-28 03:28:57 | Re: Support logical replication of DDLs |
Previous Message | David Rowley | 2022-11-28 00:16:29 | Re: Postgres upgrade 12 - issues with OIDs |
From | Date | Subject | |
---|---|---|---|
Next Message | Zheng Li | 2022-11-28 03:28:57 | Re: Support logical replication of DDLs |
Previous Message | Michael Paquier | 2022-11-28 02:54:45 | Re: Remove a unused argument from qual_is_pushdown_safe |