Re: Wrong comment for ReplicationSlotCreate
| От | Daniil Davydov |
|---|---|
| Тема | Re: Wrong comment for ReplicationSlotCreate |
| Дата | |
| Msg-id | CAJDiXghEf_BviOC9Ci-it2p1v0DOa+0yqfCyBV89rXSkcd-5JA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Wrong comment for ReplicationSlotCreate (Chao Li <li.evan.chao@gmail.com>) |
| Ответы |
Re: Wrong comment for ReplicationSlotCreate
|
| Список | pgsql-hackers |
Hi, On Tue, Dec 30, 2025 at 4:18 PM Chao Li <li.evan.chao@gmail.com> wrote: > > But I think the updated version is too simple. It loses the information that enabling two_phase later can result in missingPREPARE. > > So, I would suggest something like: > ``` > * two_phase: If enabled, allows decoding of prepared transactions. > * Note that enabling this option after decoding has already advanced > * may result in missing PREPARE records for transactions that were > * prepared before the option was enabled. > > ``` Thanks for the review! As far as I understand, if the publisher prepares a transaction and then subscriber tries to create a subscription, walsender will wait until the prepared transaction is finished (during execution of CREATE_REPLICATION_SLOT command). We can find this logic inside the SnapBuildFindSnapshot function. Thus, we cannot miss any PREPARE record for the created slot. Am I missing something? -- Best regards, Daniil Davydov
В списке pgsql-hackers по дате отправления: