pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: akdmnnakdm@gmail.com
Subject: BUG #17534: 'tablespace' option crushes 'create database' query with 'permission denied' message
Date: Tue, 28 Jun 2022 08:39:21 +0000
Message-ID: <17534-fcb8fb4c81cd17b6@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17534
Logged by:          Nick Nalbantov
Email address:      akdmnnakdm@gmail.com
PostgreSQL version: 14.4
Operating system:   Windows
Description:        

Here's an old problem (look at
https://dba.stackexchange.com/questions/204807/why-do-i-get-a-postgresql-permission-error-when-speci...),
but it's still reproducible in PG 15b1 on Windows and PG13 on Debian 10

If some user with createdb privilege would try to create database with
'tablespace = pg_default' option, query will fail with ERROR:  42501
But same query without  'tablespace = pg_default' option would work fine,
and new database will be created at pg_default tablespace as expected.

Steps to reproduce:

psql -U postgres -d postgres
create role test with login password '123' createdb;
\q

psql -U test -d postgres
\set VERBOSITY verbose
CREATE DATABASE test 
OWNER = test 
ENCODING = UTF8 
TABLESPACE = pg_default; -- query works as expected if this line is
missing

ERROR:  42501: permission denied for tablespace pg_default
LOCATION:  aclcheck_error, aclchk.c:3652



view thread (2+ messages)  latest in thread

Message-ID: <17534-fcb8fb4c81cd17b6@postgresql.org>
Permalink:  ../17534-fcb8fb4c81cd17b6@postgresql.org/
Also on:    postgresql.org/message-id/17534-fcb8fb4c81cd17b6@postgresql.org

 · 

reply

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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, akdmnnakdm@gmail.com
  Subject: Re: BUG #17534: 'tablespace' option crushes 'create database' query with 'permission denied' message
  In-Reply-To: <17534-fcb8fb4c81cd17b6@postgresql.org>

* 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