vacuumdb: permission denied for schema "pg_temp_7" - Mailing list pgsql-bugs

From vaibhave postgres
Subject vacuumdb: permission denied for schema "pg_temp_7"
Date
Msg-id CAM_eQjwfAR=y3G1fGyS1U9FTmc+FyJm9amNfY2QCZBnDDbNPZg@mail.gmail.com
Whole thread Raw
List 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

pgsql-bugs by date:

Previous
From: "Haifang Wang (Centific Technologies Inc)"
Date:
Subject: Windows Application Issues | PostgreSQL | REF # 51961374
Next
From: Thomas Munro
Date:
Subject: Re: Windows Application Issues | PostgreSQL | REF # 51961374