Re: MultiXact\SLRU buffers configuration
Julien Rouhaud <rjuju123@gmail.com>
From: Julien Rouhaud <rjuju123@gmail.com>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Gilles Darold <gilles@darold.net>, Tomas Vondra <tomas.vondra@enterprisedb.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Alexander Korotkov <aekorotkov@gmail.com>, Anastasia Lubennikova <a.lubennikova@postgrespro.ru>, Daniel Gustafsson <daniel@yesql.se>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Thomas Munro <thomas.munro@gmail.com>
Date: 2022-01-14T09:28:38Z
Lists: pgsql-hackers
Hi,
On Sun, Dec 26, 2021 at 03:09:59PM +0500, Andrey Borodin wrote:
>
>
> PFA rebase of the patchset. Also I've added a patch to combine page_number, page_status, and page_dirty together to touch less cachelines.
The cfbot reports some errors on the latest version of the patch:
https://cirrus-ci.com/task/6121317215764480
[04:56:38.432] su postgres -c "make -s -j${BUILD_JOBS} world-bin"
[04:56:48.270] In file included from async.c:134:
[04:56:48.270] ../../../src/include/access/slru.h:47:28: error: expected identifier or ‘(’ before ‘:’ token
[04:56:48.270] 47 | typedef enum SlruPageStatus:int16_t
[04:56:48.270] | ^
[04:56:48.270] ../../../src/include/access/slru.h:53:3: warning: data definition has no type or storage class
[04:56:48.270] 53 | } SlruPageStatus;
[04:56:48.270] | ^~~~~~~~~~~~~~
[04:56:48.270] ../../../src/include/access/slru.h:53:3: warning: type defaults to ‘int’ in declaration of ‘SlruPageStatus’ [-Wimplicit-int]
[04:56:48.270] ../../../src/include/access/slru.h:58:2: error: expected specifier-qualifier-list before ‘SlruPageStatus’
[04:56:48.270] 58 | SlruPageStatus page_status;
[04:56:48.270] | ^~~~~~~~~~~~~~
[04:56:48.270] async.c: In function ‘asyncQueueAddEntries’:
[04:56:48.270] async.c:1448:41: error: ‘SlruPageEntry’ has no member named ‘page_dirty’
[04:56:48.270] 1448 | NotifyCtl->shared->page_entries[slotno].page_dirty = true;
[04:56:48.270] | ^
[04:56:48.271] make[3]: *** [<builtin>: async.o] Error 1
[04:56:48.271] make[3]: *** Waiting for unfinished jobs....
[04:56:48.297] make[2]: *** [common.mk:39: commands-recursive] Error 2
[04:56:48.297] make[2]: *** Waiting for unfinished jobs....
[04:56:54.554] In file included from clog.c:36:
[04:56:54.554] ../../../../src/include/access/slru.h:47:28: error: expected identifier or ‘(’ before ‘:’ token
[04:56:54.554] 47 | typedef enum SlruPageStatus:int16_t
[04:56:54.554] | ^
[04:56:54.554] ../../../../src/include/access/slru.h:53:3: warning: data definition has no type or storage class
[04:56:54.554] 53 | } SlruPageStatus;
[04:56:54.554] | ^~~~~~~~~~~~~~
[04:56:54.554] ../../../../src/include/access/slru.h:53:3: warning: type defaults to ‘int’ in declaration of ‘SlruPageStatus’ [-Wimplicit-int]
[04:56:54.554] ../../../../src/include/access/slru.h:58:2: error: expected specifier-qualifier-list before ‘SlruPageStatus’
[04:56:54.554] 58 | SlruPageStatus page_status;
[04:56:54.554] | ^~~~~~~~~~~~~~
[04:56:54.554] clog.c: In function ‘TransactionIdSetPageStatusInternal’:
[04:56:54.554] clog.c:396:39: error: ‘SlruPageEntry’ has no member named ‘page_dirty’
[04:56:54.554] 396 | XactCtl->shared->page_entries[slotno].page_dirty = true;
[04:56:54.554] | ^
[04:56:54.554] In file included from ../../../../src/include/postgres.h:46,
[04:56:54.554] from clog.c:33:
[04:56:54.554] clog.c: In function ‘BootStrapCLOG’:
[04:56:54.554] clog.c:716:47: error: ‘SlruPageEntry’ has no member named ‘page_dirty’
[04:56:54.554] 716 | Assert(!XactCtl->shared->page_entries[slotno].page_dirty);
[04:56:54.554] | ^
[04:56:54.554] ../../../../src/include/c.h:848:9: note: in definition of macro ‘Assert’
[04:56:54.554] 848 | if (!(condition)) \
[04:56:54.554] | ^~~~~~~~~
[04:56:54.554] clog.c: In function ‘TrimCLOG’:
[04:56:54.554] clog.c:801:40: error: ‘SlruPageEntry’ has no member named ‘page_dirty’
[04:56:54.554] 801 | XactCtl->shared->page_entries[slotno].page_dirty = true;
[04:56:54.554] | ^
[04:56:54.554] In file included from ../../../../src/include/postgres.h:46,
[04:56:54.554] from clog.c:33:
[04:56:54.554] clog.c: In function ‘clog_redo’:
[04:56:54.554] clog.c:997:48: error: ‘SlruPageEntry’ has no member named ‘page_dirty’
[04:56:54.554] 997 | Assert(!XactCtl->shared->page_entries[slotno].page_dirty);
[04:56:54.554] | ^
[04:56:54.554] ../../../../src/include/c.h:848:9: note: in definition of macro ‘Assert’
[04:56:54.554] 848 | if (!(condition)) \
[04:56:54.554] | ^~~~~~~~~
[04:56:54.555] make[4]: *** [<builtin>: clog.o] Error 1
[04:56:54.555] make[3]: *** [../../../src/backend/common.mk:39: transam-recursive] Error 2
[04:56:54.555] make[3]: *** Waiting for unfinished jobs....
[04:56:56.405] make[2]: *** [common.mk:39: access-recursive] Error 2
[04:56:56.405] make[1]: *** [Makefile:42: all-backend-recurse] Error 2
[04:56:56.405] make: *** [GNUmakefile:21: world-bin-src-recurse] Error 2
[04:56:56.407]
[04:56:56.407] Exit status: 2
Could you send a new version? In the meantime I will switch the patch status
to Waiting on Author.
Commits
-
Rework new SLRU test with injection points
- 94a3373ac5c3 18.0 landed
-
injection_point: Add injection_points.stats
- 2e35c67f9568 18.0 landed
-
injection_points: Add initialization of shmem state when loading module
- b2b023aa3706 18.0 landed
-
Add injection-point test for new multixact CV usage
- 768a9fd5535f 18.0 landed
-
Use conditional variable to wait for next MultiXact offset
- a0e0fb1ba56f 17.0 landed
-
Improve performance of subsystems on top of SLRU
- 53c2a97a9266 17.0 landed
-
Adjust VACUUM hastup LP_REDIRECT comments.
- 325bc54eed4e 16.0 cited
-
Test replay of regression tests, attempt II.
- f47ed79cc8a0 15.0 cited