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

Commitf083afa

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 parent0abd9cd commitf083afa

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
@@ -2013,12 +2013,10 @@ heap_prepare_insert(Relation relation, HeapTuple tup, TransactionId xid,
20132013
CommandIdcid,intoptions)
20142014
{
20152015
/*
2016-
* Parallel operations are required to be strictly read-only in a parallel
2017-
* worker. Parallel inserts are not safe even in the leader in the
2018-
* general case, because group locking means that heavyweight locks for
2019-
* relation extension or GIN page locks will not conflict between members
2020-
* of a lock group, but we don't prohibit that case here because there are
2021-
* useful special cases that we can safely allow, such as CREATE TABLE AS.
2016+
* To allow parallel inserts, we need to ensure that they are safe to be
2017+
* performed in workers. We have the infrastructure to allow parallel
2018+
* inserts in general except for the cases where inserts generate a new
2019+
* CommandId (eg. inserts into a table having a foreign key column).
20222020
*/
20232021
if (IsParallelWorker())
20242022
ereport(ERROR,
@@ -5694,10 +5692,10 @@ heap_inplace_update(Relation relation, HeapTuple tuple)
56945692
uint32newlen;
56955693

56965694
/*
5697-
* For now,parallel operations are required to be strictly read-only.
5698-
*Unlike a regular update,this should never create a combo CID, so it
5699-
*might be possible to relaxthis restriction, but not without more
5700-
*thought and testing. It's notclear that it would be useful, anyway.
5695+
* For now,we don't allow parallel updates. Unlike a regular update,
5696+
* this should never create a combo CID, so it might be possible to relax
5697+
* this restriction, but not without more thought and testing. It's not
5698+
* clear that it would be useful, anyway.
57015699
*/
57025700
if (IsInParallelMode())
57035701
ereport(ERROR,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp