Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths
От
Matthias van de Meent
Тема
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths
Дата
Msg-id
CAEze2Wg2eOQjddyB=+Nh=Jk45iDjNqLoT2Xn_XQn6y0F08RioQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Heikki Linnakangas <hlinnaka@iki.fi>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Andres Freund <andres@anarazel.de>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Andres Freund <andres@anarazel.de>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths David Zhang <david.zhang@highgo.ca>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths David Zhang <david.zhang@highgo.ca>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths David Zhang <david.zhang@highgo.ca>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Heikki Linnakangas <hlinnaka@iki.fi>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Andres Freund <andres@anarazel.de>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Ian Lawrence Barwick <barwick@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Andres Freund <andres@anarazel.de>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Michael Paquier <michael@paquier.xyz>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Andres Freund <andres@anarazel.de>
Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths Robert Haas <robertmhaas@gmail.com>
On Tue, 21 Jun 2022 at 03:45, Michael Paquier wrote: > + /* > + * Ensure that xlogreader.c can read the record by ensuring that the > + * data section of the WAL record can be allocated. > + */ > + if (unlikely(!AllocSizeIsValid(total_len))) > + XLogErrorDataLimitExceeded(); > > By the way, while skimming through the patch, the WAL reader seems to > be a bit more pessimistic than this estimation, calculating the amount > to allocate as of DecodeXLogRecordRequiredSpace(), based on the > xl_tot_len given by a record. I see, thanks for notifying me about that. PFA a correction for that issue. It does copy over the value for MaxAllocSize from memutils.h into xlogreader.h, because we need that value in FRONTEND builds too, and memutils.h can't be included in FRONTEND builds. One file suffixed with .backpatch that doesn't include the function signature changes, but it is not optimized for any stable branch[15]. -Matthias PS. I'm not amused by the double copy we do in the xlogreader, as I had expected we'd just read the record and point into that single xl_rec_len-sized buffer. Apparently that's not how it works... [15] it should apply to stable branches all the way back to REL_15_STABLE and still work as expected. Any older than that I haven't tested, but probably only require some updates for XLogRecMaxLength in xlogreader.h.
В списке pgsql-hackers по дате отправления
От: David G. Johnston
Дата: