From: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
---|---|
To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
Cc: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com> |
Subject: | Re: promotion related handling in pg_sync_replication_slots() |
Date: | 2024-04-18 12:06:05 |
Message-ID: | CAJpy0uA4td+ye1o7BiXJmEExrBtBbgFE5AK4Gg9zSyJwAnF0Qw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Apr 18, 2024 at 12:35 PM shveta malik <shveta(dot)malik(at)gmail(dot)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
Attachment | Content-Type | Size |
---|---|---|
v8-0001-Handle-stopSignaled-during-sync-function-call.patch | application/octet-stream | 14.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ranier Vilela | 2024-04-18 12:07:43 | Re: plenty code is confused about function level static |
Previous Message | Aleksander Alekseev | 2024-04-18 12:00:09 | Re: [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS |