From: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RE: Conflict detection for update_deleted in logical replication |
Date: | 2025-01-07 12:34:23 |
Message-ID: | OS0PR01MB57165A42F129C7576492EB8E94112@OS0PR01MB5716.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thursday, January 2, 2025 6:34 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> Few suggestions:
> 1) If we have a subscription with detect_update_deleted option and we
> try to upgrade it with default settings(in case dba forgot to set
> track_commit_timestamp), the upgrade will fail after doing a lot of
> steps like that mentioned in ok below:
> Setting locale and encoding for new cluster ok
> Analyzing all rows in the new cluster ok
> Freezing all rows in the new cluster ok
> Deleting files from new pg_xact ok
> Copying old pg_xact to new server ok
> Setting oldest XID for new cluster ok
> Setting next transaction ID and epoch for new cluster ok
> Deleting files from new pg_multixact/offsets ok
> Copying old pg_multixact/offsets to new server ok
> Deleting files from new pg_multixact/members ok
> Copying old pg_multixact/members to new server ok
> Setting next multixact ID and offset for new cluster ok
> Resetting WAL archives ok
> Setting frozenxid and minmxid counters in new cluster ok
> Restoring global objects in the new cluster ok
> Restoring database schemas in the new cluster
> postgres
> *failure*
>
> We should detect this at an earlier point somewhere like in
> check_new_cluster_subscription_configuration and throw an error from
> there.
>
> 2) Also should we include an additional slot for the
> pg_conflict_detection slot while checking max_replication_slots.
> Though this error will occur after the upgrade is completed, it may be
> better to include the slot during upgrade itself so that the DBA need
> not handle this error separately after the upgrade is completed.
Thanks for the comments!
I added the suggested changes but didn't add more tests to verify each error
message in this version, because it seems a rare case to me, so I am not sure
if it's worth increasing the testing time for these errors. But I am OK to add
if people think it's worth the effort and I will also test this locally.
Best Regards,
Hou zj
From | Date | Subject | |
---|---|---|---|
Next Message | Zhijie Hou (Fujitsu) | 2025-01-07 12:49:55 | RE: Conflict detection for update_deleted in logical replication |
Previous Message | Zhijie Hou (Fujitsu) | 2025-01-07 12:33:56 | RE: Conflict detection for update_deleted in logical replication |