File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -2002,7 +2002,8 @@ CopyFrom(CopyState cstate)
20022002 if (cstate -> freeze &&
20032003 ThereAreNoPriorRegisteredSnapshots () &&
20042004 ThereAreNoReadyPortals () &&
2005- cstate -> rel -> rd_newRelfilenodeSubid == GetCurrentSubTransactionId ())
2005+ (cstate -> rel -> rd_newRelfilenodeSubid == GetCurrentSubTransactionId () ||
2006+ cstate -> rel -> rd_createSubid == GetCurrentSubTransactionId ()))
20062007 hi_options |= HEAP_INSERT_FROZEN ;
20072008 }
20082009
Original file line number Diff line number Diff line change @@ -254,7 +254,17 @@ SELECT * FROM testnull;
254254 |
255255(4 rows)
256256
257+ BEGIN;
257258CREATE TABLE vistest (LIKE testeoc);
259+ COPY vistest FROM stdin CSV;
260+ COMMIT;
261+ SELECT xmax, * FROM vistest;
262+ xmax | a
263+ ------+----
264+ 0 | a0
265+ 0 | b
266+ (2 rows)
267+
258268BEGIN;
259269TRUNCATE vistest;
260270COPY vistest FROM stdin CSV;
@@ -324,14 +334,12 @@ SELECT * FROM vistest;
324334COMMIT;
325335TRUNCATE vistest;
326336COPY vistest FROM stdin CSV FREEZE;
327- NOTICE: FREEZE option specified but pre-conditions not met
328337BEGIN;
329338INSERT INTO vistest VALUES ('z');
330339SAVEPOINT s1;
331340TRUNCATE vistest;
332341ROLLBACK TO SAVEPOINT s1;
333342COPY vistest FROM stdin CSV FREEZE;
334- NOTICE: FREEZE option specified but pre-conditions not met
335343SELECT * FROM vistest;
336344 a
337345----
Original file line number Diff line number Diff line change @@ -178,8 +178,14 @@ COPY testnull FROM stdin WITH NULL AS E'\\0';
178178
179179SELECT * FROM testnull;
180180
181-
181+ BEGIN ;
182182CREATE TABLE vistest (LIKE testeoc);
183+ COPY vistest FROM stdin CSV;
184+ a0
185+ b
186+ \.
187+ COMMIT ;
188+ SELECT * FROM vistest;
183189BEGIN ;
184190TRUNCATE vistest;
185191COPY vistest FROM stdin CSV;
You can’t perform that action at this time.
0 commit comments