<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=Delete_Postgres_Archive</id>
	<title>Delete Postgres Archive - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=Delete_Postgres_Archive"/>
	<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Delete_Postgres_Archive&amp;action=history"/>
	<updated>2026-05-04T18:43:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Delete_Postgres_Archive&amp;diff=1440&amp;oldid=prev</id>
		<title>Michael: Created page with &quot;==== Delete Old Postgres Archive ==== &#039;&#039;&#039;Note: PCM 3.x&#039;&#039;&#039; &lt;pre&gt; HPC 3.0 keep the data of the ReportDB in PostgreSQL database.  Any host statuses, job statuses are recorded in ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Delete_Postgres_Archive&amp;diff=1440&amp;oldid=prev"/>
		<updated>2012-12-07T12:25:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==== Delete Old Postgres Archive ==== &amp;#039;&amp;#039;&amp;#039;Note: PCM 3.x&amp;#039;&amp;#039;&amp;#039; &amp;lt;pre&amp;gt; HPC 3.0 keep the data of the ReportDB in PostgreSQL database.  Any host statuses, job statuses are recorded in ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==== Delete Old Postgres Archive ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note: PCM 3.x&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HPC 3.0 keep the data of the ReportDB in PostgreSQL database. &lt;br /&gt;
Any host statuses, job statuses are recorded in the database. &lt;br /&gt;
The transactions are also logged in this pg_wal directory as archive.&lt;br /&gt;
&lt;br /&gt;
As a result, a 16MB get created regularly pending the number of jobs submitted and the &lt;br /&gt;
host status. This can quickly fill up the /var disk partition.&lt;br /&gt;
&lt;br /&gt;
These archive files only use for roll forward on the &amp;#039;Standby server&amp;#039; and not use on the&lt;br /&gt;
headnode for recovery. The old archive can be remove up to the last few days.&lt;br /&gt;
&lt;br /&gt;
There is no practical recommendation from Platform on how may days worth of Postgres&lt;br /&gt;
archive should be retain. Perhaps just the last 3 to 5 days.&lt;br /&gt;
&lt;br /&gt;
To remove the old archive file, use pg_archivecleanup. See below:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Remove old Postgres archive file&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Ref: http://developer.postgresql.org/pgdocs/postgres/pgarchivecleanup.html&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
pg_archivecleanup -d /var/lib/pgsql/9.0/data/pg_wal 000000010000000000000042.00000046.backup&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
pg_archivecleanup has a strange syntax. &lt;br /&gt;
&amp;#039;000000010000000000000042&amp;#039; means from file &amp;#039;00000042&amp;#039; to file &amp;#039;00000046&amp;#039; and beyond &lt;br /&gt;
should be retain. Unable to find an explanation on the web for the syntax.&lt;br /&gt;
&lt;br /&gt;
It can be just &amp;#039;000000010000000000000042.00000043.backup&amp;#039;. You do need prefixing 43 with&lt;br /&gt;
000000, otherwise get syntax error/invalid filename.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michael</name></author>
	</entry>
</feed>