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

Commit2103266

Browse files
committed
Process shared_preload_libraries in single-user mode.
Without processing shared_preload_libraries, it's impossible torecover if custom WAL resource managers are needed. It may also pose aproblem running VACUUM on a table with a custom AM, if the moduleimplementing the AM is expecting to be loaded byshared_preload_libraries.The reason this wasn't done before was just the general principle todo fewer things in single-user mode. But it's easy enough to just setshared_preload_libraries to empty, for the same effect.Discussion:https://postgr.es/m/9decc18a42634f8a2f15c97a385a0f51a752f396.camel%40j-davis.comReviewed-by: Tom Lane, Andres FreundBackpatch-through: 15
1 parent0829cc4 commit2103266

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4009,9 +4009,32 @@ PostgresSingleUserMain(int argc, char *argv[],
40094009
/* read control file (error checking and contains config ) */
40104010
LocalProcessControlFile(false);
40114011

4012+
/*
4013+
* process any libraries that should be preloaded at postmaster start
4014+
*/
4015+
process_shared_preload_libraries();
4016+
40124017
/* Initialize MaxBackends */
40134018
InitializeMaxBackends();
40144019

4020+
/*
4021+
* Give preloaded libraries a chance to request additional shared memory.
4022+
*/
4023+
process_shmem_requests();
4024+
4025+
/*
4026+
* Now that loadable modules have had their chance to request additional
4027+
* shared memory, determine the value of any runtime-computed GUCs that
4028+
* depend on the amount of shared memory required.
4029+
*/
4030+
InitializeShmemGUCs();
4031+
4032+
/*
4033+
* Now that modules have been loaded, we can process any custom resource
4034+
* managers specified in the wal_consistency_checking GUC.
4035+
*/
4036+
InitializeWalConsistencyChecking();
4037+
40154038
CreateSharedMemoryAndSemaphores();
40164039

40174040
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp