Re: pg_upgrade and publication/subscription problem - Mailing list pgsql-hackers

From Marcos Pegoraro
Subject Re: pg_upgrade and publication/subscription problem
Date
Msg-id CAB-JLwZg8ysfmGbVvjWYhUqEOYmEvO8Aok3UMFj=t+rssGhtfg@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade and publication/subscription problem  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: pg_upgrade and publication/subscription problem
List pgsql-hackers
On thinking about this point again, it is not clear to me why that
would matter for this particular use case? Basically, when you create
a new subscription, it should copy the entire existing data from the
table directly and then will decode changes from WAL. So, I think in
your case all the changes between pg_upgrade and now should be
directly copied from tables, so probably older WAL won't be required.

Maybe you did not understand
Production server cannot stop while I  upgrade my subscriber server, so it will be creating WAL continuously.

Subscriber server has trigger functions for auditing on all tables, something like ...
insert into auditable(schemaname, tablename, primarykey, operation, olddata, newdata) values(tg_table_schema, tg_table_name, getpk(new), tg_op, row_to_json(old), row_to_json(new))

Then, all changes between pg_upgrade and now will not be inserted into auditable.

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: row filtering for logical replication
Next
From: Marcos Pegoraro
Date:
Subject: Re: Commitfest 2021-11 Patch Triage - Part 1