Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API
От
Álvaro Herrera
Тема
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API
Дата
Msg-id
ah2296X21zeqsylc@alvherre.pgsql
Ответ на
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API (Álvaro Herrera)
Список
Дерево обсуждения
BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API PG Bug reporting form <noreply@postgresql.org>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Álvaro Herrera <alvherre@kurilemu.de>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Álvaro Herrera <alvherre@kurilemu.de>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Никита Калинин <n.kalinin@postgrespro.ru>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Álvaro Herrera <alvherre@kurilemu.de>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Antonin Houska <ah@cybertec.at>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Alvaro Herrera <alvherre@kurilemu.de>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Antonin Houska <ah@cybertec.at>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Srinath Reddy Sadipiralla <srinath2133@gmail.com>
RE: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Alvaro Herrera <alvherre@kurilemu.de>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Alvaro Herrera <alvherre@kurilemu.de>
Re: BUG #19500: pgrepack logical decoding plugin can crash assert builds via SQL decoding API Srinath Reddy Sadipiralla <srinath2133@gmail.com>
On 2026-May-29, Álvaro Herrera wrote: > On 2026-05-28, PG Bug reporting form wrote: > > > It appears that the pgrepack output plugin is accessible through the > > SQL logical decoding API, even though the plugin code explicitly > > indicates that this interface is not supported. Reading changes from > > such a slot can cause a backend process crash in builds with asserts > > enabled. > > Yeah, I would like to have a way to prevent this, if only for > user-friendliness, but it's not terribly pressing since only a role > with REPLICATION privs can create the replication slot, which as I > recall are already pretty powerful. How about something like this? It makes your test case throw an error instead of failing the assertion, which I suppose is an improvement. The patch is a bit noisy because I moved more code than the minimum necessary; but the gist of it is that we allocate RepackDecodingState in repack_startup(), then have repack_setup_logical_decoding() fill in a magic number, which we later check in repack_begin_txn(). This is a bit wasteful, because we have to do that check once for each and every transaction; however I see no other callback that would let us do this kind of check after the slot is created but before we start to consume from it. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Before you were born your parents weren't as boring as they are now. They got that way paying your bills, cleaning up your room and listening to you tell them how idealistic you are." -- Charles J. Sykes' advice to teenagers
В списке pgsql-bugs по дате отправления