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 1hR1CI-0003rk-8k for pgsql-general@arkaria.postgresql.org; Wed, 15 May 2019 21:12:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hR1BH-0003TO-Kf for pgsql-general@arkaria.postgresql.org; Wed, 15 May 2019 21:11:19 +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 1hR1BG-0003TH-1v for pgsql-general@lists.postgresql.org; Wed, 15 May 2019 21:11:19 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hR1BC-0002dk-A1 for pgsql-general@lists.postgresql.org; Wed, 15 May 2019 21:11:17 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4B779259D6; Wed, 15 May 2019 17:11:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 15 May 2019 17:11:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=K NyirUyJ4YcNQNXvX69HpsvoC3aaZUjtRwokAlWdXhA=; b=ZTYLMVxthgvXp/txG vCy0qW6lQSsdO4d1TaQ8FqIhoH9ywxoIrDJhW/MF2gTrTSe7xkUKPxwypa/YMbCY hF+AQeaNOPksAUxCodPuHeGTZJ3X1cCcFzu4t2ZFqLtWVYfAyJRMLoS5VJTgJsiu ePJn/VxPvn55NdmB5FGRrn2Jz6kSUFwdTWr17PH97BOO0FSsATUJFIx7Ke7kOVsZ 8YXZqOM+rEg+kaI6OPAUfAvuXxzk+NfVHZsCTJejeQIMWXRNYFbGie7qrbY5Ngrz 9ELERBiuFsL4Tz+anKXnxiJ3scLg+4nI8iXM93raRoD2Yjaqol1sLsYMj7K4o5Go lCAMw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=KNyirUyJ4YcNQNXvX69HpsvoC3aaZUjtRwokAlWdX hA=; b=ipjdRf4HK/4ZcDuSNJ8UzvXPdBUieDj4lMppUSIOTgZS/QWq55yZK07iY RYwtuxuqsN3PK22jOpBPNAqfDMFKcupwFWiBZPKxm/+pnqmKXEqWRQirDZQcIT4X WhlTJMv4CZtPV0tw+k/o61o55pb+zV+yL7QT9KgyqE2vJKpHYxo9KMCK0Zc+97fm AWmzN7NPDMXKYXfAL5y1X5Zhn9XyI7v5RqlI2ueImcG4s/G90KwGwuo4cljrQkqv IReY7E/kHinHD1oB3brJ9rRcJVkogEr85By8HsE6Uj6QmcbU97r5DW1xVBEoJ05e MB5IReMWryM7vgo1RW6EZTy9P4a1w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrleekgdduheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefheenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucfkphepjeefrddvfeelrdduudejrddvfeeknecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsth gvrhfuihiivgeptd X-ME-Proxy: Received: from ranger.suse (c-73-239-117-238.hsd1.wa.comcast.net [73.239.117.238]) by mail.messagingengine.com (Postfix) with ESMTPA id 1F2C9103CB; Wed, 15 May 2019 17:11:11 -0400 (EDT) Subject: Re: default_tablespace in 8.3 postgresql To: Julie Nishimura , "David G. Johnston" Cc: "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: Date: Wed, 15 May 2019 14:11:09 -0700 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: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 > *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. > -- Adrian Klaver adrian.klaver@aklaver.com