aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-11-16 12:58:26 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2024-11-16 12:58:26 -0500
commit17db248f318f09b143af208fdcc1f067b3b0b2cb (patch)
treeef45ef5f1dc43b47b9a5f297443948fe6569cb24
parentedf80895f6bda824403f843df91cbc83890e4b6c (diff)
downloadpostgresql-17db248f318f09b143af208fdcc1f067b3b0b2cb.tar.gz
postgresql-17db248f318f09b143af208fdcc1f067b3b0b2cb.zip
Undo unintentional ABI break in struct ResultRelInfo.
Commits aac2c9b4f et al. added a bool field to struct ResultRelInfo. That's no problem in the master branch, but in released branches care must be taken when modifying publicly-visible structs to avoid an ABI break for extensions. Frequently we solve that by adding the new field at the end of the struct, and that's what was done here. But ResultRelInfo has stricter constraints than just about any other node type in Postgres. Some executor APIs require extensions to index into arrays of ResultRelInfo, which means that any change whatever in sizeof(ResultRelInfo) causes a fatal ABI break. Fortunately, this is easy to fix, because the new field can be squeezed into available padding space instead --- indeed, that's where it was put in master, so this fix also removes a cross-branch coding variation. Per report from Pavan Deolasee. Patch v14-v17 only; earlier versions did not gain the extra field, nor is there any problem in master. Discussion: https://postgr.es/m/CABOikdNmVBC1LL6pY26dyxAS2f+gLZvTsNt=2XbcyG7WxXVBBQ@mail.gmail.com
-rw-r--r--src/include/nodes/execnodes.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index a1a6a564f19..4c3eaf3d76d 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -456,6 +456,9 @@ typedef struct ResultRelInfo
/* Have the projection and the slots above been initialized? */
bool ri_projectNewInfoValid;
+ /* updates do LockTuple() before oldtup read; see README.tuplock */
+ bool ri_needLockTagTuple;
+
/* triggers to be fired, if any */
TriggerDesc *ri_TrigDesc;
@@ -556,9 +559,6 @@ typedef struct ResultRelInfo
* one of its ancestors; see ExecCrossPartitionUpdateForeignKey().
*/
List *ri_ancestorResultRels;
-
- /* updates do LockTuple() before oldtup read; see README.tuplock */
- bool ri_needLockTagTuple;
} ResultRelInfo;
/*