<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[PostgreSQL Database blockchain maintenance&#x2F;optimize]]></title><description><![CDATA[<p dir="auto"><strong>Why do you need maintenance?</strong><br />
Over time, the bases in the postgres tend to grow, and begin to move more slowly due to problems with indexing. To solve these problems we use:</p>
<p dir="auto"><strong>REINDEX</strong> - operation of reindexing, fixing damaged indexes in the database.</p>
<p dir="auto"><strong>VACUUM</strong> - garbage collection. VACUUM recovers the space occupied by the "dead" data. When performing normal operations with data, PostgreSQL does not physically remove data from the tables; this happens with the FULL VACUUM operation.</p>
<p dir="auto"><strong>How to use db maintenance in SmartHoldem Node-A?</strong></p>
<p dir="auto">Log into the server<br />
<em>execute the following commands and wait for the operations to complete, it may take some time</em></p>
<pre><code>cd node
sh stop.sh

psql sth_smartholdem
REINDEX DATABASE sth_smartholdem;
vacuum full analyze;
\q

sh update.sh
</code></pre>
<p dir="auto">Maintenance operations are recommended once a month.</p>
]]></description><link>https://community.smartholdem.io/topic/509/postgresql-database-blockchain-maintenance-optimize</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 17:08:30 GMT</lastBuildDate><atom:link href="https://community.smartholdem.io/topic/509.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Dec 2018 03:37:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PostgreSQL Database blockchain maintenance&#x2F;optimize on Mon, 14 Jan 2019 12:28:22 GMT]]></title><description><![CDATA[<p dir="auto">or Create Script:</p>
<pre><code>nano reindex.sh
</code></pre>
<p dir="auto">insert</p>
<pre><code>psql "postgresql://$USER:password@127.0.0.1/sth_smartholdem" -c 'REINDEX DATABASE sth_smartholdem'
psql "postgresql://$USER:password@127.0.0.1/sth_smartholdem" -c 'vacuum full analyze'
</code></pre>
<p dir="auto">run</p>
<pre><code>sh reindex.sh
</code></pre>
]]></description><link>https://community.smartholdem.io/post/4523</link><guid isPermaLink="true">https://community.smartholdem.io/post/4523</guid><dc:creator><![CDATA[TechnoL0g]]></dc:creator><pubDate>Mon, 14 Jan 2019 12:28:22 GMT</pubDate></item></channel></rss>