<?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[Customize PostgreSQL settings/limits]]></title><description><![CDATA[<p dir="auto">We are facing an issue with PostgreSQL on Cloudron and a fairly large table (+10Mio. rows). When issuing certain queries, involving many <code>LEFT JOINS</code>, PostgreSQL starts writing a lot of temporary data to disk.</p>
<p dir="auto">The default setting <code>temp_file_limit = -1</code> does not provide a limit for temporary data written to disk, the <code>SELECT</code> query however does encounter a hard limit, i.e. our server's available disk space.</p>
<p dir="auto">We observed that a SELECT query can fill the entire disk, writing more data in the process that the size of the database. Ideally, we would avoid generating queries that trigger this behavior, but the software used to generate the queries is not written by us.</p>
<p dir="auto">I would like PostgreSQL to terminate the query before filling the entire disk, triggering "out-of-disk-space" errors on the server and other applications. As far as I can tell, this is only achievable by setting <code>temp_file_limit</code> to something else than -1. I was able to verify this by setting the parameter temporarily, as outlined in <a href="https://forum.cloudron.io/topic/7714/postgresql-configuration-slow-log/7">https://forum.cloudron.io/topic/7714/postgresql-configuration-slow-log/7</a></p>
<p dir="auto">However, we would need to make this change permanent. Is there a way to accomplish this? In a similar spirit, it might also be interesting to be able to tune <code>work_mem</code> to something else than 4MB, utilizing more memory, instead of disk space, when necessary.</p>
]]></description><link>https://forum.cloudron.io/topic/11781/customize-postgresql-settings-limits</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 08:23:16 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/11781.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 May 2024 10:20:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Customize PostgreSQL settings/limits on Fri, 24 May 2024 07:52:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> perfect, thanks - appreciate it! I'm almost certain there could be ways to improve those queries, but it's always better to have a failsafe in place <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=44248645c10" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://forum.cloudron.io/post/88958</link><guid isPermaLink="true">https://forum.cloudron.io/post/88958</guid><dc:creator><![CDATA[msbt]]></dc:creator><pubDate>Fri, 24 May 2024 07:52:23 GMT</pubDate></item><item><title><![CDATA[Reply to Customize PostgreSQL settings/limits on Thu, 23 May 2024 19:43:06 GMT]]></title><description><![CDATA[<p dir="auto">I have set a hardcoded <code>temp_file_limit = 1GB</code> now in the global config itself. I think exceeding that already means that something is really wrong.</p>
]]></description><link>https://forum.cloudron.io/post/88929</link><guid isPermaLink="true">https://forum.cloudron.io/post/88929</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 23 May 2024 19:43:06 GMT</pubDate></item><item><title><![CDATA[Reply to Customize PostgreSQL settings/limits on Thu, 23 May 2024 19:39:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/msbt" aria-label="Profile: msbt">@<bdi>msbt</bdi></a> ah ok. I am trying to avoid creating a system where users can provide a custom conf file. If this is "generic", this may make the data itself unportable in the long run. For example, if users change the encoding, collation etc. Our addons have code that patch dump files etc based on apps.</p>
<p dir="auto">Also, my reading is that <code>temp_file_limit</code> is full installation level and it seems this doesn't cover temporary tables etc (per <a href="https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-TEMP-FILE-LIMIT" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-TEMP-FILE-LIMIT</a>) .</p>
<p dir="auto">With that in mid, I am wondering if this can be solved at directus level. There's no way to limit directus to not make a massive query? That seems quite a flaw, no? Like why is it creating GBs of temporary files to start with.</p>
]]></description><link>https://forum.cloudron.io/post/88925</link><guid isPermaLink="true">https://forum.cloudron.io/post/88925</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 23 May 2024 19:39:32 GMT</pubDate></item><item><title><![CDATA[Reply to Customize PostgreSQL settings/limits on Thu, 23 May 2024 15:03:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> it's not a custom app, it's a Cloudron Directus installation and the queries fetch data from it. I meant to say that I can't influence the structure of those queries (which already use <code>LIMIT 1</code>). So I'm not using PSQL as a custom DB, it's inside the Cloudron ecosystem <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=44248645c10" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://forum.cloudron.io/post/88904</link><guid isPermaLink="true">https://forum.cloudron.io/post/88904</guid><dc:creator><![CDATA[msbt]]></dc:creator><pubDate>Thu, 23 May 2024 15:03:21 GMT</pubDate></item><item><title><![CDATA[Reply to Customize PostgreSQL settings/limits on Thu, 23 May 2024 09:19:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/msbt" aria-label="Profile: msbt">@<bdi>msbt</bdi></a> If the queries are so big that they fill up the disk, this seems like an app issue . Given that this is your app, can the queries be reworked to have a <code>LIMIT</code>  to avoid this issue altogether ?</p>
<p dir="auto">But to answer your question, there is no way to persist addon values. The addons are designed to be used by apps and not a generic managed postgres .</p>
]]></description><link>https://forum.cloudron.io/post/88884</link><guid isPermaLink="true">https://forum.cloudron.io/post/88884</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 23 May 2024 09:19:35 GMT</pubDate></item></channel></rss>