On Fri, Nov 26, 2021 at 5:47 PM Marcos Pegoraro <mar...@f10.com.br> wrote: >> >> So, in short, I think what we need to solve is to get the data from >> new tables and newly performed writes on old tables. I could think of >> the following two approaches: >> >> Approach-1: >> 1. Drop subscription and Truncate all tables corresponding to subscription. >> >> 2. Create a new subscription for the publication. > > If I drop subscription it will drop WAL ou publication side and I lost all > changed data between the starting of pg_upgrade process and now. >
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. -- With Regards, Amit Kapila.