1. We would be marking buffer dirty and writing wal even if we have not done any changes( ex if we pass invalid/dead tids). Maybe we can handle this better?
Yeah, we can skip this when nothing has changed. Will take care of it in the next version of patch.
cosmetic changes 1. Maybe "HTupleSurgicalOption" instead of "HTupleForceOption" and also the variable names could use surgery instead.
I think that looks fine. I would rather prefer the word "Force" just because all the enum options contain the word "Force" in it.
2. extension comment pg_surgery.control "extension to perform surgery the damaged heap table" -> "extension to perform surgery on the damaged heap table"