The Internals of PostgreSQL

- PostgreSQL

概要

Chapter 4

Chapter 5

5.7.1 Visibility Check

5.7.2. Phantom Reads in PostgreSQL‘s REPEATABLE READ Level

Isolation LevelDirty ReadPhantom ReadSerializable
Read committedNot PossiblePossiblePossible
Repeatable readNot PossibleNot PossibleAllowed, but not in PostgreSQL

5.8. Preventing Lost Updates

5.9. Serializable Snapshot Isolation

本来は有害であると判断されるべき事象について、検査をすり抜けて正常であると誤って判断されてしまうことをフォールスネガティブという。

5.10. Required Maintenance Processes

Chapter 6

Chapter 9

exec_simple_query() @postgres.c

(1) ExtendCLOG() @clog.c                  /* Write the state of this transaction
"IN_PROGRESS" to the CLOG.
                                           */
(2) heap_insert()@heapam.c                /* Insert a tuple, creates a XLOG record,
and invoke the function XLogInsert.
                                           */
(3)   XLogInsert() @xlog.c (9.5 or later, xloginsert.c)
                                          /* Write the XLOG record of the inserted tuple
 to the WAL buffer, and update page's pd_lsn.
                                           */
(4) finish_xact_command() @postgres.c     /* Invoke commit action.*/  
      XLogInsert() @xlog.c  (9.5 or later, xloginsert.c)
                                          /* Write a XLOG record of this commit action
to the WAL buffer.
                                           */
(5)   XLogWrite() @xlog.c                 /* Write and flush all XLOG records on
the WAL buffer to WAL segment.
                                           */
(6) TransactionIdCommitTree() @transam.c

Chapter 10