]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix compilation on Windows with WAL_DEBUG
authorMichael Paquier <michael@paquier.xyz>
Wed, 6 Dec 2023 05:11:44 +0000 (14:11 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 6 Dec 2023 05:11:44 +0000 (14:11 +0900)
This has been broken since b060dbe0001a that has reworked the callback
mechanism of XLogReader, most likely unnoticed because any form of
development involving WAL happens on platforms where this compiles fine.

Author: Bharath Rupireddy
Discussion: https://postgr.es/m/CALj2ACVF14WKQMFwcJ=3okVDhiXpuK5f7YdT+BdYXbbypMHqWA@mail.gmail.com
Backpatch-through: 13

src/backend/access/transam/xlog.c

index 59f94b05d4afdba486e9a3aaa0e25aef77fb9e5b..9795ce716223e690574b01a5fba9d8d50abe7d33 100644 (file)
@@ -974,8 +974,10 @@ XLogInsertRecord(XLogRecData *rdata,
 
                if (!debug_reader)
                        debug_reader = XLogReaderAllocate(wal_segment_size, NULL,
-                                                                                         XL_ROUTINE(), NULL);
-
+                                                                                         XL_ROUTINE(.page_read = NULL,
+                                                                                                                .segment_open = NULL,
+                                                                                                                .segment_close = NULL),
+                                                                                         NULL);
                if (!debug_reader)
                {
                        appendStringInfoString(&buf, "error decoding record: out of memory while allocating a WAL reading processor");