RE: Support logical replication of DDLs - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject RE: Support logical replication of DDLs
Date
Msg-id OS0PR01MB57169A7CC0514D86BA9362D894A79@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Support logical replication of DDLs  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Wed, Feb 15, 2023 at 13:57 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Fri, Feb 10, 2023 at 8:23 PM Masahiko Sawada 
> <sawada.mshk@gmail.com>
> wrote:
> >
> > On Thu, Feb 9, 2023 at 6:55 PM Ajin Cherian <itsajin@gmail.com> wrote:
> > >
> > (v67)
> >
> > I have some questions about adding the infrastructure for DDL deparsing.
> >
> > Apart from the changes made by 0001 patch to add infrastructure for 
> > DDL deparsing, 0002 patch seems to add some variables that are not 
> > used in 0002 patch:
> >
> > @@ -2055,6 +2055,7 @@ typedef struct AlterTableStmt
> >         List       *cmds;                       /* list of subcommands */
> >         ObjectType      objtype;                /* type of object */
> >         bool            missing_ok;             /* skip error if table
> > missing */
> > +       bool        table_like;         /* internally generated for
> > TableLikeClause */
> >  } AlterTableStmt;
> >
> > @@ -39,6 +40,7 @@ typedef struct CollectedATSubcmd  {
> >         ObjectAddress address;          /* affected column,
> > constraint, index, ... */
> >         Node       *parsetree;
> > +       char       *usingexpr;
> >  } CollectedATSubcmd;
> >
> >  typedef struct CollectedCommand
> > @@ -62,6 +64,7 @@ typedef struct CollectedCommand
> >                 {
> >                         Oid                     objectId;
> >                         Oid                     classId;
> > +                       bool            rewrite;
> >                         List       *subcmds;
> >                 }                       alterTable;
> >
> > These three variables are used in 0006 patch.
> >
> 
> Hmm, then it should be better to move these to 0006 patch.

Makes sense. Because the variables "table_like" and "usingexpr" are used in 0002 patch,
so I only moved "rewrite" to 0006 patch.

Best Regards,
Hou zj

pgsql-hackers by date:

Previous
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: Support logical replication of DDLs
Next
From: Tomas Vondra
Date:
Subject: Re: Ignoring BRIN for HOT updates (was: -udpates seems broken)