Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpGXA-0006EJ-Bz for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Sep 2016 15:12:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpGX9-0003sl-Mv for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Sep 2016 15:12:31 +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 1bpFaH-0000Mb-AN for pgsql-bugs@postgresql.org; Wed, 28 Sep 2016 14:11:41 +0000 Received: from m50-155.163.com ([123.125.50.155]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpFaE-0003c4-Dx for pgsql-bugs@postgresql.org; Wed, 28 Sep 2016 14:11:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:From:MIME-Version:Subject; bh=9j7XA YnByo6QyRoygOsooovxX6wRmnE4p0yA0FUdRSU=; b=AFDXWkQ20uS3dS13NqASM kB3dvn6KxEby4Q1Zdc+jbtZSi2a8tXfdohFZI3nCDP8ikaj3tGBOiMGI6rXoPO5T HjH0zScu2P+6NMUww9JYjcR30po/tsK/5TDjOuLBfDf7LJc7TeeUAN4VG/cbCXa5 ZYDg9UZ06zk4LQXmVL83Ig= Received: from [192.168.1.106] (unknown [114.252.116.68]) by smtp3 (Coremail) with SMTP id DdGowAAn0zSPy+tXz5ARDA--.20171S3; Wed, 28 Sep 2016 21:54:24 +0800 (CST) Message-ID: <57EBCBA1.2010700@163.com> Date: Wed, 28 Sep 2016 21:54:41 +0800 From: huang User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "pgsql-bugs@postgresql.org" Subject: vacuumdb has a fatal after database rename Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: DdGowAAn0zSPy+tXz5ARDA--.20171S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7uw1UJrWrCF1rAF15AFyUGFg_yoW8Cr4fpr s3tF13A3yUXFykWr4rZr18u3s8Zr9aqr1DJrykWw4xtrn0k34j9rZ0qFW8JFWrtry7Jan8 Aa12vry8Aw1DWaUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jixhdUUUUU= X-Originating-IP: [114.252.116.68] X-CM-SenderInfo: 5irjw55jod22i6rwjhhfrp/1tbiRx3y9Fc65hcQYQABsw 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 Hi friends, If I rename the database postgres before vacuumdb , the vacuumdb say FATAL: database "postgres" does not exist. [postgres@vdedu1 ~]$ vacuumdb -a vacuumdb: vacuuming database "mydb" vacuumdb: vacuuming database "postgres" vacuumdb: vacuuming database "template1" [postgres@vdedu1 ~]$ psql -c"alter database postgres rename to postgresql;" ERROR: current database cannot be renamed STATEMENT: alter database postgres rename to postgresql; ERROR: current database cannot be renamed [postgres@vdedu1 ~]$ psql psql (9.5.4) Type "help" for help. postgres=# alter database postgres rename to postgresql; ERROR: current database cannot be renamed STATEMENT: alter database postgres rename to postgresql; ERROR: current database cannot be renamed postgres=# \q [postgres@vdedu1 ~]$ psql -d template1 -c"alter database postgres rename to postgresql;" ALTER DATABASE [postgres@vdedu1 ~]$ psql -l FATAL: database "postgres" does not exist psql: FATAL: database "postgres" does not exist [postgres@vdedu1 ~]$ psql -l -d template1 List of databases Name | Owner | Encoding | Collate | Ctype | Access privile ges ------------+----------+----------+-------------+-------------+----------------- ------ mydb | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgresql | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/pos tgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/pos tgres (4 rows) [postgres@vdedu1 ~]$ vacuumdb -a FATAL: database "postgres" does not exist vacuumdb: vacuuming database "mydb" vacuumdb: vacuuming database "postgresql" vacuumdb: vacuuming database "template1" [postgres@vdedu1 ~]$ 2016-09-28 TT -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs