0

In PostgreSQL v15 I have installed pg_walinspect extension. I am trying to understand what is individual resource manager fields.

Like I understand resource manager tells us where individual data change has happened. I did several actions like INSERT, UPDATE, CREATE TABLE, CHECKPOINT and got result (I have heavily clean the output, just to display one resource manager type per row):

 start_lsn  |   end_lsn   |  xid   | resource_manager | record_type       |
------------+-------------+--------+------------------+-------------------+
15/61E54B08 | 15/61E54B48 | 337813 | Heap             | INSERT            |
15/61E54B48 | 15/61E54C10 | 337813 | Btree            | INSERT_LEAF       |
15/61E577A8 | 15/61E57820 |      0 | XLOG             | CHECKPOINT_ONLINE |
15/61E61C78 | 15/61E61CA8 | 337848 | Standby          | LOCK              |
15/61E61CA8 | 15/61E61CD8 | 337848 | Storage          | CREATE            |
15/61E75758 | 15/61E75A98 | 337848 | Heap2            | MULTI_INSERT      |
15/61E83610 | 15/61E838B8 | 337848 | Transaction      | COMMIT            |

Now look at resource_manager attribute. What is the meaning of:

  • Heap - Is this memory or disk? It looks to me it is memory.
  • Btree - I assume index related (b-tree index).
  • XLOG - I assume WAL log related (I executed CHECKPOINT command).
  • Standby - No idea on this one.
  • Storage - I assume related to disk storage.
  • Heap2 - Probably similar to Heap, but what?
  • Transaction - Happens on commit/rollback.
2
  • 1
    They are just labels. They have no inherent meaning. Knowing what the label are makes it easier to find the relevant part of the source code.
    – jjanes
    Commented Aug 24 at 19:33
  • 1
    "Heap" and "Heap2" are for changes to a table. (Access exclusive) locks have to be logged only for the benefit of a standby server. Commented Aug 28 at 8:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.