Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0d32511

Browse files
author
Amit Kapila
committed
Fix comments in heapam.c.
After commits85f6b49 and3ba59cc, we can allow parallel insertswhich was earlier not possible as parallel group members won't conflictfor relation extension and page lock. In those commits, we forgot toupdate comments at few places.Author: Amit KapilaReviewed-by: Robert Haas and Dilip KumarBackpatch-through: 13Discussion:https://postgr.es/m/CAFiTN-tMrQh5FFMPx5aWJ+1gi1H6JxktEhq5mDwCHgnEO5oBkA@mail.gmail.com
1 parente5209bf commit0d32511

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

‎src/backend/access/heap/heapam.c‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,12 +2044,10 @@ heap_prepare_insert(Relation relation, HeapTuple tup, TransactionId xid,
20442044
CommandIdcid,intoptions)
20452045
{
20462046
/*
2047-
* Parallel operations are required to be strictly read-only in a parallel
2048-
* worker. Parallel inserts are not safe even in the leader in the
2049-
* general case, because group locking means that heavyweight locks for
2050-
* relation extension or GIN page locks will not conflict between members
2051-
* of a lock group, but we don't prohibit that case here because there are
2052-
* useful special cases that we can safely allow, such as CREATE TABLE AS.
2047+
* To allow parallel inserts, we need to ensure that they are safe to be
2048+
* performed in workers. We have the infrastructure to allow parallel
2049+
* inserts in general except for the cases where inserts generate a new
2050+
* CommandId (eg. inserts into a table having a foreign key column).
20532051
*/
20542052
if (IsParallelWorker())
20552053
ereport(ERROR,
@@ -5725,10 +5723,10 @@ heap_inplace_update(Relation relation, HeapTuple tuple)
57255723
uint32newlen;
57265724

57275725
/*
5728-
* For now,parallel operations are required to be strictly read-only.
5729-
*Unlike a regular update,this should never create a combo CID, so it
5730-
*might be possible to relaxthis restriction, but not without more
5731-
*thought and testing. It's notclear that it would be useful, anyway.
5726+
* For now,we don't allow parallel updates. Unlike a regular update,
5727+
* this should never create a combo CID, so it might be possible to relax
5728+
* this restriction, but not without more thought and testing. It's not
5729+
* clear that it would be useful, anyway.
57325730
*/
57335731
if (IsInParallelMode())
57345732
ereport(ERROR,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp