Exposing some hidden serializable transaction costs

Christophe Pettus <xof@thebuild.com>

From: Christophe Pettus <xof@thebuild.com>
To: pgsql-hackers@postgresql.org
Date: 2025-06-30T23:00:22Z
Lists: pgsql-hackers
Serialized transactions have a cost that is currently not accounted for in planning time: Rows that are retrieved to be filtered by a query get SIReadLocks.  This can made an otherwise-good query plan problematic, since it contributes to query cancellations.  Would it be appropriate to add some kind of cost constant to filtered rows to reflect that?