mirror of
https://github.com/postgres/postgres.git
synced 2025-04-29 13:56:47 +03:00
Remove now-unnecessary Autovacuum[Launcher|Worker]IAm functions
After commit fd5e8b440d, InitProcess() is called later in the EXEC_BACKEND startup sequence, so it's enough to set the am_autovacuum_[launcher|worker] variables at the same place as in the !EXEC_BACKEND case.
This commit is contained in:
parent
a3f76a3f7e
commit
e7c6efe305
@ -386,15 +386,6 @@ avlauncher_forkexec(void)
|
|||||||
|
|
||||||
return postmaster_forkexec(ac, av);
|
return postmaster_forkexec(ac, av);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* We need this set from the outside, before InitProcess is called
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
AutovacuumLauncherIAm(void)
|
|
||||||
{
|
|
||||||
am_autovacuum_launcher = true;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1453,15 +1444,6 @@ avworker_forkexec(void)
|
|||||||
|
|
||||||
return postmaster_forkexec(ac, av);
|
return postmaster_forkexec(ac, av);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* We need this set from the outside, before InitProcess is called
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
AutovacuumWorkerIAm(void)
|
|
||||||
{
|
|
||||||
am_autovacuum_worker = true;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4842,12 +4842,6 @@ SubPostmasterMain(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
PGSharedMemoryNoReAttach();
|
PGSharedMemoryNoReAttach();
|
||||||
|
|
||||||
/* autovacuum needs this set before calling InitProcess */
|
|
||||||
if (strcmp(argv[1], "--forkavlauncher") == 0)
|
|
||||||
AutovacuumLauncherIAm();
|
|
||||||
if (strcmp(argv[1], "--forkavworker") == 0)
|
|
||||||
AutovacuumWorkerIAm();
|
|
||||||
|
|
||||||
/* Read in remaining GUC variables */
|
/* Read in remaining GUC variables */
|
||||||
read_nondefault_variables();
|
read_nondefault_variables();
|
||||||
|
|
||||||
|
@ -66,8 +66,6 @@ extern void AutoVacWorkerFailed(void);
|
|||||||
#ifdef EXEC_BACKEND
|
#ifdef EXEC_BACKEND
|
||||||
extern void AutoVacLauncherMain(int argc, char *argv[]) pg_attribute_noreturn();
|
extern void AutoVacLauncherMain(int argc, char *argv[]) pg_attribute_noreturn();
|
||||||
extern void AutoVacWorkerMain(int argc, char *argv[]) pg_attribute_noreturn();
|
extern void AutoVacWorkerMain(int argc, char *argv[]) pg_attribute_noreturn();
|
||||||
extern void AutovacuumWorkerIAm(void);
|
|
||||||
extern void AutovacuumLauncherIAm(void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern bool AutoVacuumRequestWork(AutoVacuumWorkItemType type,
|
extern bool AutoVacuumRequestWork(AutoVacuumWorkItemType type,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user