<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Archiving on Postgres Scripts</title><link>https://www.postgresscripts.com/tags/archiving/</link><description>Recent content in Archiving on Postgres Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>PostgresScripts.com</copyright><lastBuildDate>Sat, 23 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.postgresscripts.com/tags/archiving/index.xml" rel="self" type="application/rss+xml"/><item><title>Monitor PostgreSQL WAL Archiver Status with pg_stat_archiver</title><link>https://www.postgresscripts.com/post/monitor-postgresql-wal-archiver-status-with-pg-stat-archiver/</link><pubDate>Sat, 23 May 2026 00:00:00 +0000</pubDate><guid>https://www.postgresscripts.com/post/monitor-postgresql-wal-archiver-status-with-pg-stat-archiver/</guid><description>
&lt;h2 id="monitor-postgresql-wal-archiver-status-with-pg_stat_archiver"&gt;Monitor PostgreSQL WAL Archiver Status with pg_stat_archiver&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pg_stat_archiver&lt;/code&gt; is the canonical place to check whether PostgreSQL's continuous archiving is keeping up — a single-row view that exposes &lt;code&gt;last_archived_wal&lt;/code&gt;, &lt;code&gt;last_failed_wal&lt;/code&gt;, and the rolling failure count without parsing log files. On a healthy cluster the row is uninteresting; on a stalled cluster it is the difference between catching a problem in minutes and finding a full WAL volume on Saturday night.&lt;/p&gt;
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="7945792173"
data-ad-format="auto"
data-full-width-responsive="true"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;h2 id="purpose-and-overview"&gt;Purpose and Overview&lt;/h2&gt;
&lt;p&gt;A PostgreSQL cluster configured for continuous archiving runs the &lt;code&gt;archive_command&lt;/code&gt; (or &lt;code&gt;archive_library&lt;/code&gt; on PostgreSQL 15+) once per finalized WAL segment. The command's job is to copy the segment somewhere durable — typically S3, NFS, or a backup server — so the WAL stream can later feed point-in-time recovery (PITR) or warm-standby replay. When the archive command fails (target unreachable, disk full, permission revoked, network partition), PostgreSQL retries continuously, &lt;code&gt;pg_wal&lt;/code&gt; accumulates segments, and the cluster eventually fills its WAL volume. At that point writes stop until space is freed.&lt;/p&gt;</description></item></channel></rss>