2
2
#include "ignorance.h"
3
3
4
4
#include "access/heapam.h"
5
+ #include "access/parallel.h"
5
6
#include "executor/spi.h"
6
7
#include "utils/lsyscache.h"
7
8
#include "miscadmin.h"
@@ -16,9 +17,10 @@ set_ignorance(bool newval, void *extra)
16
17
* It is not problem. We will check existence at each update and create this
17
18
* table in dynamic mode, if needed.
18
19
*/
19
- if (IsUnderPostmaster && newval && (aqo_log_ignorance != newval ))
20
+ if (IsUnderPostmaster && !IsParallelWorker () && newval &&
21
+ (aqo_log_ignorance != newval ))
20
22
/* Create storage and no error, if it exists already. */
21
- ( bool ) create_ignorance_table (true);
23
+ create_ignorance_table (true);
22
24
23
25
aqo_log_ignorance = newval ;
24
26
}
@@ -101,7 +103,7 @@ update_ignorance(int qhash, int fhash, int fss_hash, Plan *plan)
101
103
if (!OidIsValid (reloid ))
102
104
{
103
105
/* This table doesn't created on instance startup. Create now. */
104
- ( bool ) create_ignorance_table (false);
106
+ create_ignorance_table (false);
105
107
reloid = RangeVarGetRelid (rv , NoLock , true);
106
108
if (!OidIsValid (reloid ))
107
109
elog (PANIC , "Ignorance table does not exists!" );
0 commit comments