pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Julie Nishimura <juliezain@hotmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: default_tablespace in 8.3 postgresql
Date: Wed, 15 May 2019 14:11:09 -0700
Message-ID: <ba93d346-fdfa-ce68-be91-7b3ecc20f543@aklaver.com> (raw)
In-Reply-To: <BYAPR08MB50145E1F8A325628D62870F5AC090@BYAPR08MB5014.namprd08.prod.outlook.com>
References: <BYAPR08MB50140E0F61E51CAB861B9DEAAC090@BYAPR08MB5014.namprd08.prod.outlook.com>
	<b2823aab-d8f7-e145-2065-aba20bb7a23b@aklaver.com>
	<BYAPR08MB50141ABB3D3816BDA9D0F583AC090@BYAPR08MB5014.namprd08.prod.outlook.com>
	<CAKFQuwZ3Mfzq_jNbaLpvij_yx7OHv_5E5kW5aFvYZcY_x6-GVQ@mail.gmail.com>
	<BYAPR08MB50145E1F8A325628D62870F5AC090@BYAPR08MB5014.namprd08.prod.outlook.com>

On 5/15/19 1:57 PM, Julie Nishimura wrote:
> This puzzles me too! I found that bizarre myself. What is even more 
> interesting, we have about 80 databases, and all of them now have 
> default_tablespace=vol4, except only one - "control" database. The only 
> explanation I would have that all of those databases which have 
> tablespace vol4 as default were copied from template1 without explicitly 
> specified tablespace name...
> 
> postgres=# select * from pg_database limit 10;
>             datname           | datdba | encoding | datistemplate | 
> datallowconn | datconnlimit | datlastsysoid | datfrozenxid | 
> dattablespace |         datconfig         |                       datacl
> -----------------------------+--------+----------+---------------+--------------+--------------+---------------+--------------+---------------+---------------------------+-----------------------------------------------------
>   template0                   |     10 |        0 | t             | f   
>           |           -1 |         11510 |          378 |          1663 
> |                           | {=c/postgres,postgres=CTc/postgres}
>   postgres                    |     10 |        0 | f             | t   
>           |           -1 |         11510 |      7554523 |          1663 
> |                           |
>   control                     |  16389 |        6 | f             | t   
>           |           -1 |         11510 |      7554887 |         16384 
> | {default_tablespace=vol1} | {=T/dba,dba=CTc/dba,oper=c/dba,nagios=c/dba}
>   template1                   |     10 |        0 | t             | t   
>           |           -1 |         11510 |      7554847 |         16384 
> | {default_tablespace=vol4} | {=c/postgres,postgres=CTc/postgres}
>   conversion_alerts_fs        |  16393 |        0 | f             | t   
>           |           -1 |         11510 |      7554847 |         16384 
> | {default_tablespace=vol4} | 
> {=T/build,build=CTc/build,tableau_readonly=c/build}
>   conversion_feasibility_too  |  16393 |        0 | f             | t   
>           |           -1 |         11510 |      7554847 |         16384 
> | {default_tablespace=vol4} |
>   conversion_feasibility_tool |  16393 |        0 | f             | t   
>           |           -1 |         11510 |      7554847 |         16384 
> | {default_tablespace=vol4} |
>   custom_searches_au          |  16393 |        6 | f             | t   
>           |           -1 |         11510 |      7554847 |         16384 
> | {default_tablespace=vol4} | 
> {=T/build,build=CTc/build,tableau_readonly=c/build}
> 
> I've found that very bizarre myself, that default_tablespace would be 
> changed for already existing databases without me altering it explicitly...
> Sigh

Can we see an example of the script you used to modify the databases?

> ------------------------------------------------------------------------
> *From:* David G. Johnston <david.g.johnston@gmail.com>
> *Sent:* Wednesday, May 15, 2019 1:23 PM
> *To:* Julie Nishimura
> *Cc:* Adrian Klaver; pgsql-general@lists.postgresql.org
> *Subject:* Re: default_tablespace in 8.3 postgresql
> On Wed, May 15, 2019 at 1:01 PM Julie Nishimura <juliezain@hotmail.com 
> <mailto:juliezain@hotmail.com>> wrote:
> 
>     However, since I have modified template1 (and most likely, those
>     databases were copied from it in the past), it changed
>     default_parameter for them as well.
> 
> 
> This seems unlikely to be the case - changing template1 should not be 
> affecting other existing databases.
> 
> David J.
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (21+ messages)  latest in thread

Message-ID: <ba93d346-fdfa-ce68-be91-7b3ecc20f543@aklaver.com>
Permalink:  ../ba93d346-fdfa-ce68-be91-7b3ecc20f543@aklaver.com/
Also on:    postgresql.org/message-id/ba93d346-fdfa-ce68-be91-7b3ecc20f543@aklaver.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: adrian.klaver@aklaver.com, juliezain@hotmail.com, david.g.johnston@gmail.com
  Subject: Re: default_tablespace in 8.3 postgresql
  In-Reply-To: <ba93d346-fdfa-ce68-be91-7b3ecc20f543@aklaver.com>
  References: <BYAPR08MB50140E0F61E51CAB861B9DEAAC090@BYAPR08MB5014.namprd08.prod.outlook.com> <b2823aab-d8f7-e145-2065-aba20bb7a23b@aklaver.com> <BYAPR08MB50141ABB3D3816BDA9D0F583AC090@BYAPR08MB5014.namprd08.prod.outlook.com> <CAKFQuwZ3Mfzq_jNbaLpvij_yx7OHv_5E5kW5aFvYZcY_x6-GVQ@mail.gmail.com> <BYAPR08MB50145E1F8A325628D62870F5AC090@BYAPR08MB5014.namprd08.prod.outlook.com> <ba93d346-fdfa-ce68-be91-7b3ecc20f543@aklaver.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