Re: Synchronizing slots from primary to standby
| От | Peter Smith |
|---|---|
| Тема | Re: Synchronizing slots from primary to standby |
| Дата | |
| Msg-id | CAHut+Pt+Mgeq+t0XDJrtTYHY8=Zv8Whnkv4mx9mDU-_Ni6LLhw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Synchronizing slots from primary to standby (shveta malik <shveta.malik@gmail.com>) |
| Ответы |
Re: Synchronizing slots from primary to standby
|
| Список | pgsql-hackers |
I have one question about the new code in v63-0002.
======
src/backend/replication/logical/slotsync.c
1. ReplSlotSyncWorkerMain
+ Assert(SlotSyncWorker->pid == InvalidPid);
+
+ /*
+ * Startup process signaled the slot sync worker to stop, so if meanwhile
+ * postmaster ended up starting the worker again, exit.
+ */
+ if (SlotSyncWorker->stopSignaled)
+ {
+ SpinLockRelease(&SlotSyncWorker->mutex);
+ proc_exit(0);
+ }
Can we be sure a worker crash can't occur (in ShutDownSlotSync?) in
such a way that SlotSyncWorker->stopSignaled was already assigned
true, but SlotSyncWorker->pid was not yet reset to InvalidPid;
e.g. Is the Assert above still OK?
======
Kind Regards,
Peter Smith.
Fujitsu Australia
В списке pgsql-hackers по дате отправления: