From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vishwanath Kummera <kvishu83@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Postgresql : pg_temp & pg_toast_temp
Date: Thu, 07 Dec 2023 09:09:05 -0500
Message-ID: <1265147.1701958145@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGVcXb1uLMLN_cKyPVeBR3PPpESfSTh2L1wajd0qdX_i6Nmq-Q@mail.gmail.com>
References: <CAGVcXb1uLMLN_cKyPVeBR3PPpESfSTh2L1wajd0qdX_i6Nmq-Q@mail.gmail.com>
Vishwanath Kummera <kvishu83@gmail.com> writes:
> I am seeing there are many schemas created, this is specially when
> enabled "CONCURRENTLY" option for refreshing materialized views through
> table trigger.
> pg_temp_1... pg_temp_30
> pg_toast_temp_1... pg_toast_temp_30
Yes, that's by design. There's a separate temp schema for each backend
session "slot", which gets created when first needed.
> If this is by design the temp schemas get created with the "CONCURRENTLY"
> option, is there any way to clean-up them automatically?
No. It'd just lead to thrashing/bloat in the pg_namespace catalog,
since they'd be needed again eventually.
regards, tom lane
> Thanks,
> Vishu
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, kvishu83@gmail.com
Subject: Re: Postgresql : pg_temp & pg_toast_temp
In-Reply-To: <1265147.1701958145@sss.pgh.pa.us>
References: <CAGVcXb1uLMLN_cKyPVeBR3PPpESfSTh2L1wajd0qdX_i6Nmq-Q@mail.gmail.com> <1265147.1701958145@sss.pgh.pa.us>
* 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