File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -929,7 +929,19 @@ partition_filter_exec(CustomScanState *node)
929
929
if (rri_holder -> tuple_map ||
930
930
(!junkfilter &&
931
931
(state -> command_type == CMD_INSERT || state -> command_type == CMD_UPDATE ) &&
932
- (slot -> tts_tupleDescriptor -> natts > rri -> ri_RelationDesc -> rd_att -> natts /* extra fields */ )))
932
+ (slot -> tts_tupleDescriptor -> natts > rri -> ri_RelationDesc -> rd_att -> natts /* extra fields */
933
+ #if PG_VERSION_NUM < 120000
934
+ /*
935
+ * If we have a regular physical tuple 'slot->tts_tuple' and
936
+ * it's locally palloc'd => we will use this tuple in
937
+ * ExecMaterializeSlot() instead of materialize the slot, so
938
+ * need to check number of attributes for this tuple:
939
+ */
940
+ || (slot -> tts_tuple && slot -> tts_shouldFree &&
941
+ HeapTupleHeaderGetNatts (slot -> tts_tuple -> t_data ) >
942
+ rri -> ri_RelationDesc -> rd_att -> natts /* extra fields */ )
943
+ #endif
944
+ )))
933
945
{
934
946
#if PG_VERSION_NUM < 120000
935
947
HeapTuple htup_old ,
You can’t perform that action at this time.
0 commit comments