Re: Add an option to skip loading missing publication to avoid logical replication failure
От | vignesh C |
---|---|
Тема | Re: Add an option to skip loading missing publication to avoid logical replication failure |
Дата | |
Msg-id | CALDaNm0T4uP0BTQHAzsmw3EtCoq=-y4Ryww9PZTrqiZeyA80XQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Add an option to skip loading missing publication to avoid logical replication failure (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: Add an option to skip loading missing publication to avoid logical replication failure
|
Список | pgsql-hackers |
On Mon, 10 Mar 2025 at 09:33, Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Tue, Mar 4, 2025 at 6:54 PM vignesh C <vignesh21@gmail.com> wrote: > > > > On further thinking, I felt the use of publications_updated variable > > is not required we can use publications_valid itself which will be set > > if the publication system table is invalidated. Here is a patch for > > the same. > > > > The patch relies on the fact that whenever a publication's data is > invalidated, it will also invalidate all the RelSyncEntires as per > publication_invalidation_cb. But note that we are discussing removing > that inefficiency in the thread [1]. So, we should try to rebuild the > entry when we have skipped the required publication previously. > > Apart from this, please consider updating the docs, as mentioned in my > response to Sawada-San's email. The create subscription documentation already has "We allow non-existent publications to be specified so that users can add those later. This means pg_subscription can have non-existent publications." and should be enough at [1]. Let me know if we need to add more documentation. Apart from this I have changed the log level that logs "skipped loading publication" to WARNING as we log a warning "WARNING: publications "pub2", "pub3" do not exist on the publisher" in case of CREATE SUBSCRIPTION and looked similar to this. I can change it to a different log level in case you feel this is not the right level. Also I have added a test case for dilip's comment from [2]. The attached v7 version patch has the changes for the same. [1] - https://www.postgresql.org/docs/devel/sql-createsubscription.html [2] - https://www.postgresql.org/message-id/CAFiTN-tgUR6QLSs3UHK7gx4VP7cURGNkufA_xkrQLw9eCnbGQw%40mail.gmail.com Regards, Vignesh
Вложения
В списке pgsql-hackers по дате отправления: