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

Appearance settings

Commit e7c6efe

Browse filesBrowse 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
Copy full SHA for e7c6efe

File tree

Expand file treeCollapse file tree

3 files changed

+0
-26
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+0
-26
lines changed

‎src/backend/postmaster/autovacuum.c

Copy file name to clipboardExpand all lines: src/backend/postmaster/autovacuum.c
-18Lines 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

Copy file name to clipboardExpand all lines: src/backend/postmaster/postmaster.c
-6Lines 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

Copy file name to clipboardExpand all lines: src/include/postmaster/autovacuum.h
-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.