pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julie Nishimura <juliezain@hotmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: does postgresql backup require additional space on disk
Date: Tue, 14 May 2019 00:56:59 +0000
Message-ID: <BYAPR08MB5014BCDBFCA23173C23F9015AC080@BYAPR08MB5014.namprd08.prod.outlook.com> (raw)
In-Reply-To: <55b69ec0-2210-0da8-66c3-fcc289f1bbcb@aklaver.com>
References: <BYAPR08MB5014E959330C8E249341F66CAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com>
	<d8c3b0a7-c193-3742-d20e-ba046dcf88cb@aklaver.com>
	<BYAPR08MB50143AA1AD0D453066431EDCAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com>
	<86c77c15-c089-a7fb-53d8-a6c14c9cd28a@aklaver.com>
	<BYAPR08MB5014591FBC5C2CCE085813CAAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com>
	<be1cbd4a-8796-f835-2677-e88dcb184272@aklaver.com>
	<BYAPR08MB5014D98A67FBD6F9A3F92AEEAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com>
	<e417b666-8e49-205c-9532-276e8a053cc1@aklaver.com>
	<BYAPR08MB50146EEF3401259093DA929BAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com>
	<757d70ad-259e-4032-f57a-b9b692ee00f5@aklaver.com>
	<BYAPR08MB50145897CE48A0C4D55475A6AC080@BYAPR08MB5014.namprd08.prod.outlook.com>
	<55b69ec0-2210-0da8-66c3-fcc289f1bbcb@aklaver.com>

er_temp=# select * from pg_tables where tablename = 'test';
 schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers
------------+-----------+------------+------------+------------+----------+-------------
 public     | test      | build      |            | f          | f        | f
(1 row)

________________________________
From: Adrian Klaver <adrian.klaver@aklaver.com>
Sent: Monday, May 13, 2019 5:52 PM
To: Julie Nishimura; pgsql-general@lists.postgresql.org; pgsql-general
Subject: Re: does postgresql backup require additional space on disk

On 5/13/19 5:39 PM, Julie Nishimura wrote:
> LOL. Adrian, I so appreciate your help.
>
> So, since this server is obviously very old, and it seems like 3 other
> tablespaces were added in the past (vol1 - 2.7 tb, vol2 - 2.7 tb, vol3 -
> 16 tb), and I am about to add another vol - vol4 (4 tb), I am trying to
> see where the objects are actually located.
>
> So, for example, working only with one database at a time.
>
> The database has the following:
> ALTER DATABASE er_temp
>    SET default_tablespace = 'vol3';
>
> My postgresql.conf also lists the following:
> default_tablespace = 'vol3'
>
> There is one table "test", and its DDL (according to PGAdmin):
> CREATE TABLE test
> (
>    id integer,
>    key character varying,
>    value character varying
> )
> WITH (
>    OIDS=FALSE
> )
> TABLESPACE vol1;
>
> but if I run the following command, I have empty string as tablespace
>
> er_temp=# SELECT tablespace
> FROM pg_tables
> WHERE tablename = 'test' AND schemaname = 'public';
>   tablespace
> ------------
>
> (1 row)

Is test in the public schema?

>
> However, if I create new table, it will go to vol3:
>
> er_temp=# CREATE TABLE test_j
> er_temp-# (
> er_temp(#   id integer,
> er_temp(#   key character varying,
> er_temp(#   value character varying
> er_temp(# );
> CREATE TABLE
> er_temp=# SELECT tablespace
> FROM pg_tables
> WHERE tablename = 'test_j' AND schemaname = 'public';
>   tablespace
> ------------
>   vol3
> (1 row)
>
> So, why would tablespace for "test" show as empty string if it is not
> default? Where are the files for "test" table?
>
> Thanks,
> Julie



--
Adrian Klaver
adrian.klaver@aklaver.com

view thread (17+ messages)  latest in thread

Message-ID: <BYAPR08MB5014BCDBFCA23173C23F9015AC080@BYAPR08MB5014.namprd08.prod.outlook.com>
Permalink:  ../BYAPR08MB5014BCDBFCA23173C23F9015AC080@BYAPR08MB5014.namprd08.prod.outlook.com/
Also on:    postgresql.org/message-id/BYAPR08MB5014BCDBFCA23173C23F9015AC080@BYAPR08MB5014.namprd08.prod.outlook.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: juliezain@hotmail.com, adrian.klaver@aklaver.com
  Subject: Re: does postgresql backup require additional space on disk
  In-Reply-To: <BYAPR08MB5014BCDBFCA23173C23F9015AC080@BYAPR08MB5014.namprd08.prod.outlook.com>
  References: <BYAPR08MB5014E959330C8E249341F66CAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com> <d8c3b0a7-c193-3742-d20e-ba046dcf88cb@aklaver.com> <BYAPR08MB50143AA1AD0D453066431EDCAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com> <86c77c15-c089-a7fb-53d8-a6c14c9cd28a@aklaver.com> <BYAPR08MB5014591FBC5C2CCE085813CAAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com> <be1cbd4a-8796-f835-2677-e88dcb184272@aklaver.com> <BYAPR08MB5014D98A67FBD6F9A3F92AEEAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com> <e417b666-8e49-205c-9532-276e8a053cc1@aklaver.com> <BYAPR08MB50146EEF3401259093DA929BAC0F0@BYAPR08MB5014.namprd08.prod.outlook.com> <757d70ad-259e-4032-f57a-b9b692ee00f5@aklaver.com> <BYAPR08MB50145897CE48A0C4D55475A6AC080@BYAPR08MB5014.namprd08.prod.outlook.com> <55b69ec0-2210-0da8-66c3-fcc289f1bbcb@aklaver.com> <BYAPR08MB5014BCDBFCA23173C23F9015AC080@BYAPR08MB5014.namprd08.prod.outlook.com>

* 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