Re: table AM option passing

Zsolt Parragi <zsolt.parragi@percona.com>

From: Zsolt Parragi <zsolt.parragi@percona.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-18T20:20:20Z
Lists: pgsql-hackers
Hello!

I think there's a change missing in simple_table_tuple_update that
works by accident, as true == 1 == TABLE_UPDATE_WAIT.

Maybe the values could use a different starting value instead of 1 to
surface possible issues?

+ * TABLE_DELETE_WAIT -- set if should wait for any conflicting
+ * update/delete to commit/abort
+ * TABLE_DELETE_CHANGING_PART -- set iff the tuple is being moved to
+ * another partition table due to an update of the partition key.
+ * Otherwise, false.

"Otherwise, false" seems like a leftover from the previous comment version?

tableam.h also have two leftover "wait == false" comments.



Commits

  1. Give an 'options' parameter to tuple_delete/_update

  2. Fix vicinity of tuple_insert to use uint32, not int, for options

  3. Have table_insert and siblings use an unsigned type for options

  4. Remove the following unused type definitions: bool8, bool16, bool32, word8,