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 1hrq3F-00012Z-Vm for pgsql-general@arkaria.postgresql.org; Sun, 28 Jul 2019 20:45:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hrq3E-0004vh-Il for pgsql-general@arkaria.postgresql.org; Sun, 28 Jul 2019 20:45:52 +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 1hrq3C-0004va-G8 for pgsql-general@lists.postgresql.org; Sun, 28 Jul 2019 20:45:52 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hrq38-0004D1-KH for pgsql-general@lists.postgresql.org; Sun, 28 Jul 2019 20:45:50 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1B96122063; Sun, 28 Jul 2019 16:45:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 28 Jul 2019 16:45:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=N uShiJvWjSgd+Vxoiylt7c+f/KuIlnakOJoQWk+091A=; b=irbwEGWXz4JuyJ/pN +69E0Lc4weKclVz/qImM/1NVdfS1m5HxLEChmy36mjK3EMf7yXfe7v+u6nYD+D/g /oD1vNwmaUPXpTHaw+AWOSAzR/e6VLqaMlyuwpw8gcQ+qSgW6ewx6GMTaE47ZHTB o9EL0c9jArNtl28e4/3Z3i1xpKHuYK2Z0b0TnOkKh/AYfJp3VWp9IuhXCgGqtwtj IYk84y2XfismYG80whk6kOitOPfOdwFULikw+VJhzLpFm+OiZ1YkVmUyNTxNCHy1 BIpV9yTIQg27YDxG0Ay0/NUqfc2WvDPHTnmEU3IYanoxU3gV4ctY4N8mKStmVnhw Mm7mA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm3; bh=NuShiJvWjSgd+Vxoiylt7c+f/KuIlnakOJoQWk+09 1A=; b=VPoK4lyVR1fGXuMmn+8i1JruGr7Bpm4JJrzbkPI0ctEJcOjQK5vsuXvhc 37vkOuBtqo+rlqDFCCwg1bDeTnk9gWQNQqskvNONv3Cl+ss3wzr0I8tC8B48LkD+ xX1FMPOw2273cic2d8UAf4gSocTnObXoGoG8Fx943WTO+/mAVzgNWk8Y7VNG3e8Y hXDbJmBmYouhyaf2aEJE9ZSHVmMZzMlUgvZvERAeW33oOh9qpFJw0zzn8A+MZX9j RoelLkLZbnkDv96jRtI12xKcevZ0ZeorGcyqkPvYezLqbV52xTS2V5sAnYFq/W2V MEg9sHOSDpifx9lgqeKlTKCfAlQvg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrkeelgdduheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeehnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecukfhppeejuddrvdduvddrudehtddrvd dtvdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id DE2ED80059; Sun, 28 Jul 2019 16:45:42 -0400 (EDT) Subject: Re: Tablespace column value null on select * from pg_tables To: "Peter J. Holzer" , pgsql-general@lists.postgresql.org References: <6b86387c-1076-8c0e-564b-cd76d34c3132@aklaver.com> <98-GCV7Md7B0jENT-tVKpjarGkevVihM4OUhRpEbGUov3f2BKUDUpQR1725CegOBxE3oVEahOf1Ty0DR6anUAqbvIfI2FavO1LIRfpzyReg=@protonmail.com> <20190728202439.GB25242@hjp.at> From: Adrian Klaver Message-ID: Date: Sun, 28 Jul 2019 13:45:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190728202439.GB25242@hjp.at> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/28/19 1:24 PM, Peter J. Holzer wrote: > On 2019-07-16 19:20:24 +0000, Alex Williams wrote: >> 1. postgres=# ALTER DATABASE mydatabase SET TABLESPACE pg_default; >> >> ERROR: some relations of database "mydatabase" are already in tablespace "pg_default" >> >> HINT: You must move them back to the database's default tablespace before using this command. > > What's the reason for this error? Wouldn't it be simpler to leave > relations alone which are already in the correct tablespace? ~/src/backend/commands/dbcommands.c /* * Check for existence of files in the target directory, i.e., objects of * this database that are already in the target tablespace. We can't * allow the move in such a case, because we would need to change those * relations' pg_class.reltablespace entries to zero, and we don't have * access to the DB's pg_class to do so. */ > > hp > -- Adrian Klaver adrian.klaver@aklaver.com