Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita1bb3d5

Browse files
committed
Schedule ShutdownXLOG() in single user mode using before_shmem_exit().
Previously on_shmem_exit() was used. The upcoming shared memory stats patchuses DSM segments to store stats, which can not be used after thedsm_backend_shutdown() call in shmem_exit(). There does not seem to be anyreason to do ShutdownXLOG() via on_shmem_exit(), so change it.Author: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/20210405092914.mmxqe7j56lsjfsej@alap3.anarazel.deDiscussion:https://postgr.es/m/20210803023612.iziacxk5syn2r4ut@alap3.anarazel.de
1 parentfa91d4c commita1bb3d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/utils/init/postinit.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,11 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username,
638638
/* Reset CurrentResourceOwner to nothing for the moment */
639639
CurrentResourceOwner=NULL;
640640

641-
on_shmem_exit(ShutdownXLOG,0);
641+
/*
642+
* Use before_shmem_exit() so that ShutdownXLOG() can rely on DSM
643+
* segments etc to work (which in turn is required for pgstats).
644+
*/
645+
before_shmem_exit(ShutdownXLOG,0);
642646
}
643647

644648
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp