Re: Avoid distributing new catalog snapshot again for the transaction being decoded.
От | Amit Kapila |
---|---|
Тема | Re: Avoid distributing new catalog snapshot again for the transaction being decoded. |
Дата | |
Msg-id | CAA4eK1L9-gQUfvhUpVvdeGgVap0EhO6+fJvnu0_HevNkbmNs7g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Avoid distributing new catalog snapshot again for the transaction being decoded. (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>) |
Ответы |
RE: Avoid distributing new catalog snapshot again for the transaction being decoded.
|
Список | pgsql-hackers |
On Fri, Nov 25, 2022 at 5:30 PM Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> wrote: > > Hi Hou, > Thanks for the patch. With a simple condition, we can eliminate the > need to queueing snapshot change in the current transaction and then > applying it. Saves some memory and computation. This looks useful. > > When the queue snapshot change is processed in > ReorderBufferProcessTXN(), we call SetupHistoricSnapshot(). But I > didn't find a path through which SetupHistoricSnapshot() is called > from SnapBuildCommitTxn(). > It will be called after SnapBuildCommitTxn() via ReorderBufferCommit()->ReorderBufferReplay()->ReorderBufferProcessTXN(). But, I think what I don't see is how the snapshot we build in SnapBuildCommitTxn() will be assigned as a historic snapshot. We assign base_snapshot as a historic snapshot and the new snapshot we build in SnapBuildCommitTxn() is assigned as base_snapshot only if the same is not set previously. I might be missing something but if that is true then I don't think the patch is correct, OTOH I would expect some existing tests to fail if this change is incorrect. -- With Regards, Amit Kapila.
В списке pgsql-hackers по дате отправления: