Data consistency techniques for PostgreSQL-compatible systems
Abstract
Techniques discussed herein relate to an object-relational database management system (ODMS) (e.g., a PostgreSQL ODMS) that utilizes a shared block storage volume (SBSV) for storage. The SBSV may utilize a file system that enables a single-writer-multiple reader model in which a primary computing node may read or write to the SBSV and one or more replica computing nodes are restricted from writing to the SBSV. To enable the primary computing node to write data at its own pace, regardless of the status of synchronization at each of the one or more replica computing nodes, the SBSV may include a staging area that maintains data that has not yet been updated at one or more of the replica computing nodes. When the primary computing node no longer maintains the data in local memory, the one or more replica computing nodes may obtain the data from the staging area of the SBSV.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 14 · Forward citations: 0.
Claims (21 — 3 Independent, 18 Dependent)
- Claim 1Independent Claim
A computer-implemented method comprising: executing, by a cluster of computing nodes of a cloud computing environment, an object-relational database management system comprising a primary node and one or more replica nodes each concurrently sharing read access to a single block storage volume comprising a staging area and a main area, the staging area and the main area collectively storing data corresponding to a single instance of an object-relational database to which access is concurrently shared by the primary node and the one or more replica nodes; receiving, by the primary node of the cluster of computing nodes, a write operation comprising data to be written to the single instance of the object-relational database; writing, by the primary node of the cluster, the data to the staging area within the single block storage volume; maintaining, by the primary node of the cluster, a location of the data within the staging area within an in-memory map stored at the primary node of the cluster; and writing, by the primary node of the cluster, metadata corresponding to the write operation within a journal specific to the single block storage volume, wherein writing the metadata within the journal causes the metadata to be transmitted to one or more replica nodes.
- Claim 2Depends on #1
The computer-implemented method of claim 1, wherein the primary node is configured as a sole writer for the single block storage volume, and wherein the one or more replica nodes have read-only access to the single block storage volume.
- Claim 3Depends on #1
The computer-implemented method of claim 1, further comprising: receiving, at a read-replica node of the cluster of computing nodes, a read operation requesting second data to be read from the object-relational database; determining, by the read-replica node, whether the second data is stored in the staging area; in response to determining that the second data is stored in the staging area, retrieving the second data from the staging area of the single block storage volume; and in response to determining that the second data is not stored in the staging area, retrieving the second data from the main area of the single block storage volume.
- Claim 4Depends on #1
The computer-implemented method of claim 1, wherein the one or more replica nodes are configured to provide respective log sequence numbers to the single block storage volume, each respective log sequence number indicating a last log sequence number that has been replayed by a respective replica node, wherein the single block storage volume stores a minimum log sequence number selected from the respective log sequence numbers provided by the one or more replica nodes.
- Claim 5Depends on #4
The computer-implemented method of claim 4, wherein previously-stored data is subsequently evicted from the staging area based at least in part on the minimum log sequence number.
- Claim 6Depends on #5
The computer-implemented method of claim 5, wherein the previously-stored data is evicted based at least in part on determining that the data is associated with one or more corresponding log sequence numbers that are less than the minimum log sequence number, wherein evicting the data comprising moving the data from the staging area to the main area of the single block storage volume.
- Claim 7Depends on #6
The computer-implemented method of claim 6, further comprising: receiving, by the primary node, a subsequent write operation comprising third data and an additional log sequence number, the additional log sequence number being less than the minimum log sequence number; and writing, by the primary node, the third data corresponding to the subsequent write operation to the main area of the single block storage volume.
- Claim 8Depends on #7
The computer-implemented method of claim 7, further comprising registering, by the primary node, as a writer of the cluster with a block storage service, wherein the block storage service is configured to accept a write request from a single primary node and reject write requests from nodes other than the single primary node.
- Claim 9Independent Claim
A computing device, comprising: one or more processors; and one or more memories that store computer-executable instructions that, when executed by the one or more processors, cause the one or more processors to: execute, as one of a cluster of computing nodes of a cloud computing environment, an object-relational database management system comprising a primary node and one or more replica nodes, the cluster of computing nodes, each concurrently sharing access to a single block storage volume comprising a staging area and a main area that collectively store a single instance of an object-relational database to which access is concurrently shared by the primary node and the one or more replica nodes; receive a write operation comprising data to be written to the single instance of the object-relational database; write the data to the single block storage volume, wherein the data is written to the staging area when a log sequence number associated with the data is greater than a minimum log sequence number associated with the staging area, and wherein the data is written to the main area when the log sequence number associated with the data is less than or equal to the minimum log sequence number associated with the staging area; and maintain a location of the data within the single block storage volume within an in-memory map stored at the primary node.
- Claim 10Depends on #9
The computing device of claim 9, wherein executing the computer-executable instructions further causes the one or more processors to write metadata corresponding to the write operation within a journal specific to the single block storage volume, wherein writing the metadata within the journal causes the one or more replica nodes to materialize a page using the single instance of the object-relational database.
- Claim 11Depends on #9
The computing device of claim 9, wherein the staging area and the main area are automatically resized by a file system process based at least in part on usage.
- Claim 12Depends on #9
The computing device of claim 9, wherein a replica node of the one or more replica nodes is configured to determine that the primary node is unhealthy and, in response, register with a block storage control plane, as a new primary node of the cluster.
- Claim 13Depends on #12
The computing device of claim 12, wherein the replica node is selected by a management plane component of the object-relational database management system.
- Claim 14Independent Claim
A computer-readable medium comprising one or more memories storing computer-executable instructions that, when executed by one or more processors of a cloud computing environment, cause the one or more processors to: execute at least a portion of an object-relational database management system comprising a cluster of computing nodes, the cluster of computing nodes comprising a primary node and one or more replica nodes, the cluster of computing nodes each concurrently sharing read access to a single block storage volume comprising a staging area and a main area, the staging area and the main area of the single block storage volume collectively storing a single instance of an object-relational database to which access is concurrently shared by the primary node and the one or more replica nodes; receive a read request for data of the single instance of the object-relational database that is stored within the single block storage volume; obtain the data from the single instance of the object-relational database stored in the single block storage volume, the data being obtained from the staging area or the main area based at least in part on a minimum log sequence number associated with the single block storage volume; store the data within local memory; update the data in the local memory based at least in part on one or more journal entries corresponding to the data, the one or more journal entries indicating respective modifications to the object-relational database; and respond to the read request based at least in part on the data updated in local memory.
- Claim 15Depends on #14
The computer-readable medium of claim 14, wherein the minimum log sequence number is an earliest log sequence number that has been replayed by the one or more replica nodes.
- Claim 16Depends on #14
The computer-readable medium of claim 14, wherein the single block storage volume, the staging area, and the main area are automatically scalable.
- Claim 17Depends on #14
The computer-readable medium of claim 14, wherein executing the computer-executable instructions further causes the one or more processors to maintain an identifier of a location of the data within the single block storage volume.
- Claim 18Depends on #14
The computer-readable medium of claim 14, wherein the one or more replica nodes are configured to read journal entries provided by the primary node, and wherein reading the journal entries causes the one or more replica nodes to update in-memory data.
- Claim 19Depends on #14
The computer-readable medium of claim 14, wherein the single block storage volume utilizes a distributed filesystem that enables multiple nodes to concurrently access the single block storage volume and supports a single-writer-multiple-reader access model.
- Claim 20Depends on #14
The computer-readable medium of claim 14, wherein the data is obtained from a first portion of the single instance of the object-relational database within the staging area when a page identifier associated with the data is associated with a log sequence number that is greater than the minimum log sequence number, and wherein the data is obtained from a second portion of the single instance of the object-relational database within the main area when the log sequence number that is less than or equal to the minimum log sequence number.
- Claim 21Depends on #14
The computer-readable medium of claim 14, wherein the object-relational database management system is a PostgreSQL object-relational database management system.
Technical Overview & Description
BACKGROUND Cloud-based database management systems, particularly PostgreSQL, have become essential for environments requiring high availability and scalability. As an open-source object-relational database, PostgreSQL has been widely adopted due to its flexibility and robustness. However, managing data consistency and synchronization between primary and replica nodes presents significant challenges with respect to maintaining respective copies of the data. In traditional implementations, read replicas are synchronized with the primary node through Write-Ahead Logging (WAL), which replicates changes asynchronously. This introduces a lag in replica nodes, making it difficult to guarantee data consistency during the delay. Existing solutions, such as using external page servers or delaying writes until all replicas are ready, add latency and complexity, making it difficult to maintain both performance and consistency in environments with multiple replicas. As a result, there is a need for a more efficient approach that allows read replicas to remain synchronized without compromising performance. BRIEF SUMMARY Techniques are provided for providing a PostgreSQL object-relational database management system that is configured to maintain data for an object-relational database within a shared block storage volume (e.g., a block storage volume that is shared between a primary computing node and one or more replica computing nodes). Various embodiments are described herein, including methods, systems, non-transitory computer-readable storage media storing programs, code, or instructions executable by one or more processors, and the like. One embodiment is directed to a method for performing write operations by an object-relational database management system (ODMS) (e.g., a PostgreSQL ODMS). The method may comprise executing, by a cluster of computing nodes of a cloud computing environment, the object-relational database management system comprising a primary node and one or m
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (14)
Non-Patent Literature (1)
- U.S. Appl. No. 18/946,846, Non-Final Office Action, mailed on Jan. 28, 2026, 22 pages.