
{"id":5791,"date":"2024-07-10T09:05:28","date_gmt":"2024-07-10T09:05:28","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=5791"},"modified":"2024-07-10T11:49:42","modified_gmt":"2024-07-10T11:49:42","slug":"postgresql-mvcc","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/","title":{"rendered":"PostgreSQL MVCC"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction: <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">PostgreSQL is The Most powerful open-source relational database system that uses a sophisticated concurrency control mechanism called Multi-Version Concurrency Control (MVCC). MVCC is fundamental for maintaining data consistency and enabling concurrent transactions without locking issues. This blog post will delve into the intricacies of PostgreSQL MVCC, provide practical examples, and outline best practices to follow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What is MVCC?<br>MVCC, or Multi-Version Concurrency Control, is a database management technique that provides a consistent view of the database to each transaction by maintaining multiple versions of data. This allows concurrent transactions to read and write data without interfering with each other, thus improving performance and maintaining data integrity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How MVCC Works in PostgreSQL<br>PostgreSQL implements MVCC by keeping multiple versions of a data row. Each row version is tagged with transaction IDs that indicate when the row was created and when it was deleted (if applicable). This mechanism allows PostgreSQL to provide a snapshot of the database at the start of each transaction, ensuring a consistent view.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Key Concepts<br>Transaction ID (TXID): A unique identifier assigned to each transaction.<br>Snapshot: A view of the database at a particular point in time.<br>Visibility Rules: Determine which version of a row is visible to a transaction based on TXIDs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step1: create table<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">creating the table <code>phone<\/code> with the columns <code>id<\/code> and <code>balance<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# create table phone (id int, balance money);\nCREATE TABLE<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"> insert a row into the table:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# insert into phone values (1,100);\nINSERT 0 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">insert a row into the table:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# insert into phone values (2,200);\nINSERT 0 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We then add two more rows and check the values:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# insert into phone values (3,300),(4,400);\nINSERT 0 2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verify the update:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# select * from phone ;\n id | balance \n----+---------\n  1 | $100.00\n  2 | $200.00\n  3 | $300.00\n  4 | $400.00\n(4 rows)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Hidden columns<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<code>*<\/code>&nbsp;does return all the columns but hidden:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# select ctid,xmin,Xmax, *from phone;\n ctid  | xmin | xmax | id | balance \n-------+------+------+----+---------\n (0,1) |  742 |    0 |  1 | $100.00\n (0,2) |  743 |    0 |  2 | $200.00\n (0,3) |  744 |    0 |  3 | $300.00\n (0,4) |  744 |    0 |  4 | $400.00\n(4 rows)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ctid &#8211; a row identifier within the page.<\/li>\n\n\n\n<li>xmin &#8211; an ID of the transaction created the row.<\/li>\n\n\n\n<li>xmax &#8211; an ID of the transaction deleted the row    <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s necessary for its MVCC engine. Postgres can store several versions of a single row at a time and those hidden columns help to control the visibility of the versions for running transactions\/queries<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Begin a Transaction<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">Start a transaction and run a few experiments:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Begin the transaction:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# begin;\nBEGIN <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get the current value of the second row:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select ctid, xmin, xmax, * from account where id = 2;\nctid  | xmin | xmax | id | balance\n-------+------+------+----+---------\n(0,2) |  743 |    0 |  2 | $200.00\n(1 row)\n      <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Update&nbsp; the balance:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=*#  update phone set balance = 450 where id=2;\nUPDATE 1\n  <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Read the row back:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=*# select  ctid, xmin, xmax, * from phone where id=2;\n ctid  | xmin | xmax | id | balance \n-------+------+------+----+---------\n (0,5) |  745 |    0 |  2 | $450.00\n(1 row)\n\n  <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=*# select txid_current_if_assigned();\n txid_current_if_assigned \n--------------------------\n                      745\n(1 row)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">See that the xmin is equal to the ID of the current started transaction:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Connect a database <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open another session with Postgres and read the value of the record that is being modified:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">connect to database<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;postgres@localhost ~]$ psql -p 5432 -d mydb -U postgres\npsql (16.3)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Read the row:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# select  ctid, xmin, xmax, * from phone where id=2;\n ctid  | xmin | xmax | id | balance \n-------+------+------+----+---------\n (0,2) |  743 |  745 |  2 | $200.00\n(1 row)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This version has different ctid, xmin and xmax when compared to the version that was created by the first transaction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, in the first session, commit the transaction:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=*# commit;\nCOMMIT<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the second session, read the row one more time:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# select  ctid, xmin, xmax, * from phone where id=2;\n ctid  | xmin | xmax | id | balance \n-------+------+------+----+---------\n (0,5) |  745 |    0 |  2 | $450.00\n(1 row)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That new version of the row was committed and is visible to all future queries\/transactions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Best Practices for Using MVCC in PostgreSQL<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. Use Appropriate Isolation Levels<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">PostgreSQL supports different isolation levels: Read Uncommitted, Read Committed, Repeatable Read, and Serializable. Choose the appropriate level based on your application&#8217;s consistency and performance requirements.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Read Committed:<\/strong> Suitable for most applications, providing a balance between performance and consistency.<\/li>\n\n\n\n<li><strong>Repeatable Read:<\/strong> Use when you need to ensure that reads within a transaction are consistent.<\/li>\n\n\n\n<li><strong>Serializable:<\/strong> Provides the highest level of isolation but can impact performance due to increased locking.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">2. Keep Transactions Short<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Long-running transactions can lead to increased bloat and impact database performance. Aim to keep transactions as short as possible to reduce the number of old row versions and improve MVCC efficiency.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. Regularly Vacuum the Database<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Vacuuming helps to reclaim storage occupied by dead row versions and maintain MVCC performance. Schedule regular <code>VACUUM<\/code> operations, especially on frequently updated tables.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4. Monitor and Manage Bloat<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Bloat occurs when the database accumulates too many dead row versions. Use tools like <code>pg_stat_user_tables<\/code> and <code>pgstattuple<\/code> to monitor bloat and take corrective actions.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">5. Optimize Queries and Indexes<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Efficient queries and proper indexing can minimize the impact on MVCC performance. Use EXPLAIN to analyze query plans and create indexes to speed up data retrieval.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PostgreSQL&#8217;s MVCC is a robust mechanism that allows for efficient and concurrent data access while maintaining consistency. By understanding how MVCC works and following best practices, you can optimize your PostgreSQL database for better performance and reliability. Whether you&#8217;re handling basic transactions or managing complex concurrent operations, MVCC ensures your data remains consistent and accessible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: PostgreSQL is The Most powerful open-source relational database system that uses a sophisticated concurrency control mechanism called Multi-Version Concurrency [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":5808,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[23,42,89],"tags":[],"class_list":["post-5791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql-14","category-postgresql-15","category-postgresql-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PostgreSQL MVCC - OpenSource DB<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL MVCC - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"Introduction: PostgreSQL is The Most powerful open-source relational database system that uses a sophisticated concurrency control mechanism called Multi-Version Concurrency [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/\" \/>\n<meta property=\"og:site_name\" content=\"OpenSource DB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-10T09:05:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-10T11:49:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"945\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Shameer Bhupathi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:site\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shameer Bhupathi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/\"},\"author\":{\"name\":\"Shameer Bhupathi\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5\"},\"headline\":\"PostgreSQL MVCC\",\"datePublished\":\"2024-07-10T09:05:28+00:00\",\"dateModified\":\"2024-07-10T11:49:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/\"},\"wordCount\":696,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png\",\"articleSection\":[\"PostgreSQL 14\",\"PostgreSQL 15\",\"PostgreSQL 16\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/\",\"name\":\"PostgreSQL MVCC - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png\",\"datePublished\":\"2024-07-10T09:05:28+00:00\",\"dateModified\":\"2024-07-10T11:49:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png\",\"width\":1800,\"height\":945},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL MVCC\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"name\":\"OpenSource DB\",\"description\":\"Your Trusted OpenSource Databases partner\",\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\",\"name\":\"OPENSOURCE DB PRIVATE LIMITED\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"width\":368,\"height\":120,\"caption\":\"OPENSOURCE DB PRIVATE LIMITED\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\",\"https:\/\/x.com\/opensource_db\",\"https:\/\/www.youtube.com\/channel\/UCmTI5h\",\"https:\/\/www.linkedin.com\/company\/opensource-db\",\"https:\/\/www.instagram.com\/opensource_db\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5\",\"name\":\"Shameer Bhupathi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2cfa95999202132ded07acd24f6faf25dca145a6c3efe47919204f115ffbf625?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2cfa95999202132ded07acd24f6faf25dca145a6c3efe47919204f115ffbf625?s=96&d=mm&r=g\",\"caption\":\"Shameer Bhupathi\"},\"url\":\"https:\/\/test.opensource-db.in\/wp1\/author\/shameer-bhupathi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PostgreSQL MVCC - OpenSource DB","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"PostgreSQL MVCC - OpenSource DB","og_description":"Introduction: PostgreSQL is The Most powerful open-source relational database system that uses a sophisticated concurrency control mechanism called Multi-Version Concurrency [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2024-07-10T09:05:28+00:00","article_modified_time":"2024-07-10T11:49:42+00:00","og_image":[{"width":1800,"height":945,"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png","type":"image\/png"}],"author":"Shameer Bhupathi","twitter_card":"summary_large_image","twitter_creator":"@opensource_db","twitter_site":"@opensource_db","twitter_misc":{"Written by":"Shameer Bhupathi","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/"},"author":{"name":"Shameer Bhupathi","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5"},"headline":"PostgreSQL MVCC","datePublished":"2024-07-10T09:05:28+00:00","dateModified":"2024-07-10T11:49:42+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/"},"wordCount":696,"commentCount":0,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png","articleSection":["PostgreSQL 14","PostgreSQL 15","PostgreSQL 16"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/","url":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/","name":"PostgreSQL MVCC - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png","datePublished":"2024-07-10T09:05:28+00:00","dateModified":"2024-07-10T11:49:42+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png","width":1800,"height":945},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-mvcc\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL MVCC"}]},{"@type":"WebSite","@id":"https:\/\/test.opensource-db.in\/wp1\/#website","url":"https:\/\/test.opensource-db.in\/wp1\/","name":"OpenSource DB","description":"Your Trusted OpenSource Databases partner","publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/test.opensource-db.in\/wp1\/#organization","name":"OPENSOURCE DB PRIVATE LIMITED","url":"https:\/\/test.opensource-db.in\/wp1\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","width":368,"height":120,"caption":"OPENSOURCE DB PRIVATE LIMITED"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","https:\/\/x.com\/opensource_db","https:\/\/www.youtube.com\/channel\/UCmTI5h","https:\/\/www.linkedin.com\/company\/opensource-db","https:\/\/www.instagram.com\/opensource_db\/"]},{"@type":"Person","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5","name":"Shameer Bhupathi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2cfa95999202132ded07acd24f6faf25dca145a6c3efe47919204f115ffbf625?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2cfa95999202132ded07acd24f6faf25dca145a6c3efe47919204f115ffbf625?s=96&d=mm&r=g","caption":"Shameer Bhupathi"},"url":"https:\/\/test.opensource-db.in\/wp1\/author\/shameer-bhupathi\/"}]}},"rttpg_featured_image_url":{"full":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png",1800,945,false],"landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png",1800,945,false],"portraits":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png",1800,945,false],"thumbnail":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1-150x150.png",150,150,true],"medium":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1-300x158.png",300,158,true],"large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1-1024x538.png",1024,538,true],"1536x1536":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1-1536x806.png",1536,806,true],"2048x2048":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png",1800,945,false],"ultp_layout_landscape_large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png",1200,630,false],"ultp_layout_landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png",870,457,false],"ultp_layout_portrait":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png",600,315,false],"ultp_layout_square":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/07\/image-3-1.png",600,315,false]},"rttpg_author":{"display_name":"Shameer Bhupathi","author_link":"https:\/\/test.opensource-db.in\/wp1\/author\/shameer-bhupathi\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-14\/\" rel=\"category tag\">PostgreSQL 14<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-15\/\" rel=\"category tag\">PostgreSQL 15<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-16\/\" rel=\"category tag\">PostgreSQL 16<\/a>","rttpg_excerpt":"Introduction: PostgreSQL is The Most powerful open-source relational database system that uses a sophisticated concurrency control mechanism called Multi-Version Concurrency [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/comments?post=5791"}],"version-history":[{"count":10,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5791\/revisions"}],"predecessor-version":[{"id":5809,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5791\/revisions\/5809"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media\/5808"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=5791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=5791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=5791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}