Re: Map WAL segment files on PMEM as WAL buffers - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Map WAL segment files on PMEM as WAL buffers
Date
Msg-id 20220106040000.GU14051@telsasoft.com
Whole thread Raw
In response to Re: Map WAL segment files on PMEM as WAL buffers  (Takashi Menjo <takashi.menjo@gmail.com>)
Responses Re: Map WAL segment files on PMEM as WAL buffers
List pgsql-hackers
The cfbot showed issues compiling on linux and windows.
http://cfbot.cputube.org/takashi-menjo.html

https://cirrus-ci.com/task/6125740327436288
[02:30:06.538] In file included from xlog.c:38:
[02:30:06.538] ../../../../src/include/access/xlogpmem.h:32:42: error: unknown type name ‘tli’
[02:30:06.538]    32 | PmemXLogEnsurePrevMapped(XLogRecPtr ptr, tli)
[02:30:06.538]       |                                          ^~~
[02:30:06.538] xlog.c: In function ‘GetXLogBuffer’:
[02:30:06.538] xlog.c:1959:19: warning: implicit declaration of function ‘PmemXLogEnsurePrevMapped’
[-Wimplicit-function-declaration]
[02:30:06.538]  1959 |    openLogSegNo = PmemXLogEnsurePrevMapped(endptr, tli);

https://cirrus-ci.com/task/6688690280857600?logs=build#L379
[02:33:25.752] c:\cirrus\src\include\access\xlogpmem.h(33,1): error C2081: 'tli': name in formal parameter list illegal
(compilingsource file src/backend/access/transam/xlog.c) [c:\cirrus\postgres.vcxproj]
 

I'm attaching a probable fix.  Unfortunately, for patches like this, most of
the functionality isn't exercised unless the library is installed and
compilation and runtime are enabled by default.

In 0009: recaluculated => recalculated

0010-Update-document should be squished with 0003-Add-wal_pmem_map-to-GUC (and
maybe 0002 and 0001).  I believe the patches after 0005 are more WIP, so it's
fine if they're not squished yet.  I'm not sure what the point is of this one:
0008-Let-wal_pmem_map-be-constant-unl

+               ereport(ERROR,
+                               (errcode_for_file_access(),
+                                errmsg("could not pmem_map_file \"%s\": %m", path)));

=> The outer parenthesis are not needed since e3a87b4.

Attachment

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: ICU for global collation
Next
From: Dilip Kumar
Date:
Subject: Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes