1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

Move TupleTableSlots boolean member into one flag variable.

There's several reasons for this change:
1) It reduces the total size of TupleTableSlot / reduces alignment
   padding, making the commonly accessed members fit into a single
   cacheline (but we currently do not force proper alignment, so
   that's not yet guaranteed to be helpful)
2) Combining the booleans into a flag allows to combine read/writes
   from memory.
3) With the upcoming slot abstraction changes, it allows to have core
   and extended flags, in a memory efficient way.

Author: Ashutosh Bapat and Andres Freund
Discussion: https://postgr.es/m/20180220224318.gw4oe5jadhpmcdnm@alap3.anarazel.de
This commit is contained in:
Andres Freund
2018-10-15 15:24:33 -07:00
parent 9d906f1119
commit c5257345ef
8 changed files with 116 additions and 72 deletions

View File

@ -699,7 +699,7 @@ ExecDelete(ModifyTableState *mtstate,
* RETURNING expressions might reference the tableoid column, so
* initialize t_tableOid before evaluating them.
*/
if (slot->tts_isempty)
if (TTS_EMPTY(slot))
ExecStoreAllNullTuple(slot);
tuple = ExecMaterializeSlot(slot);
tuple->t_tableOid = RelationGetRelid(resultRelationDesc);