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 1gmOKu-0007tV-3W for pgsql-general@arkaria.postgresql.org; Wed, 23 Jan 2019 19:37:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gmOKs-0006Ga-Cj for pgsql-general@arkaria.postgresql.org; Wed, 23 Jan 2019 19:37:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmOKr-0006C3-JF for pgsql-general@lists.postgresql.org; Wed, 23 Jan 2019 19:37:18 +0000 Received: from resqmta-ch2-02v.sys.comcast.net ([2001:558:fe21:29:69:252:207:34]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmOKn-0005Dc-7V for pgsql-general@postgresql.org; Wed, 23 Jan 2019 19:37:16 +0000 Received: from resomta-ch2-12v.sys.comcast.net ([69.252.207.108]) by resqmta-ch2-02v.sys.comcast.net with ESMTP id mIoNgXebz9VLomOKkgJgPL; Wed, 23 Jan 2019 19:37:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1548272230; bh=IndmftbMlXa4gt+da5Y4xJFFt0Tmhcyjp9KH0iq3XpQ=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=g5FjzoNyaPvXsbWJiZwIMdmBBr5n6+H9KRE8BpkPF9VGytvDhbm1IDLqottUqoUkY hZtYqG35cBL/rNRb32oOf8g9M+h3qpnMGrDsr66I4CYMvCuRp/+1nc3xU8UkprPBi7 KufHfVBkGMZQh53wUhcsmATd6DmYdDLuyt4jSoX9I2MCAx6vGzX3TAyDBOkUQfVRaw MNse+9j9Qek+riNV/4uTKyiVxQIV+EVtYVQ6yxzmRi/9mZwdJfPBoKb51k52pZAhe+ S9AMKKKNng+tRwgVHNNSATRzlmLFdMrzHd9QSjJ7wodkUh6oRkou7rHvEfgz1ZI3yb 20Tl6LsUJpOrw== Received: from jsievers.comcast.net ([12.187.116.132]) by resomta-ch2-12v.sys.comcast.net with ESMTPA id mOKXg3sWEKHFDmOKXgSQcw; Wed, 23 Jan 2019 19:37:08 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedtledriedtgdduvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpeflvghrrhihucfuihgvvhgvrhhsuceoghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtqeenucfkphepuddvrddukeejrdduudeirddufedvnecurfgrrhgrmhephhgvlhhopehjshhivghvvghrshdrtghomhgtrghsthdrnhgvthdpihhnvghtpeduvddrudekjedrudduiedrudefvddpmhgrihhlfhhrohhmpehgshhivghvvghrshduleestghomhgtrghsthdrnhgvthdprhgtphhtthhopegrlhgsrghnrdhhvghrthhrohihshesrghpohhllhhovhhrvgguvghsthgvihhnrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlhesphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushenucevlhhushhtvghrufhiiigvpedt X-Xfinity-VMeta: sc=-100;st=legit Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id E6A2A260056; Wed, 23 Jan 2019 13:36:56 -0600 (CST) From: Jerry Sievers To: Tom Lane Cc: Alban Hertroys , pgsql-general@postgresql.org Subject: Re: Reclaiming space for dropped database References: <26693.1548255721@sss.pgh.pa.us> Date: Wed, 23 Jan 2019 13:36:56 -0600 In-Reply-To: <26693.1548255721@sss.pgh.pa.us> (Tom Lane's message of "Wed, 23 Jan 2019 10:02:01 -0500") Message-ID: <87o987upwn.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tom Lane writes: > Alban Hertroys writes: > >> Our current development database server is running a bit low on diskspace, >> so I dropped an old but rather large database with the intention of >> claiming back some space. However, the space remains claimed. >> This server was upgraded from PG10 to PG11 using pg_upgrade's --link >> option. > > If you used --link, then all the files would remain hard-linked from both > the old and new database directories. You've got to remove them from the > old DB directory as well. > > There's not really any point in keeping around the source DB directory > once you've completed a --link migration. Starting the postmaster in > the old DB directory would be disastrous because the files are > inconsistent from its standpoint once the new postmaster has modified > them at all. (In fact, I think pg_upgrade intentionally makes the old > directory non-runnable to prevent that error.) So you might as well Yeah. IIRC, it renames control to pg_control.old to avoid accidental startup. > just "rm -rf ./10", not only its biggest subdirectory. > > regards, tom lane > > -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net