Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION

Поиск
Список
Период
Сортировка
Искать
От
Amit Kapila
Тема
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION
Дата
Msg-id
CAA4eK1LEorJDsiUPYtuoP+tpNe0-zTrm4s4pROQey3a1LJcf2g@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
RE: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Amit Kapila <amit.kapila16@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
On Thu, Jan 14, 2021 at 6:02 PM japin  wrote:
>
> On Thu, 14 Jan 2021 at 20:19, Bharath Rupireddy wrote:
> > On Thu, Jan 14, 2021 at 5:36 PM Li Japin  wrote
> >> Do we really need to access PUBLICATIONRELMAP in this patch? What if
> >> we just set it to false in the else condition of (if (publish &&
> >> (relkind != RELKIND_PARTITIONED_TABLE || pub->pubviaroot)))
> >>
> >> Thank for you review. I agree with you, it doesn’t need to access PUBLICATIONRELMAP, since
> >> We already get the publication oid in GetRelationPublications(relid) [1], which also access
> >> PUBLICATIONRELMAP.  If the current pub->oid does not in pubids, the publish is false, so we
> >> do not need publish the table.
> >
> > +1. This is enough.
> >
> >> I have another question, the data->publications is a list, when did it has more then one items?
> >
> > IIUC, when the single table is associated with multiple publications,
> > then data->publications will have multiple entries. Though I have not
> > tried, we can try having two or three publications for the same table
> > and verify that.
> >
>
> I try add one table into two publications, but the data->publications has only
> one item.  Is there something I missed?
>

I think you will have multiple publications in that list when the
subscriber has subscribed to multiple publications. For example,
Create Subscription ... Publication pub1, Publication pub2.

-- 
With Regards,
Amit Kapila.


В списке pgsql-hackers по дате отправления
От: Heikki Linnakangas
Дата:
Сообщение: Re: profiling
FAQ