Re: Huge number of pg_temp and pg_toast_temp schemas

2020-04-10 Thread Adrian Klaver
On 4/10/20 11:06 AM, Andrus wrote: Hi! Thank you. This is an unsurprising state, if you routinely have a hundred-plus connections that sometimes create temp tables.  Each such session needs schemas to keep its temp tables in.  The temp tables are deleted at session exit, but we don't bother to

Re: Huge number of pg_temp and pg_toast_temp schemas

2020-04-10 Thread Andrus
Hi! Thank you. This is an unsurprising state, if you routinely have a hundred-plus connections that sometimes create temp tables. Each such session needs schemas to keep its temp tables in. The temp tables are deleted at session exit, but we don't bother to remove the schema entries, figuring

Re: Huge number of pg_temp and pg_toast_temp schemas

2020-04-10 Thread Tom Lane
"Andrus" writes: > Hi! > Postgres 12 database contains huge number of pg_temp and pg_toast_temp > schemas named > pg_temp_1 .. pg_temp_126 > and > pg_toast_temp_1 .. pg_toast_temp_126 This is an unsurprising state, if you routinely have a hundred-plus connections that sometimes create temp tab