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

Commit233ecca

Browse files
committed
Further thinking about heap_mark4update: in HeapTupleSelfUpdated case,
executor should not return the tuple as successfully marked, because infact it's been deleted. Not clear that this case has ever been seenin practice (I think you'd have to write a SELECT FOR UPDATE that callsa function that deletes some row the SELECT will visit later...) but weshould be consistent. Also add comments to several other places thatgot it right but didn't explain what they were doing.
1 parent0d3be98 commit233ecca

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎src/backend/commands/trigger.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.132 2002/09/21 18:39:25 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.133 2002/09/23 22:57:44 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1209,6 +1209,7 @@ ltrmark:;
12091209
switch (test)
12101210
{
12111211
caseHeapTupleSelfUpdated:
1212+
/* treat it as deleted; do not process */
12121213
ReleaseBuffer(buffer);
12131214
return (NULL);
12141215

‎src/backend/executor/execMain.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
*
2929
* IDENTIFICATION
30-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.178 2002/09/04 20:31:17 momjian Exp $
30+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.179 2002/09/23 22:57:44 tgl Exp $
3131
*
3232
*-------------------------------------------------------------------------
3333
*/
@@ -1032,6 +1032,9 @@ lnext:;
10321032
switch (test)
10331033
{
10341034
caseHeapTupleSelfUpdated:
1035+
/* treat it as deleted; do not process */
1036+
gotolnext;
1037+
10351038
caseHeapTupleMayBeUpdated:
10361039
break;
10371040

@@ -1303,6 +1306,7 @@ ldelete:;
13031306
switch (result)
13041307
{
13051308
caseHeapTupleSelfUpdated:
1309+
/* already deleted by self; nothing to do */
13061310
return;
13071311

13081312
caseHeapTupleMayBeUpdated:
@@ -1437,6 +1441,7 @@ lreplace:;
14371441
switch (result)
14381442
{
14391443
caseHeapTupleSelfUpdated:
1444+
/* already deleted by self; nothing to do */
14401445
return;
14411446

14421447
caseHeapTupleMayBeUpdated:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp