Re: Support logical replication of DDLs

Поиск
Список
Период
Сортировка
От vignesh C
Тема Re: Support logical replication of DDLs
Дата
Msg-id CALDaNm0TXZ7VfN5gfKk55CVqyuDW75NTQPtPa3X9MY8zP76g2Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Support logical replication of DDLs  (shveta malik <shveta.malik@gmail.com>)
Ответы RE: Support logical replication of DDLs  ("Wei Wang (Fujitsu)" <wangw.fnst@fujitsu.com>)
Список pgsql-hackers
On Tue, 30 May 2023 at 08:23, shveta malik <shveta.malik@gmail.com> wrote:
>
> On Mon, May 29, 2023 at 6:16 PM vignesh C <vignesh21@gmail.com> wrote:
> >
>
> > >
> > > I found few comments while making some changes to the patch:
> > > 1) Now that objtree is removed, these comments should be modified:
> > >  * Deparse object tree is created by using:
> > >  * a) new_objtree("know contents") where the complete tree content is known or
> > >  *     the initial tree content is known.
> > >  * b) new_objtree("") for the syntax where the object tree will be derived
> > >  *     based on some conditional checks.
> > >  * c) new_objtree_VA where the complete tree can be derived using some fixed
> > >  *     content or by using the initial tree content along with some variable
> > >  *     arguments.
> > >  *
> >
> > Modified
> >
> > >  2) isgrant can be removed as it is not used anymore:
> > > +/*
> > > + * Return the given object type as a string.
> > > + *
> > > + * If isgrant is true, then this function is called while deparsing GRANT
> > > + * statement and some object names are replaced.
> > > + */
> > > +const char *
> > > +stringify_objtype(ObjectType objtype, bool isgrant)
> > > +{
> > > +       switch (objtype)
> > > +       {
> > > +               case OBJECT_TABLE:
> > > +                       return "TABLE";
> > > +               default:
> > > +                       elog(ERROR, "unsupported object type %d", objtype);
> > > +       }
> > > +
> > > +       return "???";                           /* keep compiler quiet */
> > > +}
> >
> > Modified
> >
> > > 3) This statement is not being handled currently, it should be implemented:
> > > "alter table all in tablespace tbs1 set tablespace"
> >
> > Modified
> >
>
> With the above fix, are the below commented tests in alter_table.sql
> supposed to work? If so, shall these be uncommented?
> -- ALTER TABLE ALL IN TABLESPACE pg_default SET TABLESPACE pg_default;
> -- ALTER TABLE ALL IN TABLESPACE pg_default OWNED BY ddl_testing_role
> SET TABLESPACE pg_default;

The attached patch has the changes for the above. I have also
uncommented another couple of tests in alter_table which was failing
because it was capturing the internally generated indexes from alter
table, I have updated deparse_drops_to_json accordingly to capture
only table related drop commands. The attached patch has the changes
for the same. The changes were done in
0008-ObjTree-Removal-for-multiple-commands-2023_05_30.patch for the
same.

Regards,
Vignesh

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Test slots invalidations in 035_standby_logical_decoding.pl only if dead rows are removed
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Large files for relations