Zeugswetter Andreas ADI SD wrote:
I am still wondering about the "easily" here. Basically this
needs some kind of wal entry to be crash safe.
Else some later tx might reuse the slot:
        - some update on page produces page image in wal
        - slot removed
        - slot reused and comitted
        - page not written
        - crash
        - wal fullpage restores the page to the version before slot
        (- would need a wal replay for slot removed from hot chain here)
        - wal restores slot reuse, but the slot is now part of a wrong
hot chain
          and the chain is broken (unless we have the above step)

Do we have this wal entry ?

We already log tuple removals by normal vacuums. We can't use that wal entry as it is: if a dead tuple is in the middle of an update chain, it needs to be unlinked from the chain. But I don't see any particular problem with that, it just needs to be wal logged like every other data changing operation.

Do we actually ever want to remove dead tuples from the middle of the chain? If a tuple in the middle of the chain is dead, surely every tuple before it in the chain is dead as well, and we want to remove them as well. I'm thinking, removing tuples from the middle of the chain can be problematic, because we'd need to fiddle with the xmin/xmax of the other tuples to make them match. Or change the tuple-following logic to not do the xmin=xmax check, but it's a nice robustness feature.

  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to