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 1hR131-0003Mo-00 for pgsql-general@arkaria.postgresql.org; Wed, 15 May 2019 21:02:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hR12z-0003Dr-Ec for pgsql-general@arkaria.postgresql.org; Wed, 15 May 2019 21:02:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hR12z-0003Am-01 for pgsql-general@lists.postgresql.org; Wed, 15 May 2019 21:02:45 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hR12w-0002Q9-K8 for pgsql-general@lists.postgresql.org; Wed, 15 May 2019 21:02:44 +0000 Received: by mail-pg1-x544.google.com with SMTP id w22so387521pgi.6 for ; Wed, 15 May 2019 14:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=77A+hKaPUxjfFonaDQE7CetqlCkuc21Wg0aUBfFfnCw=; b=agyy5t1xNKf7m2wUAc8t6eT4vDFZXwGm/kPpVthcT7aoGzoL6AewpAMp1LFlVLoQp1 eVk1gazMDzANk8TRot2nAhU0T3L7PAMULrBtbbvmXd99aLjdTwLym2GljtiGmdvbdEB4 Mhhk54ZWf3OpeIZ83JmyfGJ8xz6sU+yAgFNW7oPUVxh3NGOBvXwwr2ZCO4907TNecV/o oz93pUP2R45lHfkbSDg63ECw2yyAEG7f38gLPbm28K8UwIaMA6MRPBi8ELyBCX6dlL6o LndyMpssn+ZzhLUJCvkQYXLQPF6lmSaXYE9ylg4daAB+NuJySUyZ79yA0jcufJPt7S+U F45g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=77A+hKaPUxjfFonaDQE7CetqlCkuc21Wg0aUBfFfnCw=; b=NAaTuKt5YZBiR71u7uFPB7CIcS6Cea9R2TMlXTOGRPJOAG+eV17vD4vH64jPHTlkGA FuxbOgxXA1qJFoAnkuOVAXtm9IPxx9T0zo39cCi2IqWYJFeQfgwSGwDkc3qdBqLnk0H1 v8WaRp8RpGnCXCuY0wyI1wx56MjSsIn8qzBau1xQ2cThjd9bSAnfI0Jim5KgN2ouIBA6 mG519V8i3YnwCsruyT2XgKtPK00g4H8LICs0CPQCzUK2Z9Lelcym8vnCHCiNfHyrjuD4 1rYv5TibYm5EACCBfXr09ICl/Ux9ZiRHCJyU9Knluyy3zGwH8/XHvnRQzmurMsacFMco qlGA== X-Gm-Message-State: APjAAAW6vLUhXL66zaTsCAG5atWSLMK/Yayvs6wlGrffBgYaXDmy6m8q c/5EuSSPRpP4QzX02s2A17BgmtTs X-Google-Smtp-Source: APXvYqzRGL/Rl4/7QKr/3joQ8Whw3mHopGC6P4kykMKszZFC4QAy/ijwXIG87rGEiwgqx/cAtHZZNg== X-Received: by 2002:aa7:8243:: with SMTP id e3mr49401069pfn.213.1557954159523; Wed, 15 May 2019 14:02:39 -0700 (PDT) Received: from [10.104.134.41] ([155.100.47.1]) by smtp.gmail.com with ESMTPSA id v23sm4860609pff.185.2019.05.15.14.02.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2019 14:02:38 -0700 (PDT) Subject: Re: default_tablespace in 8.3 postgresql To: pgsql-general@lists.postgresql.org References: From: Rob Sargent Message-ID: <34134b2e-8002-b5a3-fe24-f3696d399511@gmail.com> Date: Wed, 15 May 2019 15:02:37 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------73C927BA1FA12CCBEECF369F" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------73C927BA1FA12CCBEECF369F Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit On 5/15/19 2: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 > ------------------------------------------------------------------------ > *From:* David G. Johnston > *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 > 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. > Previous actions may have altered (accidentally) the default table space for those databases but this doesn't show that the tables of old are now on vol4 does it?.  Would have taken some time to move 80 non-trivial databases. --------------73C927BA1FA12CCBEECF369F Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit


On 5/15/19 2: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

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> 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.


Previous actions may have altered (accidentally) the default table space for those databases but this doesn't show that the tables of old are now on vol4 does it?.  Would have taken some time to move 80 non-trivial databases.

--------------73C927BA1FA12CCBEECF369F--