PostgreSQL is an open-source relational database management system (RDBMS) that’s popular for its reliability, feature set, and community support. This guide walks you through running PostgreSQL on an Archil disk. PostgreSQL doesn’t need to know anything about Archil or S3 — it just reads and writes files to its data directory as usual. By pointing that data directory at an Archil mount, you get:Documentation Index
Fetch the complete documentation index at: https://docs.archil.com/llms.txt
Use this file to discover all available pages before exploring further.
- Elastic storage: no need to provision or resize disks as your database grows
- S3 durability: all data is automatically synchronized to S3 in the background
- Pay for what you use: you’re only billed for active data, not provisioned capacity
- Portability: unmount from one server and mount on another to move your database
Create an Archil disk
First, follow the Archil Getting Started Guide to create an Archil disk.Install PostgreSQL
The exact instructions for installing PostgreSQL will vary depending on your operating system. For example, on Amazon Linux 2023, you can install PostgreSQL with the following command:systemctl command
/mnt/archil/pgdata.
Connect and use your database
Now that PostgreSQL is running on Archil, you can connect to it and use it normally with thepsql command or from
an application. PostgreSQL is unaware of Archil — it reads and writes files to its data directory like it normally
would. Archil handles caching those files on fast SSD storage and asynchronously synchronizing them to S3.
When your database is idle, you’re not charged for Archil’s high-speed cache — you only pay for the data stored in S3.
(Optional) Run pgbench benchmarks to validate performance
First, install thepgbench tool.