Skip to content

Commit e7c6efe

Browse files
committed
Remove now-unnecessary Autovacuum[Launcher|Worker]IAm functions
After commit fd5e8b4, 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.
1 parent a3f76a3 commit e7c6efe

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

src/backend/postmaster/autovacuum.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,6 @@ avlauncher_forkexec(void)
386386

387387
return postmaster_forkexec(ac, av);
388388
}
389-
390-
/*
391-
* We need this set from the outside, before InitProcess is called
392-
*/
393-
void
394-
AutovacuumLauncherIAm(void)
395-
{
396-
am_autovacuum_launcher = true;
397-
}
398389
#endif
399390

400391
/*
@@ -1453,15 +1444,6 @@ avworker_forkexec(void)
14531444

14541445
return postmaster_forkexec(ac, av);
14551446
}
1456-
1457-
/*
1458-
* We need this set from the outside, before InitProcess is called
1459-
*/
1460-
void
1461-
AutovacuumWorkerIAm(void)
1462-
{
1463-
am_autovacuum_worker = true;
1464-
}
14651447
#endif
14661448

14671449
/*

src/backend/postmaster/postmaster.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4842,12 +4842,6 @@ SubPostmasterMain(int argc, char *argv[])
48424842
else
48434843
PGSharedMemoryNoReAttach();
48444844

4845-
/* autovacuum needs this set before calling InitProcess */
4846-
if (strcmp(argv[1], "--forkavlauncher") == 0)
4847-
AutovacuumLauncherIAm();
4848-
if (strcmp(argv[1], "--forkavworker") == 0)
4849-
AutovacuumWorkerIAm();
4850-
48514845
/* Read in remaining GUC variables */
48524846
read_nondefault_variables();
48534847

src/include/postmaster/autovacuum.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ extern void AutoVacWorkerFailed(void);
6666
#ifdef EXEC_BACKEND
6767
extern void AutoVacLauncherMain(int argc, char *argv[]) pg_attribute_noreturn();
6868
extern void AutoVacWorkerMain(int argc, char *argv[]) pg_attribute_noreturn();
69-
extern void AutovacuumWorkerIAm(void);
70-
extern void AutovacuumLauncherIAm(void);
7169
#endif
7270

7371
extern bool AutoVacuumRequestWork(AutoVacuumWorkItemType type,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy