Re: promotion related handling in pg_sync_replication_slots()
shveta malik <shveta.malik@gmail.com>
From: shveta malik <shveta.malik@gmail.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>,
Amit Kapila <amit.kapila16@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>,
shveta malik <shveta.malik@gmail.com>
Date: 2024-04-18T12:06:05Z
Lists: pgsql-hackers
Attachments
- v8-0001-Handle-stopSignaled-during-sync-function-call.patch (application/octet-stream) patch v8-0001
On Thu, Apr 18, 2024 at 12:35 PM shveta malik <shveta.malik@gmail.com> wrote: > > To fix above issues, these changes have been made in v7: Please find v8 attached. Changes are: 1) It fixes ShutDownSlotSync() issue, where we perform kill(SlotSyncCtx->pid). There are chances that after we release spin-lock and before we perform kill, slot-sync worker has error-ed out and has set SlotSyncCtx->pid to InvalidPid (-1) already. And thus kill(-1) could result in abnormal process kills on some platforms. Now, we get pid under spin-lock and then use it to perform kill to avoid pid=-1 kill. This is on a similar line of how ShutdownWalRcv() does it. 2) Improved comments in code. 3) Updated commit message with new fixes. I had missed to update it in the previous version. thanks Shveta
Commits
-
Post-commit review fixes for slot synchronization.
- db08e8c6fa89 17.0 landed
-
Allow synced slots to have their inactive_since.
- 6f132ed693b6 17.0 cited