From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: vaibhave postgres <postgresvaibhave@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Cc: vsekar@microsoft.com
Subject: Re: vacuumdb: permission denied for schema "pg_temp_7"
Date: Sat, 21 Sep 2024 14:59:51 +0900
Message-ID: <5f37ee56-14fb-44fe-9150-9eb97e10538b@oss.nttdata.com> (raw)
In-Reply-To: <2603142.1726873660@sss.pgh.pa.us>
References: <CAM_eQjwfAR=y3G1fGyS1U9FTmc+FyJm9amNfY2QCZBnDDbNPZg@mail.gmail.com>
<20240920190731.37.nmisch@google.com>
<Zu3iMzfiGBTbg3iy@nathan>
<20240920215030.8d.nmisch@google.com>
<2603142.1726873660@sss.pgh.pa.us>
On 2024/09/21 8:07, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
>>>>> That helps, but we'd probably want to do something more general about vacuumdb
>>>>> and schema USAGE permission.
>
> I agree a more general fix is needed, but I think excluding temp
> tables as suggested is a good idea for performance, independently of
> permissions concerns. vacuum_rel() will ignore requests to vacuum
> such tables, which is why we've not heard complaints before, but
> nonetheless we're wasting server round trips by issuing those
> requests.
+1
It looks like reindexdb has the same issue. It would be good to
update reindexdb to skip temp tables as well to fix this.
+ appendPQExpBufferStr(&catalog_query, " AND c.relpersistence <> 't'");
For the proposed patch, it seems better to use CppAsString2(RELPERSISTENCE_TEMP)
instead of 't'.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
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-bugs@postgresql.org
Cc: masao.fujii@oss.nttdata.com, tgl@sss.pgh.pa.us, noah@leadboat.com, nathandbossart@gmail.com, postgresvaibhave@gmail.com, pgsql-bugs@lists.postgresql.org, vsekar@microsoft.com
Subject: Re: vacuumdb: permission denied for schema "pg_temp_7"
In-Reply-To: <5f37ee56-14fb-44fe-9150-9eb97e10538b@oss.nttdata.com>
* 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