vacuumdb: permission denied for schema "pg_temp_7"

From: vaibhave postgres <postgresvaibhave(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: vsekar(at)microsoft(dot)com
Subject: vacuumdb: permission denied for schema "pg_temp_7"
Date: 2024-07-06 11:49:39
Message-ID: CAM_eQjwfAR=y3G1fGyS1U9FTmc+FyJm9amNfY2QCZBnDDbNPZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Repo steps

1. Create a temporary table

sample => CREATE TEMPORARY TABLE temp_employees (
> id SERIAL PRIMARY KEY,
> name VARCHAR(100),
> position VARCHAR(50),
> salary NUMERIC(10, 2)
> );
> CREATE TABLE
> sample => \dt pg_temp_*.*
> List of relations
> Schema | Name | Type | Owner
> -----------+----------------+-------+----------
> pg_temp_7 | temp_employees | table | vaibhave
> (1 row)

2. Run vacuumdb

vacuumdb: vacuuming database "sample"
> vacuumdb: error: processing of database " sample " failed: ERROR:
> permission denied for schema pg_temp_7

Temporary tables can only be accessed within the session which created
them. They should be skipped during vacuumdb.

Suggested Patch is attached

Attachment Content-Type Size
0001-Skip-temporary-tables-in-vacuumdb.patch application/octet-stream 820 bytes

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2024-07-07 07:16:56 Re: Windows Application Issues | PostgreSQL | REF # 51961374
Previous Message Haifang Wang (Centific Technologies Inc) 2024-07-05 22:00:11 Windows Application Issues | PostgreSQL | REF # 51961374