MasahikoSawada
About Archives Categories Slides
  • Burning PostgreSQL transaction IDs.

    2023/12/21 PostgreSQL, Vacuum

    PostgreSQL’s transaction ID (hereafter XID) is internally represendted as a “monotoronicaly increasing 32-bit unsigned integer value”, so after reaching 2^32-1 (approximately 4 billion) it wraps around back to 0. In PostgreSQL, each transaction that modifies the database such as INSERT, UPDATE and even DDLs is assigned a unique XID. Since the order of XIDs is used to check the visibility of tuples in tables, if XID wraps around after reaching the upper limit, this logic would break.

    Read more →

  • PostgreSQLで(わかりづらい)bannerプログラム作ってみた

    2023/12/08 PostgreSQL

    これはPostgreSQL Advent calendar 2023シリーズ2の8日目の記事です。

    Read more →

  • ALTER TABLEの各コマンドのロックレベル

    2023/05/08 PostgreSQL

    ALTER TABLEコマンドは各サブコマンドによってテーブルへのロックレベルが異なります。ソースを見るのが一番正確なのですが、いつも確認するのが面倒なのでまとめてみました。

    Read more →

  • ストリーミングレプリケーションプロトロルで遊ぶ

    2023/04/06 PostgreSQL, Replication

    PostgreSQLには物理レプリケーションと論理レプリケーションの2種類のレプリケーションがありますが、どちらもサーバ間の通信にはストリーミングレプリケーションプロトロル(以下、長いのでレプリケーションプロトロルとします)を使用して、データを送っています。

    Read more →

  • PostgreSQLの色んなINSERTの仕方

    2023/01/31 PostgreSQL

    使用するテーブル

    Read more →

« Newer Older »

© 2024 Masahiko Sawada. Hosted by GitHub and powered by Jekyll.
日本語 English