Last active
August 19, 2026 20:46
-
-
Save rednafi/118e8b7bb89fb6bcbe12a7c3a848bad3 to your computer and use it in GitHub Desktop.
PostgreSQL transaction isolation diagram
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "excalidraw", | |
| "version": 2, | |
| "source": "https://excalidraw.com", | |
| "elements": [ | |
| { | |
| "id": "title", | |
| "type": "text", | |
| "x": 72, | |
| "y": 54, | |
| "width": 719, | |
| "height": 48, | |
| "angle": 0, | |
| "strokeColor": "#172554", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934127, | |
| "version": 1, | |
| "versionNonce": 418827123, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "PostgreSQL transaction isolation", | |
| "fontSize": 40, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "PostgreSQL transaction isolation", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "subtitle", | |
| "type": "text", | |
| "x": 75, | |
| "y": 112, | |
| "width": 596, | |
| "height": 24, | |
| "angle": 0, | |
| "strokeColor": "#475569", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934128, | |
| "version": 1, | |
| "versionNonce": 418827124, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "A reference model for comparing database guarantees", | |
| "fontSize": 20, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "A reference model for comparing database guarantees", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "card-read-committed", | |
| "type": "rectangle", | |
| "x": 58, | |
| "y": 176, | |
| "width": 330, | |
| "height": 320, | |
| "angle": 0, | |
| "strokeColor": "#4263eb", | |
| "backgroundColor": "#edf2ff", | |
| "fillStyle": "solid", | |
| "strokeWidth": 3, | |
| "strokeStyle": "solid", | |
| "roughness": 2, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": { "type": 3 }, | |
| "seed": 181934129, | |
| "version": 1, | |
| "versionNonce": 418827125, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false | |
| }, | |
| { | |
| "id": "card-repeatable-read", | |
| "type": "rectangle", | |
| "x": 435, | |
| "y": 176, | |
| "width": 330, | |
| "height": 320, | |
| "angle": 0, | |
| "strokeColor": "#7048e8", | |
| "backgroundColor": "#f3f0ff", | |
| "fillStyle": "solid", | |
| "strokeWidth": 3, | |
| "strokeStyle": "solid", | |
| "roughness": 2, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": { "type": 3 }, | |
| "seed": 181934130, | |
| "version": 1, | |
| "versionNonce": 418827126, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false | |
| }, | |
| { | |
| "id": "card-serializable", | |
| "type": "rectangle", | |
| "x": 812, | |
| "y": 176, | |
| "width": 330, | |
| "height": 320, | |
| "angle": 0, | |
| "strokeColor": "#2b8a3e", | |
| "backgroundColor": "#ebfbee", | |
| "fillStyle": "solid", | |
| "strokeWidth": 3, | |
| "strokeStyle": "solid", | |
| "roughness": 2, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": { "type": 3 }, | |
| "seed": 181934131, | |
| "version": 1, | |
| "versionNonce": 418827127, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false | |
| }, | |
| { | |
| "id": "level-1", | |
| "type": "text", | |
| "x": 82, | |
| "y": 199, | |
| "width": 38, | |
| "height": 34, | |
| "angle": 0, | |
| "strokeColor": "#4263eb", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934132, | |
| "version": 1, | |
| "versionNonce": 418827128, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "01", | |
| "fontSize": 28, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "01", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "level-2", | |
| "type": "text", | |
| "x": 459, | |
| "y": 199, | |
| "width": 38, | |
| "height": 34, | |
| "angle": 0, | |
| "strokeColor": "#7048e8", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934133, | |
| "version": 1, | |
| "versionNonce": 418827129, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "02", | |
| "fontSize": 28, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "02", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "level-3", | |
| "type": "text", | |
| "x": 836, | |
| "y": 199, | |
| "width": 38, | |
| "height": 34, | |
| "angle": 0, | |
| "strokeColor": "#2b8a3e", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934134, | |
| "version": 1, | |
| "versionNonce": 418827130, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "03", | |
| "fontSize": 28, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "03", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "heading-read-committed", | |
| "type": "text", | |
| "x": 82, | |
| "y": 243, | |
| "width": 238, | |
| "height": 36, | |
| "angle": 0, | |
| "strokeColor": "#172554", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934135, | |
| "version": 1, | |
| "versionNonce": 418827131, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "Read Committed", | |
| "fontSize": 30, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "Read Committed", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "heading-repeatable-read", | |
| "type": "text", | |
| "x": 459, | |
| "y": 243, | |
| "width": 247, | |
| "height": 36, | |
| "angle": 0, | |
| "strokeColor": "#2e1065", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934136, | |
| "version": 1, | |
| "versionNonce": 418827132, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "Repeatable Read", | |
| "fontSize": 30, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "Repeatable Read", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "heading-serializable", | |
| "type": "text", | |
| "x": 836, | |
| "y": 243, | |
| "width": 191, | |
| "height": 36, | |
| "angle": 0, | |
| "strokeColor": "#14532d", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934137, | |
| "version": 1, | |
| "versionNonce": 418827133, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "Serializable", | |
| "fontSize": 30, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "Serializable", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "body-read-committed", | |
| "type": "text", | |
| "x": 82, | |
| "y": 304, | |
| "width": 290, | |
| "height": 120, | |
| "angle": 0, | |
| "strokeColor": "#1e293b", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934138, | |
| "version": 1, | |
| "versionNonce": 418827134, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "Fresh snapshot for each\nstatement\n\nTwo reads may see different\ncommitted states", | |
| "fontSize": 20, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "Fresh snapshot for each\nstatement\n\nTwo reads may see different\ncommitted states", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "body-repeatable-read", | |
| "type": "text", | |
| "x": 459, | |
| "y": 304, | |
| "width": 290, | |
| "height": 168, | |
| "angle": 0, | |
| "strokeColor": "#1e293b", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934139, | |
| "version": 1, | |
| "versionNonce": 418827135, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "One snapshot for the\ntransaction\n\nNo nonrepeatable or\nphantom reads\n\nWrite skew can happen", | |
| "fontSize": 20, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "One snapshot for the\ntransaction\n\nNo nonrepeatable or\nphantom reads\n\nWrite skew can happen", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "body-serializable", | |
| "type": "text", | |
| "x": 836, | |
| "y": 304, | |
| "width": 290, | |
| "height": 168, | |
| "angle": 0, | |
| "strokeColor": "#1e293b", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934140, | |
| "version": 1, | |
| "versionNonce": 418827136, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "Snapshot + dependency\ntracking\n\nOnly serializable outcomes\ncommit\n\nRetry on SQLSTATE 40001", | |
| "fontSize": 20, | |
| "fontFamily": 1, | |
| "textAlign": "left", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "Snapshot + dependency\ntracking\n\nOnly serializable outcomes\ncommit\n\nRetry on SQLSTATE 40001", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| }, | |
| { | |
| "id": "arrow-1", | |
| "type": "arrow", | |
| "x": 395, | |
| "y": 324, | |
| "width": 31, | |
| "height": 0, | |
| "angle": 0, | |
| "strokeColor": "#64748b", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 3, | |
| "strokeStyle": "solid", | |
| "roughness": 2, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": { "type": 2 }, | |
| "seed": 181934141, | |
| "version": 1, | |
| "versionNonce": 418827137, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "points": [[0, 0], [31, 0]], | |
| "lastCommittedPoint": null, | |
| "startBinding": null, | |
| "endBinding": null, | |
| "startArrowhead": null, | |
| "endArrowhead": "arrow", | |
| "elbowed": false | |
| }, | |
| { | |
| "id": "arrow-2", | |
| "type": "arrow", | |
| "x": 772, | |
| "y": 324, | |
| "width": 31, | |
| "height": 0, | |
| "angle": 0, | |
| "strokeColor": "#64748b", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 3, | |
| "strokeStyle": "solid", | |
| "roughness": 2, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": { "type": 2 }, | |
| "seed": 181934142, | |
| "version": 1, | |
| "versionNonce": 418827138, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "points": [[0, 0], [31, 0]], | |
| "lastCommittedPoint": null, | |
| "startBinding": null, | |
| "endBinding": null, | |
| "startArrowhead": null, | |
| "endArrowhead": "arrow", | |
| "elbowed": false | |
| }, | |
| { | |
| "id": "strength-arrow", | |
| "type": "arrow", | |
| "x": 91, | |
| "y": 542, | |
| "width": 1018, | |
| "height": 0, | |
| "angle": 0, | |
| "strokeColor": "#334155", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 3, | |
| "strokeStyle": "solid", | |
| "roughness": 2, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": { "type": 2 }, | |
| "seed": 181934143, | |
| "version": 1, | |
| "versionNonce": 418827139, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "points": [[0, 0], [1018, 0]], | |
| "lastCommittedPoint": null, | |
| "startBinding": null, | |
| "endBinding": null, | |
| "startArrowhead": null, | |
| "endArrowhead": "arrow", | |
| "elbowed": false | |
| }, | |
| { | |
| "id": "strength-label", | |
| "type": "text", | |
| "x": 350, | |
| "y": 559, | |
| "width": 500, | |
| "height": 24, | |
| "angle": 0, | |
| "strokeColor": "#475569", | |
| "backgroundColor": "transparent", | |
| "fillStyle": "solid", | |
| "strokeWidth": 1, | |
| "strokeStyle": "solid", | |
| "roughness": 1, | |
| "opacity": 100, | |
| "groupIds": [], | |
| "frameId": null, | |
| "roundness": null, | |
| "seed": 181934144, | |
| "version": 1, | |
| "versionNonce": 418827140, | |
| "isDeleted": false, | |
| "boundElements": null, | |
| "updated": 1787126400000, | |
| "link": null, | |
| "locked": false, | |
| "text": "stronger protection from concurrency anomalies", | |
| "fontSize": 20, | |
| "fontFamily": 1, | |
| "textAlign": "center", | |
| "verticalAlign": "top", | |
| "containerId": null, | |
| "originalText": "stronger protection from concurrency anomalies", | |
| "autoResize": true, | |
| "lineHeight": 1.2 | |
| } | |
| ], | |
| "appState": { | |
| "gridSize": null, | |
| "viewBackgroundColor": "#ffffff" | |
| }, | |
| "files": {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment