Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpIgX-00050K-WA for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Sep 2016 17:30:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpIgX-0000h7-Im for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Sep 2016 17:30:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpIft-00084K-91 for pgsql-bugs@postgresql.org; Wed, 28 Sep 2016 17:29:41 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bpIfr-0007As-1w for pgsql-bugs@postgresql.org; Wed, 28 Sep 2016 17:29:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20140207; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date: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=HKEAjcUPEo08w2pyzD0yaXp5kjU8C+WWp1pS8OSRrOA=; b=XyJLgChf+Al677Ot81i2wc2UfN cFiYd8G+A0kRrTQlyHseBUT4MIjNPkyOQ3JAtHugrxv7mYA3lp35jyx+dfBszQw54idaq8QHbNLx7 1ioelngHcMOspIUDs44DLjLpL; Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.87) (envelope-from ) id 1bpIfp-00088I-G7; Wed, 28 Sep 2016 19:29:37 +0200 Date: Wed, 28 Sep 2016 19:29:37 +0200 From: hubert depesz lubaczewski To: huang Cc: "pgsql-bugs@postgresql.org" Subject: Re: vacuumdb has a fatal after database rename Message-ID: <20160928172937.se6i42u5l67eanuh@depesz.com> Reply-To: depesz@depesz.com References: <57EBCBA1.2010700@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <57EBCBA1.2010700@163.com> User-Agent: NeoMutt/20160910 (1.7.0) X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Wed, Sep 28, 2016 at 09:54:41PM +0800, huang wrote: > If I rename the database postgres before vacuumdb , the vacuumdb say > FATAL: database "postgres" does not exist. So don't rename it. It's being used because you are running vacuumdb using postgres shell account. You could try something like: PGDATABASE=template1 vacuumdb -az but generally speaking it is not advised to rename postgres db. Best regards, depesz -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs