Rename of varatt_external to varatt_external_oid
Rename of varatt_external to varatt_external_oid
Hi all, (Tom and Andres in CC, as they've commented on the original "round 1" thread) In order to add support of 8-byte TOAST values, one item that I have on my list of items is a set of renames in the varatt.h definitions for some objects, as of: - varatt_external -> varatt_external_oid - VARTAG_ONDISK -> VARTAG_ONDISK_OID - TOAST_POINTER_SIZE -> TOAST_OID_POINTER_SIZE - TOAST_MAX_CHUNK_SIZE -> TOAST_OID_MAX_CHUNK_SIZE - Few macros in varatt.h. - (I'm aware of the control file bit, left out on purpose as its tracking is still valid even if we extend to 8 bytes.) This is related to the following, larger patch set, but I wanted to make a last call before proceeding as it is hidden in a much larger set of patches: https://www.postgresql.org/message-id/flat/af19kUjwjhaoUTLn@paquier.xyz Tom has commented about this part of the patch here, presented in 0003: https://www.postgresql.org/message-id/1891064.1754681536@sss.pgh.pa.us This is a more ambitious version of it, with more mechanical renames to make the difference between the OID and OID8 flavors of the pointers. One point of the renames is to make extension folks aware of the fact that the new TOAST structures may need handling due to the new 8-byte values. Still, I also feel guilty to not provide a set of compatibility definitions, which is of course one option. Note that I'm planning to do all that early in the release cycle for v20, to get room for it. Rebased on HEAD is the patch I have for staging. Any thoughts, comments or objections? -- Michael
Re: Rename of varatt_external to varatt_external_oid
От:
Chao Li <li.evan.chao@gmail.com>
Дата:
> On Sep 4, 2026, at 07:33, Michael Paquier wrote: > > Hi all, > (Tom and Andres in CC, as they've commented on the original "round 1" > thread) > > In order to add support of 8-byte TOAST values, one item that I have > on my list of items is a set of renames in the varatt.h definitions > for some objects, as of: > - varatt_external -> varatt_external_oid > - VARTAG_ONDISK -> VARTAG_ONDISK_OID > - TOAST_POINTER_SIZE -> TOAST_OID_POINTER_SIZE > - TOAST_MAX_CHUNK_SIZE -> TOAST_OID_MAX_CHUNK_SIZE > - Few macros in varatt.h. > - (I'm aware of the control file bit, left out on purpose as its > tracking is still valid even if we extend to 8 bytes.) > > This is related to the following, larger patch set, but I wanted to > make a last call before proceeding as it is hidden in a much larger > set of patches: > https://www.postgresql.org/message-id/flat/af19kUjwjhaoUTLn@paquier.xyz > > Tom has commented about this part of the patch here, presented in > 0003: > https://www.postgresql.org/message-id/1891064.1754681536@sss.pgh.pa.us > > This is a more ambitious version of it, with more mechanical renames > to make the difference between the OID and OID8 flavors of the > pointers. > > One point of the renames is to make extension folks aware of the fact > that the new TOAST structures may need handling due to the new 8-byte > values. Still, I also feel guilty to not provide a set of > compatibility definitions, which is of course one option. Note that > I'm planning to do all that early in the release cycle for v20, to get > room for it. > > Rebased on HEAD is the patch I have for staging. Any thoughts, > comments or objections? > -- > Michael > <0001-Rename-varatt_external-to-varatt_external_oid.patch> I tried to review this patch, but “git am” failed on the current HEAD (2b3d11aaed8). Would you please rebase? ``` % git am ~/Downloads/0001-Rename-varatt_external-to-varatt_external_oid.patch Applying: Rename varatt_external to varatt_external_oid error: patch failed: src/backend/access/heap/heaptoast.c:634 error: src/backend/access/heap/heaptoast.c: patch does not apply error: patch failed: contrib/amcheck/verify_heapam.c:1558 error: contrib/amcheck/verify_heapam.c: patch does not apply Patch failed at 0001 Rename varatt_external to varatt_external_oid hint: Use 'git am --show-current-patch=diff' to see the failed patch hint: When you have resolved this problem, run "git am --continue". hint: If you prefer to skip this patch, run "git am --skip" instead. hint: To restore the original branch and stop patching, run "git am --abort". hint: Disable this message with "git config set advice.mergeConflict false" ``` Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/