Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uCa0g-00H29C-D0 for pgsql-general@arkaria.postgresql.org; Wed, 07 May 2025 08:20:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uCa0e-00CUsq-W9 for pgsql-general@arkaria.postgresql.org; Wed, 07 May 2025 08:20:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uCZxO-00CPzy-3f for pgsql-general@lists.postgresql.org; Wed, 07 May 2025 08:16:46 +0000 Received: from mail-am7eur03on2045.outbound.protection.outlook.com ([40.107.105.45] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uCZxK-000au1-2F for pgsql-general@lists.postgresql.org; Wed, 07 May 2025 08:16:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sC5IhfMvdqw3wc2dCNaRYbU9QxXW7Abw2imEmvtVXqJD8D7DUKqvbOEHoi9S7J+AVpG+qDtLH4eoEUPgKdl+zYL3+knitfoMxSzFnGrSJ9GY7ruSgRNtxcC3DS/ODinzmVbpD5cJKlBch5WG/0nKFlhjl0JoHYN+S1GxHQUfUxANfaXyYHd4X7a7bXU68koSI0lG1404tyUdb8oVUjsu7szsPoMwEfu6vFONv3KYT+KhnEAu5IyVjpDGDJoJnFJHDUuVNBdagEVSxE4s+n0YP7+LgKGjvmX7virNAtjFRvG15QKS8AZv+s2s0+Y43Etmfxc37aaVje6Paz5+Vb4X+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c56oKLDQ01dcVkIw+s/r0sCVLL7Eec5eysTSrPtJEfo=; b=yw4RmlwDOxQhP51Rd+/g3aCuJ95nKU+SSt+uOjl0KY2MdnN0qLYtiAyV/oowCDmaTrTNxs94vih3vp+xamMOd/BvglwJzeQ8TmUcDbl/GjDies711YTwlkm4StYFlSA+v4nKFdBAquo1uJPMDk8tYbldpuw3LumvvLJqXTd7jcQCL4SVD1cDnram79jzdHLvhczMGsCPRuBSQ4tOVXjoyt1WuLkmNuK56UyL6G0dO1B3rhUXFGBs1AS66q/ivMBF6hCzWl5e2k6mGM784LRu6ZGy251Uep5E0Xe20x41s10EhK6IAkqZKy2zwknI8F5RXUhoGMS9wA6KwTBbRC5i4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=enel.com; dmarc=pass action=none header.from=enel.com; dkim=pass header.d=enel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enel.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c56oKLDQ01dcVkIw+s/r0sCVLL7Eec5eysTSrPtJEfo=; b=H7ksyOrQ32gHhYqeo/gP1YK8DHw6NtBzCTRGfyEm70rdMirDTVjBL3rHw+R323pc45NQsGsVzIymNKa03PC1jbhtKp7BZhFDONtm+2IXk3lnKvRerO9AAlpuC+eU/9cowdCXamfVaP06tQkPzQ4ScS9QTFob/AbWSuaZpmn3fz61E+0PnMjihj9rpTnou2Ms9SroBnpTmEY/CNaetDKtKfmqx2vOcnYLMhiZCNnVSUEm8lAmvT8qJEkfHPfHEOnJlanAEUm4ImA2o1Y/j432gaYjFNZbEuhPGezDqB1erAgDS1Bn5Es6DqnWN8+rbVlQx3DxnSGEX9BeslN7c/yd0g== Received: from PAXP191MB1885.EURP191.PROD.OUTLOOK.COM (2603:10a6:102:1c3::24) by AM9P191MB1269.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:1f1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.21; Wed, 7 May 2025 08:16:40 +0000 Received: from PAXP191MB1885.EURP191.PROD.OUTLOOK.COM ([fe80::4aed:29a9:ae80:bbb4]) by PAXP191MB1885.EURP191.PROD.OUTLOOK.COM ([fe80::4aed:29a9:ae80:bbb4%4]) with mapi id 15.20.8699.026; Wed, 7 May 2025 08:16:40 +0000 From: "Fagnani Gabriele G (GDS I&TS)" To: "pgsql-general@lists.postgresql.org" Subject: Error in DROP TABLESPACE Thread-Topic: Error in DROP TABLESPACE Thread-Index: Adu/J2pwRBMIgK2QQx6gBrW2gB8T1A== Date: Wed, 7 May 2025 08:16:39 +0000 Message-ID: Accept-Language: en-US Content-Language: it-IT X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_797ad33d-ed35-43c0-b526-22bc83c17deb_ActionId=5bb9b778-c3ef-4686-bd55-b3ee9949bf26;MSIP_Label_797ad33d-ed35-43c0-b526-22bc83c17deb_ContentBits=0;MSIP_Label_797ad33d-ed35-43c0-b526-22bc83c17deb_Enabled=true;MSIP_Label_797ad33d-ed35-43c0-b526-22bc83c17deb_Method=Standard;MSIP_Label_797ad33d-ed35-43c0-b526-22bc83c17deb_Name=797ad33d-ed35-43c0-b526-22bc83c17deb;MSIP_Label_797ad33d-ed35-43c0-b526-22bc83c17deb_SetDate=2025-05-07T08:08:10Z;MSIP_Label_797ad33d-ed35-43c0-b526-22bc83c17deb_SiteId=d539d4bf-5610-471a-afc2-1c76685cfefa;MSIP_Label_797ad33d-ed35-43c0-b526-22bc83c17deb_Tag=10, 3, 0, 1; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=enel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAXP191MB1885:EE_|AM9P191MB1269:EE_ x-ms-office365-filtering-correlation-id: 3d19a8bc-1eed-4ab6-2e32-08dd8d3f7e6d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|366016|376014|8096899003|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?r5GiHPkAthyik/QL5o/leZf7pLCrQEdH7fqo9JaN5YyCnXS54Mir7vEXD7SC?= =?us-ascii?Q?R2fw4NPHAg4Eyvm9BNNce5zY+3kgu/GvTpsCg7Q761SefT/HFBswhWNXB1gn?= =?us-ascii?Q?ogP3azic3DQd4cGBMyc2yinBk27uuKu1/7OdqQbvn+Vm7kRsbS9zyTKGGuI/?= =?us-ascii?Q?nlyplXFejMn4zK4GJakdo7bRnE66s1M0L10E7v50VapBXZ1+5gTJSs63iH8z?= =?us-ascii?Q?V2ZqQP0NpOPWg3g4wHAYj5VF5hMYe8d4z4gsAb+AYBxM9ht+ancRRebHxSDU?= =?us-ascii?Q?705NE0NW8JMpxG3IHsZajhHrw4htOGhfEZigXmeAheHydGLvLqXl+tvJTgIY?= =?us-ascii?Q?fWxQPICseXXjJDm53DOxtslXzBQ8ssS7dX34r3HVypTrlgpTOAh2b7E39dQV?= =?us-ascii?Q?YOVq3W/41NI1lOn6MNRsVZTGbAmP6DzlhJlS0OJIvlT/j7SkfAYIQqFMv15g?= =?us-ascii?Q?r5nKdpWTeEn1d4j3GqNNPh6D3tAoqwS4iG/yxquYxv/eqedI7qdDaV5je2Xt?= =?us-ascii?Q?7RoTLANyGtujUzEDOBfFlypl4nnfs34F/ge/nOXoJxWozxdbTIpt3gaHD/c0?= =?us-ascii?Q?TLhExEuuygzjnZyGIQHXZhcDWHl1o7pC90Pxdnj0E2OXC243bYD932BHCata?= =?us-ascii?Q?04QsTo1nsi40iwUotYuI8v32RihWoDYl8eQ1Ycxv7dg30+Es/HhqIU/aLGG8?= =?us-ascii?Q?U0u4NPx6+vgA0fV8WiUt1WnthXsAeLxQKZaYEeZzjAE7V5Z10nXVYPDgqJOG?= =?us-ascii?Q?S8qF/MUyNN0KHtmyTAfNdpPIoGg5WpWirly8onNinguytQyGyV/XMWMqsuko?= =?us-ascii?Q?HEyfjuLmBrmgC+4vtDs9oRiFlHR8HRRfXrBO9Ne2D5PewSE0/H2ZhUTn6oH1?= =?us-ascii?Q?IJGQTE3BUQCmZje2nZPZMIMHOjkvZhxqZx21wQoO07mM3MG7XPcBnUPs4JcY?= =?us-ascii?Q?nC0+T8KskVgFqC2Nql2zbmZjgc7GJDsT6d1epCEL+Gvd2uPzknk45zt05Lxp?= =?us-ascii?Q?FtOA1AQQgtTraSHRmkoeLtlJvJmhIMdvxTHza/R3Zp2umPjFmvEDvPONKlVL?= =?us-ascii?Q?wF/JP5wntU/aWn8yDnQ5QSGwtzcN1XMDQNVlx7nnlhOYk2wCwNdZwi3virwT?= =?us-ascii?Q?/xG0MWg++VapXeXPpze3lXzQ4nGYEm0gstUXpMveWPTwh96hA5Q3Xiz6cLYp?= =?us-ascii?Q?mBMHxO6ZadSXWJT6UYpjgJOAGzoCV5nnTPr9z2SH/c3jc+6/GGLdyKOQeY+q?= =?us-ascii?Q?Mu+zue1FGlZVXw3dmtqcEjoYassHmDya6We4bPkxvKap4XkMFsuFYvAoX7bj?= =?us-ascii?Q?tZ1MJpLwtG7DLI7BrsdNJnDN6ICej5KsdHw0os6+0T0XJzTvNFAJKzMAqH/a?= =?us-ascii?Q?Io6kPi6dqglp1+9szO8eJhzo6bFwnAlv9W4r9E5BKmFrkREFTMhKuXXeUHIa?= =?us-ascii?Q?XURodA+8tVSe2yzHTUFMgxhgXUvD5XqDJBqyArIsk28MtG4yAWSvdg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXP191MB1885.EURP191.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(8096899003)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fqhX/rx6cGv/MA+bgUzlACn2oDKetGu6qP/Ci9etlu/bZ2rSD7OaAKOPFb4O?= =?us-ascii?Q?RvY+qVKjzj1vg4nvM4OYd7gedQaDxgKMSJMLBxwFg2YjCK08Q9xlxR5QJfSC?= =?us-ascii?Q?4x86IeRPg/a9umN4tpMURo57M9wn+3FiVioYqI17uGafpPyrIQg2eqT9fQSr?= =?us-ascii?Q?BInK0INfK1QxcMvd3fCHeZSs7xUcZ9nSoZvqpy3gta3RliNQMSHTLc+V/3XS?= =?us-ascii?Q?OgrJWkmARal+9EdCe/EZk4JP1+LZwQmjEoZs/IsM5iRymmAkP6yr3xy7wEYg?= =?us-ascii?Q?Xi+lhgBYSIRuqN9ydLhZJq7MJ08L5JJChD5HK47g77vFL8tn/RqisjLXryYd?= =?us-ascii?Q?sGEatmgIN09oMeaoLchaB5L3S8Z9HdRUogVIBn6ClLuTXszlmXKsUuJsndlj?= =?us-ascii?Q?LS0FBLZgm1SZZODQUoi0JNwom0wrk79E3JEYqYdg5CSDdm8eVRpTK0yZLCbr?= =?us-ascii?Q?tx7jyeAQifbDLwdoLijHTp8YVg2qeTJsmWqDSPFSBrQXnH+/4/OOg8ZdgFWo?= =?us-ascii?Q?K5ri2br4nFtOtVTAJ4Nw0tjqrrCzqfOQAEHkroMlJMu2QjCUQGEyQLMmVT7g?= =?us-ascii?Q?1GvzMWr7Boo2yPvqSjcyn3aQFVnTElBQVED/si26o+lXBu2cIhLcnrBpNy39?= =?us-ascii?Q?MKg0ehLXy790tfzkEzGcthUwZRKO1t0wy56AVs2NSmxOstrYcBZs298ZaeR1?= =?us-ascii?Q?UUR0xHU8tvMK7sTcD1u75BFzxSfm/eCpl4mjnx5pmo9lH+KljrYv3yAbaOzr?= =?us-ascii?Q?tSaIGdiX05T3vSm6NwvH/gTESPXTfZM5ec8oSY4/yHpwl27vfocLGmerhjRl?= =?us-ascii?Q?A2caT5HqbrJanLVt12/o/KkKtULuDDMb06UTJ22FMzY8fHtOp2/cj8BRR+00?= =?us-ascii?Q?cexf4ask+yJVIhaSHyrmvtQsMywXM4MxxLDJQUHIfMWsDlayQDu6JMYHZDpJ?= =?us-ascii?Q?sJJpsrXk1i2ol/ymL1LRZNaoIM9DcxQLszL0u0ak0zTpzwob1ywhjj9+503n?= =?us-ascii?Q?tJ6QhT6c3ZwBTnUNddaJ2MQcJv272hAlVgH7t50zu6ECIxt9IwKhk18BeTCe?= =?us-ascii?Q?ogQRS8RgPh1pepPUHVSRpL7/RG593QJRqOpie3wWebIjlYGAMR0SsP+Nlman?= =?us-ascii?Q?k+jgHKWuVmPp4x3AmEfadib0gdSKpim9GBtjjoBdWfTRPayRownPyGBHTXI4?= =?us-ascii?Q?E9k8Y51/C4gfnpqnrp1xb02f1UX+37KiCHUGOWtms//E731bhmcR63Ww1Gch?= =?us-ascii?Q?/NSfxuaS40auq0ky0PGF6xxtTf1py4dGf8xcnBBqjCAtwPCZckO53rOgl4fR?= =?us-ascii?Q?ofeqeNjNZwr/KL3nKwDUCaOYtilxzXWqi7fSrjd72/7N+2EBdDjbBJ2tN0P5?= =?us-ascii?Q?6RsBX4uJWIgDG+eEvfH0fEblI9OPNdfgxDsqw9IdgAL23Ysfs2QYUJ7tQuKv?= =?us-ascii?Q?P4SRYwB2h+wMz2vC4Wgo4USeeS8ICbML4ksBNChXgQiWqsAaWZsu/I6FnP9H?= =?us-ascii?Q?0TS3KE1RlZXdw3i/12KmRVjT61l2CsJ9J/57taI96OJDH7dIpJd+Hg0dwW0+?= =?us-ascii?Q?OPpa7yHlzREFBE9GEz8+H8CY2MsQWcimjUqWjCug?= Content-Type: multipart/alternative; boundary="_000_PAXP191MB188589F40FA0F86D0DB9281DE288APAXP191MB1885EURP_" MIME-Version: 1.0 X-OriginatorOrg: enel.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXP191MB1885.EURP191.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 3d19a8bc-1eed-4ab6-2e32-08dd8d3f7e6d X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2025 08:16:39.9831 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d539d4bf-5610-471a-afc2-1c76685cfefa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wOFAmgRdBvdNYS3oh+NLvEAW/oP5DrwQULqBYrO3Zl7uduXWnEeRodJqLl9W6ihB7jiVpN+RjiGT1muvhLb7daZal8gW66BEmvT4imA7CMk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P191MB1269 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_PAXP191MB188589F40FA0F86D0DB9281DE288APAXP191MB1885EURP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable INTERNAL Hi, I've run into an odd problem - I have what seems to be a "zombie" tablespac= e that PostgreSQL won't let me drop, but nothing inside it is active. drop tablespace ts_idx_wb2; ERROR: tablespace "ts_idx_wb2" is not empty postgres=3D# \db+ ts_idx_wb2 List of tablespaces Name | Owner | Location | Access privile= ges | Options | Size | Description ------------+----------+----------------------------------+----------------= -----+---------+--------+------------- ts_idx_wb2 | postgres | /pgsql/postgres/tsdata1/ts_idx_wb2 | postgres=3DC/p= ostgres+| | 250 GB | | | | mydatabase=3DC/= postgres | | | (1 row) Check on filesystem location. On the filesystem there are files related only to fileref 515555188: postgres@myserver:/pgsql/postgres/tsdata1/ts_idx_wb2/PG_12_201909212/16419>= ls -la total 261854080 drwx------ 2 postgres postgres 69632 Apr 22 17:45 . drwx------ 3 postgres postgres 4096 Oct 31 2024 .. -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.1 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.10 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.100 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.101 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.102 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.103 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.104 ... ... -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.97 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.98 -rw------- 1 postgres postgres 1073741824 Oct 31 2024 515555188.99 SELECT pg_tablespace_databases((SELECT oid FROM pg_tablespace WHERE spcname= =3D 'ts_idx_wb2')); pg_tablespace_databases ------------------------- 16419 SELECT oid, datname FROM pg_database WHERE oid =3D 16419; oid | datname -------+----------- 16419 | mydatabase <---------------- Connected to database mydatabase: select cl.relfilenode, nsp.nspname as schema_name, cl.relname, cl.relkind from pg_class cl join pg_namespace nsp on cl.relnamespace =3D nsp.oid and cl.relfilenode= =3D515555188 ; relfilenode | schema_name | relname | relkind -------------+-------------+---------+--------- (0 rows) To be sure I run the same query on the other databases with the same result= (0 rows) So there are no actual references to these files, yet the relationship persists sufficiently for the DROP TABLESPACE to error out. My guess is that the files belong to an index being moved on Oct 31 to ts_i= dx_wb2 tablespace, and during the move the postgres instance crashed due space shortage on wal filesystem, and this cr= ash left this "zombie" files on the filesystem. In order to drop the tablespace, is it safe to shut that postmaster down a= nd manually remove the contents of this directory? Thanks Gabriele Fagnani --_000_PAXP191MB188589F40FA0F86D0DB9281DE288APAXP191MB1885EURP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

INTERNAL


Hi,

 

I've run into an odd problem - = I have what seems to be a "zombie" tablespace

that PostgreSQL won't let me dr= op, but nothing inside it is active.

 

drop tablespace ts_idx_wb2;

ERROR:  tablespace "t= s_idx_wb2" is not empty

 

postgres=3D# \db+ ts_idx_wb2

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    List of tablespaces

    Name &n= bsp;  |  Owner   |      &= nbsp;      Location     &= nbsp;       |  Access privileges  |= Options |  Size  | Description

------------+----------+-------= ---------------------------+---------------------+---------+--------+------= -------

ts_idx_wb2 | postgres | /pgsql/= postgres/tsdata1/ts_idx_wb2 | postgres=3DC/postgres+|   &nbs= p;     | 250 GB |

     &= nbsp;      |      &n= bsp;   |         &nb= sp;            =             | mydata= base=3DC/postgres |         | =        |

(1 row)

 

Check on filesystem location.

On the filesystem there are fil= es related only to fileref 515555188:

 

postgres@myserver:/pgsql/postgres/= tsdata1/ts_idx_wb2/PG_12_201909212/16419> ls -la

total 261854080<= /p>

drwx------ 2 postgres postgres&nbs= p;     69632 Apr 22 17:45 .

drwx------ 3 postgres postgres&nbs= p;      4096 Oct 31  2024 ..

-rw------- 1 postgres postgres 107= 3741824 Oct 31  2024 515555188

-rw------- 1 postgres postgres 107= 3741824 Oct 31  2024 515555188.1

-rw------- 1 postgres postgres 107= 3741824 Oct 31  2024 515555188.10

-rw------- 1 postgres postgres = 1073741824 Oct 31  2024 515555188.100

-rw------- 1 postgres postgres = 1073741824 Oct 31  2024 515555188.101

-rw------- 1 postgres postgres = 1073741824 Oct 31  2024 515555188.102

-rw------- 1 postgres postgres = 1073741824 Oct 31  2024 515555188.103

-rw------- 1 postgres postgres = 1073741824 Oct 31  2024 515555188.104

...

...

-rw------- 1 postgres postgres = 1073741824 Oct 31  2024 515555188.97

-rw------- 1 postgres postgres = 1073741824 Oct 31  2024 515555188.98

-rw------- 1 postgres postgres = 1073741824 Oct 31  2024 515555188.99

 

SELECT pg_tablespace_databases(= (SELECT oid FROM pg_tablespace WHERE spcname =3D 'ts_idx_wb2'));=

pg_tablespace_databases

-------------------------<= /o:p>

     &= nbsp;           &nbs= p; 16419

 

 

SELECT oid, datname FROM pg_dat= abase WHERE oid =3D 16419;

oid  |  datname<= /o:p>

-------+-----------<= /span>

16419 | mydatabase  &= nbsp; <----------------

 

 

Connected to database mydatabas= e:

 

select cl.relfilenode, nsp.nspn= ame as schema_name, cl.relname, cl.relkind

from pg_class cl

  join pg_namespace nsp on= cl.relnamespace =3D nsp.oid and cl.relfilenode=3D515555188 ;

relfilenode | schema_name | rel= name | relkind

-------------+-------------+---= ------+---------

(0 rows)

 

To be sure I run the same query= on the other databases with the same result (0 rows)

 

So there are no actual referenc= es to these files, yet the relationship

persists sufficiently for the D= ROP TABLESPACE to error out.

My guess is that the files belo= ng to an index being moved on Oct 31 to ts_idx_wb2 tablespace, and during t= he move the

postgres instance crashed due s= pace shortage on wal filesystem, and this crash left this "zombie"= ; files on the filesystem.

 

In order to drop the tablespace= , is it safe to shut  that postmaster down and manually remove the con= tents of this

directory?

 

Thanks

Gabriele Fagnani

 

--_000_PAXP191MB188589F40FA0F86D0DB9281DE288APAXP191MB1885EURP_--