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

Commit6bfacd3

Browse files
committed
Undo unintentional ABI break in struct ResultRelInfo.
Commitsaac2c9b et al. added a bool field to struct ResultRelInfo.That's no problem in the master branch, but in released branchescare must be taken when modifying publicly-visible structs to avoidan ABI break for extensions. Frequently we solve that by adding thenew field at the end of the struct, and that's what was done here.But ResultRelInfo has stricter constraints than just about any othernode type in Postgres. Some executor APIs require extensions to indexinto arrays of ResultRelInfo, which means that any change whatever insizeof(ResultRelInfo) causes a fatal ABI break.Fortunately, this is easy to fix, because the new field can besqueezed into available padding space instead --- indeed, that's whereit was put in master, so this fix also removes a cross-branch codingvariation.Per report from Pavan Deolasee. Patch v14-v17 only; earlier versionsdid not gain the extra field, nor is there any problem in master.Discussion:https://postgr.es/m/CABOikdNmVBC1LL6pY26dyxAS2f+gLZvTsNt=2XbcyG7WxXVBBQ@mail.gmail.com
1 parent1c05004 commit6bfacd3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/include/nodes/execnodes.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,9 @@ typedef struct ResultRelInfo
484484
/* Have the projection and the slots above been initialized? */
485485
boolri_projectNewInfoValid;
486486

487+
/* updates do LockTuple() before oldtup read; see README.tuplock */
488+
boolri_needLockTagTuple;
489+
487490
/* triggers to be fired, if any */
488491
TriggerDesc*ri_TrigDesc;
489492

@@ -592,9 +595,6 @@ typedef struct ResultRelInfo
592595
* one of its ancestors; see ExecCrossPartitionUpdateForeignKey().
593596
*/
594597
List*ri_ancestorResultRels;
595-
596-
/* updates do LockTuple() before oldtup read; see README.tuplock */
597-
boolri_needLockTagTuple;
598598
}ResultRelInfo;
599599

600600
/* ----------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp