Re: Potential data loss due to race condition during logical replication slot creation
От | Amit Kapila |
---|---|
Тема | Re: Potential data loss due to race condition during logical replication slot creation |
Дата | |
Msg-id | CAA4eK1KyUUSO9gYKukcwqcgrFWtyuZsfkspjMriKv4uQ_9WZRQ@mail.gmail.com обсуждение исходный текст |
Ответ на | RE: Potential data loss due to race condition during logical replication slot creation ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>) |
Ответы |
RE: Potential data loss due to race condition during logical replication slot creation
Re: Potential data loss due to race condition during logical replication slot creation |
Список | pgsql-bugs |
On Wed, Mar 13, 2024 at 3:17 PM Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> wrote: > > > Attached patch implemented the approach a) since no one made. I also added > > the test which can do assertion failure, but not sure it should be included. > I feel setting "needs_full_snapshot" to true for decoding means the snapshot will start tracking non-catalog committed xacts as well which is costly. See SnapBuildCommitTxn(). Can we avoid this problem if we would have list of all running xacts when we serialize the snapshot by not decoding any xact whose xid lies in that list? If so, one idea to achieve could be that we maintain the highest_running_xid while serailizing the snapshot and then during restore if that highest_running_xid is <= builder->initial_xmin_horizon, then we ignore restoring the snapshot. We already have few such cases handled in SnapBuildRestore(). -- With Regards, Amit Kapila.
В списке pgsql-bugs по дате отправления: