![]() ![]() ![]() sudo chown postgres:postgres database_archive.You can achieve this by changing the ownership of the directory using the chown command: You now need to give the default PostgreSQL user, postgres, permission to write to this directory. To do this, you must first create a new directory somewhere to archive the WAL files. In this first step, you need to configure your PostgreSQL 12 cluster to archive the cluster’s WAL files in a directory different from the cluster’s data directory. Step 1 - Configuring Continuous Archiving on the Database Cluster Step 1 of the How To Install and Use PostgreSQL on Ubuntu 20.04 tutorial covers the installation of PostgreSQL 12 on Ubuntu 20.04. The Initial Server Setup Guide will walk you through setting up the server including non-root users with the appropriate permissions. To complete this tutorial, you’ll need the following:Ī single machine running Ubuntu 20.04. In this tutorial, you will set up continuous archiving with a PostgreSQL 12 cluster on Ubuntu 20.04 and perform PITR on the cluster. That is, you can use the files to rollback a database cluster to a desirable point if an accident happens. For example, a secondary database cluster can use the archived WAL file for replication purposes, but you can also use the files to perform point-in-time-recovery (PITR). With continuous archiving, the WAL files are copied to secondary storage, which has a couple of benefits. PostgreSQL first records any transaction on the database to the WAL log files before it writes the changes to the database cluster’s data files. One method PostgreSQL uses to maintain ACID properties is Write-Ahead Logging (WAL). These are four key properties of database transactions that PostgreSQL supports to ensure the persistence and validity of data in the database. The acronym ACID stands for atomicity, consistency, isolation, and durability. PostgreSQL is a widely used relational database that supports ACID transactions. The author selected the Diversity in Tech Fund to receive a donation as part of the Write for DOnations program. ![]()
0 Comments
Leave a Reply. |