Re: Reset the output buffer after sending from WalSndWriteData
От | Masahiko Sawada |
---|---|
Тема | Re: Reset the output buffer after sending from WalSndWriteData |
Дата | |
Msg-id | CAD21AoAD_B2yjDwpg5Xvi_evmO_Lm=MinpbZT-soWxuqRWomKQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Reset the output buffer after sending from WalSndWriteData (Markus Wanner <markus.wanner@enterprisedb.com>) |
Ответы |
Re: Reset the output buffer after sending from WalSndWriteData
|
Список | pgsql-hackers |
On Thu, Feb 20, 2025 at 12:50 PM Markus Wanner <markus.wanner@enterprisedb.com> wrote: > > Hi, > > I recently stumbled over an issue with an unintentional re-transmission. > While this clearly was our fault in the output plugin code, I think the > walsender's exposed API could easily be hardened to prevent the bad > consequence from this mistake. > > Does anything speak against the attached one line patch? According to the documentation[1], OutputPluginPrepareWrite() has to be called before OutputPluginWrite(). When it comes to walsender codes, we reset the ctx->out buffer in WalSndPrepareWrite() called via OutputPluginPrepareWrite(). Could you share the case where you faced the unintentional re-transmission error? Regards, [1] https://www.postgresql.org/docs/devel/logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-PLUGIN-OUTPUT -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: