From: Grigory Smolkin <g.smolkin@postgrespro.ru>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Fun fact about autovacuum and orphan temp tables
Date: Mon, 5 Sep 2016 17:05:00 +0300
Message-ID: <5b48a2e8-571a-d24f-6a4a-cd5744e6f1dc@postgrespro.ru> (raw)
In-Reply-To: <20160905133440.GA671130@alvherre.pgsql>
References: <20160905133440.GA671130@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 09/05/2016 04:34 PM, Alvaro Herrera wrote:
> Grigory Smolkin wrote:
>
>> Funny part is that it never drops them. So when backend is finally
>> terminated, it tries to drop them and fails with error:
>>
>> FATAL: out of shared memory
>> HINT: You might need to increase max_locks_per_transaction
>>
>> If I understand that rigth, we are trying to drop all these temp tables in
>> one transaction and running out of locks to do so.
> Hmm, yeah, I suppose it does that, and it does seem pretty inconvenient.
> It is certainly pointless to hold onto these locks for temp tables. I
> wonder how ugly would be to fix this problem ...
>
Thank you for your interest in this problem.
I dont think this is a source of problem. Ugly fix here would only force
backend to terminate properly.
It will not help at all in cause of server crash or power outage.
We need a way to tell autovacuum, that we don`t need orphan temp tables,
so they can be removed using existing routine.
The least invasive solution would be to have a guc, something like
'keep_orphan_temp_tables' with boolean value.
Which would determine a autovacuum worker policy toward encountered
orphan temp tables.
--
Grigory Smolkin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: g.smolkin@postgrespro.ru, alvherre@2ndquadrant.com
Subject: Re: Fun fact about autovacuum and orphan temp tables
In-Reply-To: <5b48a2e8-571a-d24f-6a4a-cd5744e6f1dc@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox