Re: BUG #17534: 'tablespace' option crushes 'create database' query with 'permission denied' message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: akdmnnakdm(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17534: 'tablespace' option crushes 'create database' query with 'permission denied' message
Date: 2022-06-28 18:08:16
Message-ID: 2699999.1656439696@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> 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.

I do not think this is a bug. The default tablespace is determined
by (copied from) the template database you use, and a user without
any tablespace-related privileges shouldn't be able to override that.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Janes 2022-06-28 19:31:14 Re: Auto-vacuum timing out and preventing connections
Previous Message David Johansen 2022-06-28 17:24:23 Re: Auto-vacuum timing out and preventing connections