Unreleased
These notes describe the changes since v2.0.0 that have not yet been released. The Changelog summarizes them.
Overview
This release adds ColdFront tiered storage to pgEdge Distributed Postgres clusters. ColdFront keeps recent data in native Postgres partitions and archives older data to Apache Iceberg tables on S3-compatible storage, readable and writable through the same SQL.
Its main features are:
- New
install_coldfront,setup_coldfront_dbandsetup_coldfrontroles that add ColdFront to the pgEdge nodes, and newinstall_lakekeeperandsetup_lakekeeperroles that build the Lakekeeper Iceberg catalog it commits through, on a host of its own. - A mesh mode that orders cold-tier commits across every node of a Spock cluster. ColdFront also runs on Ultra-HA clusters, which require mesh mode.
- New
simple-cluster-coldfrontandultra-ha-coldfrontsample playbooks and inventories. See ColdFront Configuration.
Upgrading from v2.0.0
ColdFront is optional, and nothing changes for a cluster that does not set
coldfront_enabled. Playbooks and inventories written for v2.0.0 need no
changes.
Changes
Added
- New
install_coldfrontandsetup_coldfrontroles add ColdFront tiered storage to a pgEdge Distributed Postgres node. Recent data stays in native Postgres partitions, and older data archives to Iceberg tables on S3-compatible storage. Newinstall_lakekeeperandsetup_lakekeeperroles build Lakekeeper, the Iceberg REST catalog ColdFront commits through, on a host of its own with a Postgres instance for the catalog, whichsetup_lakekeeperinitializes and runs as its ownlakekeeper-postgresservice. On a later run,setup_lakekeeperupdates the warehouse's storage profile where it differs from thecoldfront_s3_*settings, sending the credential with it, and restarts Lakekeeper when its environment file is newer than the process. Lakekeeper does not return the stored credential, so a changed access key or secret key alone does not reach the warehouse. (EE-40) - New
coldfront_enabledparameter addspg_duckdbandcoldfronttoshared_preload_libraries, and ColdFront's settings to the Postgres configurationsetup_postgreswrites.setup_postgresapplies them like any other parameter, restarting one node at a time wherepg_allow_restartallows. The newsetup_coldfront_dbrole then checks that the libraries have loaded and creates ColdFront's role, database and extensions. The settings ColdFront depends on are parameters the collection controls, soinit_serverrefusespg_parametersthat sets them; its tuning settings are defaultspg_parametersmay override.install_coldfrontruns beforesetup_postgres, andsetup_coldfront_dbafter it. The test playbooks run the ColdFront roles only wherecoldfront_enabledis set, and the ColdFront sample playbooks always. See ColdFront Configuration. (EE-40) - New
lakekeeper_*andcoldfront_s3_*parameters locate the catalog and the S3-compatible object store behind the cold tier. Any S3-compatible store works, and the collection deploys none. (EE-40) init_serverrefusescoldfront_enabledon an HA cluster withoutcoldfront_mesh, withoutlakekeeper_host, without a bucket, region, access key and secret key for the object store, with acoldfront_s3_endpointthat is not anhttp(s)://host[:port]URL, or with apg_versionoutsidecoldfront_supported_pg_versions. It refuses a Lakekeeper host whoselakekeeper_db_passwordis still the default, whosepg_port,lakekeeper_portandlakekeeper_metrics_portcollide, or that is also in thepgedgegroup. Like every other host, the Lakekeeper host runsinit_serverfirst. (EE-40)- The new
sample-playbooks/simple-cluster-coldfront/playbook sets up a simple cluster with ColdFront and its Lakekeeper host in the same run, with a play for thelakekeepergroup and the ColdFront roles in thepgedgeplay, and its inventory shows the settings. ColdFront is optional, so the plainsimple-clustersample leaves it out. The simple-cluster end-to-end test takes ColdFront as a layer, deploying with the ColdFront sample playbook:tests/run-test.sh ... coldfront, or the workflow'scoldfrontinput, adds a Lakekeeper host and a SeaweedFS object store fromtests/compose/coldfront-*.ymlandtests/inventories/coldfront.yml. It then checks that the catalog serves its warehouse, that ColdFront's libraries load beside Spock and Snowflake, and that a decoupled Iceberg table accepts a write and returns it.tests/render/check-patroni.pychecks ColdFront's parameter layer, andtests/render/check-validate.pychecksinit_server's refusals.tests/playbooks/coldfront-reconfigure.yml, run with the layer, checks that re-applying the ColdFront and Lakekeeper roles changes nothing, and that turning ColdFront off and on again on a running cluster restarts each node to load or unload its libraries. (EE-40) coldfront_mesh: truehas ColdFront order cold-tier commits across every node of a Spock cluster, following upstream's mesh setup. It needscoldfront_dbindb_names, whichinit_serverchecks, so thatsetup_postgresandsetup_pgedgeput the ColdFront database into Spock and the worker and slot sizing counts it. Mesh mode addscoldfront.dblink_selfto ColdFront's parameters, andcoldfront.peer_alive_window_msandwal_receiver_status_intervalto its tuning defaults.setup_coldfront_dbcreates thedblinkextension with ColdFront's others, beforesetup_pgedgeputs the database into Spock.setup_coldfrontadds ColdFront's bakery and catalog tables to Spock'sdefaultreplication set, and sets the storage secret on the first pgEdge node only, since Spock carries it to the others.coldfront.peer_alive_window_mssets how long the bakery waits on a peer that reports no replication progress. The simple-cluster end-to-end test runs ColdFront in mesh mode withtests/run-test.sh ... coldfront meshor the workflow'smeshinput, and then checks that the bakery is armed and its tables replicate, and has every node write to one table at once. (EE-40)- ColdFront runs on HA clusters in mesh mode. Its libraries and settings reach
every member through the zone's Patroni configuration, which
setup_patronikeeps up to date with the rest of the parameters.setup_coldfrontasks each node's Postgres whether it is a standby, runs its SQL on the leader only, and has each replica write its own DuckDB secret from the replicatedcoldfront.storage_secretrow withcoldfront.materialize_storage_secret(), since physical replication does not carry the file DuckDB keeps it in.setup_coldfront_dbruns aftersetup_patroniand creates ColdFront's role, database and extensions on each zone's leader. The archiver, partitioner and compactor connect through the zone's endpoint, the onesetup_pgedgesubscribes through.init_serverrefuses ColdFront on an HA cluster withoutcoldfront_mesh, since Patroni'spg_hbaadmitsdb_userthrough the zone's proxies only to the databases indb_names. (EE-40) - The new
sample-playbooks/ultra-ha-coldfront/playbook sets up an Ultra-HA cluster with ColdFront in mesh mode and its Lakekeeper host, and its inventory shows the settings. The plainultra-hasample leaves it out. The Ultra-HA end-to-end test takes the ColdFront layer, always in mesh mode, throughtests/run-test.sh ultra-ha ... coldfrontor the workflow'scoldfrontinput. Its verification now expects ColdFront's libraries in the preload list wherecoldfront_enabledis set, andtests/verify/verify-ultra-ha-coldfront.ymlthen checks that every member, replicas included, loads ColdFront, has its bakery armed, replicates the bakery's and catalog's tables and holds the storage secret, that both zones' leaders can write to one table at once without losing a row, that every member reads every row, and that a replica refuses a cold-tier write. The recovery test does not run with ColdFront. (EE-40)