<?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[Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there?]]></title><description><![CDATA[<p dir="auto">Postgresql contain 21 GB of data on my Cloudron server that only has a single app: Baserow</p>
<p dir="auto">The baserow database itself only contains around a hundred records, nothing huge.<br />
So, I wonder why the postgresql on that server is so huge. Can I login to it and navigate the PG DB directly? Or is there another simpler/smarter way to understand what's being stored there?</p>
<pre><code>$ du -h --max-depth=1
21G	./postgresql
84K	./addons
197M	./mysql
20K	./oidc
518M	./mongodb
136K	./nginx
4.0K	./tls
16K	./logrotate.d
4.0K	./cifs
12K	./backup
4.0K	./acme
4.0K	./sshfs
236K	./update
8.0K	./diskusage
24K	./sftp
524K	./redis
207M	./logs
4.0K	./firewall
12K	./collectd
48M	./graphite
22G	.
</code></pre>
]]></description><link>https://forum.cloudron.io/topic/13193/postgre-db-is-big-20-gb-how-can-i-understand-what-s-stored-there</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 03:12:47 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/13193.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Jan 2025 05:47:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Thu, 30 Jan 2025 15:56:49 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, I have put this info in <a href="https://docs.cloudron.io/apps/baserow/#log-retention" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/apps/baserow/#log-retention</a></p>
]]></description><link>https://forum.cloudron.io/post/100938</link><guid isPermaLink="true">https://forum.cloudron.io/post/100938</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 30 Jan 2025 15:56:49 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Thu, 30 Jan 2025 14:53:28 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">Yes, you can set BASEROW_ENTERPRISE_AUDIT_LOG_RETENTION_DAYS to control how long audit logs are kept. Setting this to 30 days would automatically prune logs older than a month.<br />
Actions (which power the undo/redo functionality) can also take up significant space. Consider setting BASEROW_JOB_CLEANUP_INTERVAL_MINUTES to run cleanup more frequently.<br />
You can also adjust BASEROW_ROW_HISTORY_RETENTION_DAYS to limit how long row history is kept.</p>
</blockquote>
<blockquote>
<p dir="auto">I am not familiar with Cloudron but make sure you are also removing old docker images as they also often take up space</p>
</blockquote>
<blockquote>
<p dir="auto">and if you are on a Debian based OS and you do updates often the occasional sudo apt auto-remove won’t hurt…<br />
I suspect you have the bulk of the data in the table you found but these are a couple more things you can check that I often see people forget as well</p>
</blockquote>
<p dir="auto">From my discussion with the Cloudron team</p>
]]></description><link>https://forum.cloudron.io/post/100932</link><guid isPermaLink="true">https://forum.cloudron.io/post/100932</guid><dc:creator><![CDATA[AmbroiseUnly]]></dc:creator><pubDate>Thu, 30 Jan 2025 14:53:28 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Thu, 30 Jan 2025 14:49:20 GMT]]></title><description><![CDATA[<p dir="auto">My <code>env.sh</code></p>
<pre><code># Add Baserow customizations here (https://baserow.io/docs/installation/configuration)

export BASEROW_BACKEND_LOG_LEVEL=INFO

# Changed default because I don't have Enterprise plan and don't have a need for audit log
# But I'm interested in retention history for a bit longer
# See https://forum.cloudron.io/topic/13193/postgre-db-is-big-20-gb-how-can-i-understand-what-s-stored-there/9?_=1738227461250
export BASEROW_ROW_HISTORY_RETENTION_DAYS=365
export BASEROW_ENTERPRISE_AUDIT_LOG_RETENTION_DAYS=30

</code></pre>
]]></description><link>https://forum.cloudron.io/post/100931</link><guid isPermaLink="true">https://forum.cloudron.io/post/100931</guid><dc:creator><![CDATA[AmbroiseUnly]]></dc:creator><pubDate>Thu, 30 Jan 2025 14:49:20 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Thu, 30 Jan 2025 14:34:47 GMT]]></title><description><![CDATA[<p dir="auto">I ran</p>
<pre><code>SELECT relname AS table_name,
       pg_size_pretty(pg_total_relation_size(relid)) AS total_size,
       pg_size_pretty(pg_relation_size(relid)) AS table_size,
       pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) AS index_size
FROM pg_catalog.pg_statio_user_tables
ORDER BY pg_total_relation_size(relid) DESC;

</code></pre>
<p dir="auto">And got</p>
<p dir="auto"><img src="/assets/uploads/files/1738247557236-21ed435a-2bc4-4b1c-8ba5-16f02079a296-image.png" alt="image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">So it seems what's taking space are 2 items:</p>
<ul>
<li>History of audit, which is useless to me because I'm not "enterprise" (and don't plan on switching plan)</li>
<li>History of rows, which is definitely useful but I need to be careful because I'm storing data related to crypto and value of each crypto, so changes happen every couple minute on each row</li>
</ul>
]]></description><link>https://forum.cloudron.io/post/100930</link><guid isPermaLink="true">https://forum.cloudron.io/post/100930</guid><dc:creator><![CDATA[AmbroiseUnly]]></dc:creator><pubDate>Thu, 30 Jan 2025 14:34:47 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Thu, 30 Jan 2025 10:05:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ambroiseunly" aria-label="Profile: AmbroiseUnly">@<bdi>AmbroiseUnly</bdi></a> look into which table of db7fdba71d461b44c481e0b8aa8ec62681 is taking space .</p>
]]></description><link>https://forum.cloudron.io/post/100914</link><guid isPermaLink="true">https://forum.cloudron.io/post/100914</guid><dc:creator><![CDATA[joseph]]></dc:creator><pubDate>Thu, 30 Jan 2025 10:05:51 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Thu, 30 Jan 2025 09:12:40 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1738228277260-f01d6ed6-9573-49e4-bffc-ac30cff86161-image.png" alt="image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">So, db7fdba71d461b44c481e0b8aa8ec62681 is taking 21GB</p>
<p dir="auto">So it'd be <code>db7fdb</code>, where is the "Dashboard" you mentioned? I didn't understand that part</p>
]]></description><link>https://forum.cloudron.io/post/100907</link><guid isPermaLink="true">https://forum.cloudron.io/post/100907</guid><dc:creator><![CDATA[AmbroiseUnly]]></dc:creator><pubDate>Thu, 30 Jan 2025 09:12:40 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Thu, 30 Jan 2025 08:59:42 GMT]]></title><description><![CDATA[<p dir="auto">Okay! I thought about the logs but the folder <code>./logs</code> mislead me, as I thought it couldn't be that because it was so small. Didn't think there would be both logs in the filesystem and in the db. I'll try to have a look into the db then.</p>
]]></description><link>https://forum.cloudron.io/post/100903</link><guid isPermaLink="true">https://forum.cloudron.io/post/100903</guid><dc:creator><![CDATA[AmbroiseUnly]]></dc:creator><pubDate>Thu, 30 Jan 2025 08:59:42 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Tue, 28 Jan 2025 07:49:14 GMT]]></title><description><![CDATA[<p dir="auto">Reading fail on my part, sorry. <a class="plugin-mentions-user plugin-mentions-a" href="/user/ambroiseunly" aria-label="Profile: AmbroiseUnly">@<bdi>AmbroiseUnly</bdi></a> so the next step is to determine which table in baserow is taking much space. Could be logs as @humptydumpty mentioned. You can access the db from Web Terminal and click the postgres button on nav bar</p>
]]></description><link>https://forum.cloudron.io/post/100762</link><guid isPermaLink="true">https://forum.cloudron.io/post/100762</guid><dc:creator><![CDATA[joseph]]></dc:creator><pubDate>Tue, 28 Jan 2025 07:49:14 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Mon, 27 Jan 2025 23:45:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ambroiseunly" aria-label="Profile: AmbroiseUnly">@<bdi>AmbroiseUnly</bdi></a> I don’t use baserow but I’ve ran into something similar with other apps and it was the log files. Check the upstream docs and in-app to locate them. Report this upstream too.</p>
]]></description><link>https://forum.cloudron.io/post/100756</link><guid isPermaLink="true">https://forum.cloudron.io/post/100756</guid><dc:creator><![CDATA[humpty]]></dc:creator><pubDate>Mon, 27 Jan 2025 23:45:32 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Mon, 27 Jan 2025 23:42:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joseph" aria-label="Profile: joseph">@<bdi>joseph</bdi></a> I think he knows which app it’s related to (baserow) but doesn’t understand why it’s so big given he has 100 rows of data only.</p>
]]></description><link>https://forum.cloudron.io/post/100755</link><guid isPermaLink="true">https://forum.cloudron.io/post/100755</guid><dc:creator><![CDATA[humpty]]></dc:creator><pubDate>Mon, 27 Jan 2025 23:42:28 GMT</pubDate></item><item><title><![CDATA[Reply to Postgre DB is big (20+GB) - How can I understand what&#x27;s stored there? on Mon, 27 Jan 2025 09:10:22 GMT]]></title><description><![CDATA[<p dir="auto">I guess some app is storing a lot in postgres. With some help from ChatGPT:</p>
<pre><code>docker exec -it postgresql /bin/bash
psql -Uroot  --dbname=postgres
</code></pre>
<p dir="auto">Then, run this query in postgresql prompt:</p>
<pre><code>SELECT pg_database.datname AS database_name,
       pg_size_pretty(pg_database_size(pg_database.datname)) AS size
FROM pg_database
ORDER BY pg_database_size(pg_database.datname) DESC;
</code></pre>
<p dir="auto">This gives a bunch of daabase names like <code>dbf88f51a1c41249a6947427dedb491dfd</code>. Take the first 6 characters like <code>f88f51a1</code> and put in the search field in the dashboard. This will reveal the app.</p>
]]></description><link>https://forum.cloudron.io/post/100685</link><guid isPermaLink="true">https://forum.cloudron.io/post/100685</guid><dc:creator><![CDATA[joseph]]></dc:creator><pubDate>Mon, 27 Jan 2025 09:10:22 GMT</pubDate></item></channel></rss>