Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3dp8-00038F-Ug for pgsql-general@arkaria.postgresql.org; Wed, 14 Jul 2021 12:17:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3dp7-0003Ro-Tv for pgsql-general@arkaria.postgresql.org; Wed, 14 Jul 2021 12:17:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3dp7-0003RF-Et for pgsql-general@lists.postgresql.org; Wed, 14 Jul 2021 12:17:09 +0000 Received: from zimbabwe.chezphil.org ([34.255.138.49]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3dp5-0004jy-8o for pgsql-general@lists.postgresql.org; Wed, 14 Jul 2021 12:17:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=chezphil.org mappendix.com; s=20171026; h=Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Subject:Date:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9GETfTp/PGRi1Agn1S624NzE5AgGOSxcfZFDXMvh64c=; b=gKFzumIjzB0LovOrcOAe088mB 3D4lPKwY6IyHZ0V7//Waugqy/0DFAFpZUVfGqa1HdfC6Z0KvenpwbArW1ZBhk5Y5Hl+DObKX5HOwN jJTALlalF/ERMrkC8nHarlxazy66CNxrr/egUroLMnm983+FzVC5SYZCett4BUHOB5tdM=; Received: from localhost ([127.0.0.1] helo=chezphil.org) by zimbabwe.chezphil.org with esmtp (Exim 4.92) (envelope-from ) id 1m3dp3-0006gv-G3 for pgsql-general@lists.postgresql.org; Wed, 14 Jul 2021 13:17:05 +0100 Received: from localhost ([::ffff:127.0.0.1]) by zimbabwe with smtp (dmsmtpd 0.00001); Wed, 14 Jul 2021 13:17:05 +0100 From: "Phil Endecott" To: Date: Wed, 14 Jul 2021 13:17:05 +0100 Subject: Re: Why can't I drop a tablespace? Message-ID: <1626265025382@dmwebmail.dmwebmail.chezphil.org> In-Reply-To: <2949871.1626102784@sss.pgh.pa.us> References: <2949871.1626102784@sss.pgh.pa.us> X-Mailer: Decimail Webmail 3alpha16 MIME-Version: 1.0 Content-Type: text/plain; format="flowed"; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tom Lane wrote: > "Phil Endecott" writes: >> Thanks Laurenz. I was looking at the source for "alter table set >> tablespace" yesterday trying to work out what is supposed to happen. >> There is a comment at tablecmds.c line 3989: "Thanks to the magic of >> MVCC, an error anywhere along the way rolls back the whole operation; >> we don't have to do anything special to clean up." But I guess that >> creating an entirely new file on a different filesystem is an >> exception to that. > > No, but PANIC'ing during commit is :-(. Ordinarily the files created by a > failed transaction would be removed during transaction cleanup, but we > did not reach that code. So these were left behind, but the table's > original files in the original tablespace should be undamaged. OK, I've removed them - fingers crossed! Thanks to everyone who replied for your advice. Regards, Phil.