On Fri, 8 Jul 2022 at 21:35, David Zhang <david.zh...@highgo.ca> wrote: > > Hi, > > I tried to apply this patch v5 to current master branch but it complains, > "git apply --check > v5-0001-Add-protections-in-xlog-record-APIs-against-large.patch > error: patch failed: src/include/access/xloginsert.h:43 > error: src/include/access/xloginsert.h: patch does not apply" > > then I checked it out before the commit > `b0a55e43299c4ea2a9a8c757f9c26352407d0ccc` and applied this v5 patch.
The attached rebased patchset should work with master @ 2cd2569c and REL_15_STABLE @ 53df1e28. I've also added a patch that works for PG14 and earlier, which should be correct for all versions that include commit 2c03216d (that is, all versions back to 9.5). > 1) both make check and make installcheck passed. > > 2) and I can also see this patch v5 prevents the error happens previously, > > "postgres=# SELECT pg_logical_emit_message(false, long, long) FROM > repeat(repeat(' ', 1024), 1024*1023) as l(long); > ERROR: too much WAL data" > > 3) without this v5 patch, the same test will cause the standby crash > like below, and the standby not be able to boot up after this crash. Thanks for reviewing. Kind regards, Matthias van de Meent
v6-0001-Add-protections-in-xlog-record-APIs-against-large.patch
Description: Binary data
v6-0001-Add-protections-in-xlog-record-APIs-against-large.v15-patch
Description: Binary data
v6-0001-Add-protections-in-xlog-record-APIs-against-large.v14-patch
Description: Binary data