mirror of https://github.com/citusdata/citus.git
Do initial cleanup only once in pg_init (#4213)
In postmasters execution of _PG_init, IsUnderPostmaster will be false and we want to do the cleanup at that time only, otherwise there is a chance that there will be parallel queries and we might do a cleanup for things that are already in use.pull/4209/head
parent
6a341b6ab8
commit
45bb0fb587
|
@ -301,7 +301,16 @@ _PG_init(void)
|
|||
PGC_S_OVERRIDE);
|
||||
}
|
||||
|
||||
DoInitialCleanup();
|
||||
/*
|
||||
* In postmasters execution of _PG_init, IsUnderPostmaster will be false and
|
||||
* we want to do the cleanup at that time only, otherwise there is a chance that
|
||||
* there will be parallel queries and we might do a cleanup for things that are
|
||||
* already in use. This is only needed in Windows.
|
||||
*/
|
||||
if (!IsUnderPostmaster)
|
||||
{
|
||||
DoInitialCleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue