Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQLkh-0007h3-IU for pgsql-general@arkaria.postgresql.org; Tue, 14 May 2019 00:57:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQLkg-0007zy-7Y for pgsql-general@arkaria.postgresql.org; Tue, 14 May 2019 00:57:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQLkf-0007yi-HG for pgsql-general@lists.postgresql.org; Tue, 14 May 2019 00:57:05 +0000 Received: from mail-oln040092003017.outbound.protection.outlook.com ([40.92.3.17] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQLkb-0005Px-FN for pgsql-general@postgresql.org; Tue, 14 May 2019 00:57:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8LBPGOoUj0Or0d4VQPw2AEAQwQlaosMAsXBSC4O4+oU=; b=RIYaSZmp9/rlCzcOXB8GPJuZDSTMbEuVkhUkJLzAXPquOWuq+bBYw4jLGo6zrE7VfLDAyxRLWtQv+NooXl0sQ4Fvg1iGE4yvVf0xr7SuVeikFYzrqksfqUg+DqsHvserBbVk7UTvIaklLmxj2ZTG88n7JLQHaxwqOgUEYAccBZbPSeAY0ccOLI5yN0bHoTGxZinCcmFLaUdOQm5jMrsJ9pjwAQO1/YcjtPf/UOA3/R4trzOuiu4XdnVPFn+SiiKFc4jhW1NPjR1kSVvZ3v1USsIxP1zGZZBo4DGYx0+JU0X+4VEQlxYXLfA0kqpBlX8Aa0S1ggia2KFbR1ELXZb26g== Received: from BL2NAM02FT003.eop-nam02.prod.protection.outlook.com (10.152.76.54) by BL2NAM02HT061.eop-nam02.prod.protection.outlook.com (10.152.76.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1856.11; Tue, 14 May 2019 00:56:59 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com (10.152.76.57) by BL2NAM02FT003.mail.protection.outlook.com (10.152.76.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1856.11 via Frontend Transport; Tue, 14 May 2019 00:56:59 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::d9fb:bca2:3018:3513]) by BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::d9fb:bca2:3018:3513%5]) with mapi id 15.20.1878.024; Tue, 14 May 2019 00:56:59 +0000 From: Julie Nishimura To: Adrian Klaver , "pgsql-general@lists.postgresql.org" , pgsql-general Subject: Re: does postgresql backup require additional space on disk Thread-Topic: does postgresql backup require additional space on disk Thread-Index: AQHVCbR8xRr2tap2vUK4vEBtNw+ap6ZpXXoAgAASmuSAAAw+AIAAAtZogAAYagCAAAmg0YAAE84AgAAFqXyAAAR/gIAAA+iPgAAIIgCAAAEWRQ== Date: Tue, 14 May 2019 00:56:59 +0000 Message-ID: References: <86c77c15-c089-a7fb-53d8-a6c14c9cd28a@aklaver.com> <757d70ad-259e-4032-f57a-b9b692ee00f5@aklaver.com> ,<55b69ec0-2210-0da8-66c3-fcc289f1bbcb@aklaver.com> In-Reply-To: <55b69ec0-2210-0da8-66c3-fcc289f1bbcb@aklaver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:6E5F67FF749C9CA174EF359D3FC26DE4286860B9144D63570D0F6B3CBCAD5A03;UpperCasedChecksum:B959BF015CB23F9331B94A41CE59E608A6CF73D4B389231460A2C682B27E25CE;SizeAsReceived:7705;Count:43 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [opkVpF3iN+vgeyEMVtCdiGfWIJNx+4FV] x-ms-publictraffictype: Email x-incomingheadercount: 43 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:BL2NAM02HT061; x-ms-traffictypediagnostic: BL2NAM02HT061: x-microsoft-antispam-message-info: A48aolJVNoZtuzzajy7+r9G+X6w7AZn1kYMOu0TJmlMjVrk3Xox475TKnblvDTFj5ax5VaxO01kYotKByVlcpx5tPkexyU1iWtR9GZ+KvnPvkPTF56XRIypgKOV6FvteeyFTlqbrAoz9nM/TXQFnHJHHWacTdKpjcnWDJBUP1FOeEqU3UdFXNleGQNLJ2Z6f Content-Type: multipart/alternative; boundary="_000_BYAPR08MB5014BCDBFCA23173C23F9015AC080BYAPR08MB5014namp_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 190e44c1-5bae-47ca-5012-08d6d807119f X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2019 00:56:59.0408 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT061 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_BYAPR08MB5014BCDBFCA23173C23F9015AC080BYAPR08MB5014namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable er_temp=3D# select * from pg_tables where tablename =3D 'test'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules |= hastriggers ------------+-----------+------------+------------+------------+----------+= ------------- public | test | build | | f | f |= f (1 row) ________________________________ From: Adrian Klaver 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 =3D 'vol3'; > > My postgresql.conf also lists the following: > default_tablespace =3D '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=3DFALSE > ) > TABLESPACE vol1; > > but if I run the following command, I have empty string as tablespace > > er_temp=3D# SELECT tablespace > FROM pg_tables > WHERE tablename =3D 'test' AND schemaname =3D 'public'; > tablespace > ------------ > > (1 row) Is test in the public schema? > > However, if I create new table, it will go to vol3: > > er_temp=3D# 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=3D# SELECT tablespace > FROM pg_tables > WHERE tablename =3D 'test_j' AND schemaname =3D '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 --_000_BYAPR08MB5014BCDBFCA23173C23F9015AC080BYAPR08MB5014namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
er_temp=3D# select * from pg_tables where tablename =3D 'test';
 schemaname | tablename | tableowner | tablespace | hasindexes | = hasrules | hastriggers
------------+-----------+------------+------------+---= ---------+----------+-------------
 public     | test      | build   &= nbsp;  |            | f     &n= bsp;    | f        | f
(1 row)


From: Adrian Klaver <a= drian.klaver@aklaver.com>
Sent: Monday, May 13, 2019 5:52 PM
To: Julie Nishimura; pgsql-general@lists.postgresql.org; pgsql-gener= al
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 t= o
> 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 =3D 'vol3';
>
> My postgresql.conf also lists the following:
> default_tablespace =3D '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=3DFALSE
> )
> TABLESPACE vol1;
>
> but if I run the following command, I have empty string as tablespace<= br> >
> er_temp=3D# SELECT tablespace
> FROM pg_tables
> WHERE tablename =3D 'test' AND schemaname =3D 'public';
>   tablespace
> ------------
>
> (1 row)

Is test in the public schema?

>
> However, if I create new table, it will go to vol3:
>
> er_temp=3D# 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=3D# SELECT tablespace
> FROM pg_tables
> WHERE tablename =3D 'test_j' AND schemaname =3D '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
--_000_BYAPR08MB5014BCDBFCA23173C23F9015AC080BYAPR08MB5014namp_--