Hello PostgreSQL Hackers,

I am currently exploring the PostgreSQL source code to better understand
the internal storage and update mechanisms. While reviewing the heap access
methods, I noticed the function heap_inplace_update() in the source code
with the following comment:

/*
 * heap_inplace_update - deprecated
 *
 * This exists only to keep modules working in back branches. Affected
 * modules should migrate to systable_inplace_update_begin().
 */

>From my understanding, PostgreSQL generally follows the MVCC model, where
updates create a new tuple version rather than modifying the existing tuple
in place.

This raised a few questions for me:

   1.

   Does PostgreSQL still support any form of in-place updates internally,
   or is this function strictly kept for backward compatibility?
   2.

   What types of system catalog operations (if any) rely on in-place
   updates through systable_inplace_update_begin()?
   3.

   Since in-place updates do not generate a new tuple version, how does
   VACUUM interact with such updates? Does it need to handle them differently
   compared to normal MVCC updates?
   4.

   Are there any performance or concurrency considerations that influenced
   the decision to deprecate heap_inplace_update in favor of the newer APIs?

I would greatly appreciate any clarification or references to relevant
documentation or design discussions.

Thank you for your time and for the incredible work on PostgreSQL.

Best regards,
Shiju
Software Developer
Currently studying PostgreSQL internals

Reply via email to