Fix updating of pg_subscription_rel from workers
Peter Eisentraut <peter_e@gmx.net>
Fix updating of pg_subscription_rel from workers A logical replication worker should not insert new rows into pg_subscription_rel, only update existing rows, so that there are no races if a concurrent refresh removes rows. Adjust the API to be able to choose that behavior. Author: Masahiko Sawada <sawada.mshk@gmail.com> Reported-by: tushar <tushar.ahuja@enterprisedb.com>
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/pg_subscription.c | modified | +9 −4 |
| src/backend/commands/subscriptioncmds.c | modified | +2 −2 |
| src/backend/replication/logical/tablesync.c | modified | +7 −4 |
| src/include/catalog/pg_subscription_rel.h | modified | +1 −1 |