Re: Tablespace Default Behavior - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Tablespace Default Behavior
Date
Msg-id 0ea76052-95d9-f222-933d-4c0853692518@aklaver.com
Whole thread Raw
In response to Re: Tablespace Default Behavior  (harpagornis <shenlong@runbox.com>)
Responses Re: Tablespace Default Behavior  (harpagornis <shenlong@runbox.com>)
List pgsql-general
On 03/30/2017 07:35 AM, harpagornis wrote:
> In PgAdmin, when I right-click the table, in the Properties pane on the right
> side of the screen,  the tablespace is listed as "pg_default"

What we know. Correct me if I am wrong:

1) In postgresql.conf you have:
default_tablespace = ''

2) You created a table in the database:

CREATE TABLE myschema.mytable (rc_id integer NOT NULL) TABLESPACE
my_space;

FYI, the TABLESPACE is redundant as the table would created in my_space
anyway as it is the default for the database

3) When you queried pg_tables, the tablespace field is NULL for the
table. Which would be correct:
https://www.postgresql.org/docs/9.6/static/catalogs.html
tablespace     name     pg_tablespace.spcname     Name of tablespace containing
table (null if default for database)

4) pgAdmin shows the tablespace as being pg_default for the table.

What we do not know:

1) Postgres version

2) pgAdmin version

3) select spcname  from pg_database join pg_tablespace on
pg_database.dattablespace=pg_tablespace.oid  where datname= your_db_name;

>
>
>
> --
> View this message in context: http://www.postgresql-archive.org/Tablespace-Default-Behavior-tp5952910p5953028.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unexpected interval comparison
Next
From: harpagornis
Date:
Subject: Re: Tablespace Default Behavior