diff options
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r-- | src/backend/utils/init/postinit.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 87dc060b201..5089dd43ae2 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -518,6 +518,12 @@ BaseInit(void) DebugFileOpen(); /* + * Initialize file access. Done early so other subsystems can access + * files. + */ + InitFileAccess(); + + /* * Initialize statistics reporting. This needs to happen early to ensure * that pgstat's shutdown callback runs after the shutdown callbacks of * all subsystems that can produce stats (like e.g. transaction commits @@ -525,11 +531,16 @@ BaseInit(void) */ pgstat_initialize(); - /* Do local initialization of file, storage and buffer managers */ - InitFileAccess(); + /* Do local initialization of storage and buffer managers */ InitSync(); smgrinit(); InitBufferPoolAccess(); + + /* + * Initialize temporary file access after pgstat, so that the temorary + * file shutdown hook can report temporary file statistics. + */ + InitTemporaryFileAccess(); } |