1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-19 17:02:53 +03:00

process startup: Separate out BootstrapModeMain from AuxiliaryProcessMain.

There practically was no shared code between the two, once all the ifs are
removed. And it was quite confusing that aux processes weren't actually
started by the call to AuxiliaryProcessMain() in main().

There's more to do, AuxiliaryProcessMain() should move out of bootstrap.c, and
BootstrapModeMain() shouldn't use/be part of AuxProcType.

Author: Andres Freund <andres@anarazel.de>
Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-By: Robert Haas <robertmhaas@gmail.com>
Discussion: https://postgr.es/m/20210802164124.ufo5buo4apl6yuvs@alap3.anarazel.de
This commit is contained in:
Andres Freund
2021-08-04 19:29:45 -07:00
parent 50017f7772
commit 5aa4a9d207
4 changed files with 208 additions and 207 deletions

View File

@@ -15,6 +15,7 @@
#define BOOTSTRAP_H
#include "nodes/execnodes.h"
#include "miscadmin.h"
/*
@@ -32,7 +33,8 @@ extern Form_pg_attribute attrtypes[MAXATTR];
extern int numattr;
extern void AuxiliaryProcessMain(int argc, char *argv[]) pg_attribute_noreturn();
extern void BootstrapModeMain(int argc, char *argv[]) pg_attribute_noreturn();
extern void AuxiliaryProcessMain(AuxProcType auxtype) pg_attribute_noreturn();
extern void closerel(char *name);
extern void boot_openrel(char *name);