Re: Error "initial slot snapshot too large" in create replication slot

Поиск
Список
Период
Сортировка
Искать
От
Dilip Kumar
Тема
Re: Error "initial slot snapshot too large" in create replication slot
Дата
Msg-id
CAFiTN-sPuKuxQhS9ERaUhbTc2R+YDn9q3n0TbmEO1OMXptj64w@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Error "initial slot snapshot too large" in create replication slot Dilip Kumar <dilipbalaut@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Dilip Kumar <dilipbalaut@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Dilip Kumar <dilipbalaut@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Dilip Kumar <dilipbalaut@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Dilip Kumar <dilipbalaut@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Julien Rouhaud <rjuju123@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Dilip Kumar <dilipbalaut@gmail.com>
Re: Error "initial slot snapshot too large" in create replication slot Kyotaro Horiguchi <horikyota.ntt@gmail.com>
On Mon, Jan 31, 2022 at 11:50 AM Kyotaro Horiguchi
 wrote:
>
> SnapBUildInitialSnapshot tries to store XIDS of both top and sub
> transactions into snapshot->xip array but the array is easily
> overflowed and CREATE_REPLICATOIN_SLOT command ends with an error.
>
> To fix this, this patch is doing the following things.
>
> - Use subxip array instead of xip array to allow us have larger array
>   for xids.  So the snapshot is marked as takenDuringRecovery, which
>   is a kind of abuse but largely reduces the chance of getting
>   "initial slot snapshot too large" error.
>
> - Still if subxip is overflowed, retry with excluding subtransactions
>   then set suboverflowed.  This causes XidInMVCCSnapshot (finally)
>   scans over subxip array for targetted top-level xid.
>
> We could take another way: make a !takenDuringRecovery snapshot by
> using xip instead of subxip. It is cleaner but it has far larger
> chance of needing to retry.
>
> (renamed the patch since it represented a part of the patch)
>

Thanks for the updated version. I will look into it this week.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата:
От: Michael Paquier
Дата:
FAQ