pgsql: Schedule ShutdownXLOG() in single user mode using before_shmem_e

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Schedule ShutdownXLOG() in single user mode using before_shmem_e
Date: 2021-08-07 02:30:26
Message-ID: E1mCC6U-0004Io-H8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Schedule ShutdownXLOG() in single user mode using before_shmem_exit().

Previously on_shmem_exit() was used. The upcoming shared memory stats patch
uses DSM segments to store stats, which can not be used after the
dsm_backend_shutdown() call in shmem_exit(). There does not seem to be any
reason to do ShutdownXLOG() via on_shmem_exit(), so change it.

Author: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/20210405092914.mmxqe7j56lsjfsej@alap3.anarazel.de
Discussion: https://postgr.es/m/20210803023612.iziacxk5syn2r4ut@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a1bb3d5dbe6a66ae73d7805a63b951793b5d55df

Modified Files
--------------
src/backend/utils/init/postinit.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-08-07 02:44:07 Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
Previous Message Tom Lane 2021-08-06 21:33:04 pgsql: Don't elide casting to typmod -1.