BUG #16318: The default tablespace of a table and index is not inheriting the tablespace of database

Started by PG Bug reporting formabout 6 years ago3 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 16318
Logged by: Jackey
Email address: jackeylhm@gmail.com
PostgreSQL version: 11.6
Operating system: Ubuntu
Description:

I created a table and an index without specifying a tablespace name, and
expect the table and index will use the database's tablespace. But I found
the table and index is using the server's setting default_tablespace,
instead of the database's tablespace. Is this a bug? or this is the expected
behavior? I come from an Oracle DBA 's background, expecting all objects
created in a database will inherit the tablespace's setting of the database.

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: PG Bug reporting form (#1)
Re: BUG #16318: The default tablespace of a table and index is not inheriting the tablespace of database

On Wed, Mar 25, 2020 at 8:05 PM PG Bug reporting form <
noreply@postgresql.org> wrote:

The following bug has been logged on the website:

Bug reference: 16318
Logged by: Jackey
Email address: jackeylhm@gmail.com
PostgreSQL version: 11.6
Operating system: Ubuntu
Description:

I created a table and an index without specifying a tablespace name, and
expect the table and index will use the database's tablespace. But I found
the table and index is using the server's setting default_tablespace,
instead of the database's tablespace.

Per the documentation [1], if you actually specified a non-empty value for
default_tablespace its not a bug, if the default_tablespace is undefined
then the tablespace of the database, which defaults to the default
tablespace anway, should have been used.

Is this a bug? or this is the expected

behavior? I come from an Oracle DBA 's background, expecting all objects
created in a database will inherit the tablespace's setting of the
database.

A basic self-contained example would allow for a conclusive answer as
specific values or various settings and objects are important here.

David J.
1. https://www.postgresql.org/docs/12/manage-ag-tablespaces.html

#3Jackey Lin
jackeylhm@gmail.com
In reply to: David G. Johnston (#2)
Re: BUG #16318: The default tablespace of a table and index is not inheriting the tablespace of database

Thanks a lot, David

For your clarification and help.

Regards
Jackey

On Thu, Mar 26, 2020 at 11:40 AM David G. Johnston <
david.g.johnston@gmail.com> wrote:

Show quoted text

On Wed, Mar 25, 2020 at 8:05 PM PG Bug reporting form <
noreply@postgresql.org> wrote:

The following bug has been logged on the website:

Bug reference: 16318
Logged by: Jackey
Email address: jackeylhm@gmail.com
PostgreSQL version: 11.6
Operating system: Ubuntu
Description:

I created a table and an index without specifying a tablespace name, and
expect the table and index will use the database's tablespace. But I
found
the table and index is using the server's setting default_tablespace,
instead of the database's tablespace.

Per the documentation [1], if you actually specified a non-empty value for
default_tablespace its not a bug, if the default_tablespace is undefined
then the tablespace of the database, which defaults to the default
tablespace anway, should have been used.

Is this a bug? or this is the expected

behavior? I come from an Oracle DBA 's background, expecting all objects
created in a database will inherit the tablespace's setting of the
database.

A basic self-contained example would allow for a conclusive answer as
specific values or various settings and objects are important here.

David J.
1. https://www.postgresql.org/docs/12/manage-ag-tablespaces.html