From: Daniel Verite <daniel@manitou-mail.org>
To: TALLURI Nareshkumar <nareshkumar.talluri@socgen.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: RE: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"
Date: Wed, 15 Jul 2020 11:57:43 +0200
Message-ID: <b37456a1-3f12-4134-8cb7-e6762e59a6ad@manitou-mail.org> (raw)
In-Reply-To: <DB6PR0502MB3013F696115AD90813CC5AF4907E0@DB6PR0502MB3013.eurprd05.prod.outlook.com>
TALLURI Nareshkumar wrote:
> [0]postgres@axmdevhkdb008$ [PHKGAXMD008] psql
> psql: FATAL: database "postgres" does not exist
That's not necessarily a problem. The "postgres" database is generally
empty and some installations don't even have one.
Use "psql -d template1" instead, or start postgres in single-user mode.
> Since we are not able to connect to DB , we did a new initialization and
> copy the directories from base directory to new base directory(in new data
> location)
This can't work. If you have a backup from just before that point,
you should restore it and work from that without writing anything into
the data directory.
Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: https://www.manitou-mail.org
Twitter: @DanielVerite
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: daniel@manitou-mail.org, nareshkumar.talluri@socgen.com
Subject: Re: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"
In-Reply-To: <b37456a1-3f12-4134-8cb7-e6762e59a6ad@manitou-mail.org>
References: <DB6PR0502MB3013F696115AD90813CC5AF4907E0@DB6PR0502MB3013.eurprd05.prod.outlook.com> <b37456a1-3f12-4134-8cb7-e6762e59a6ad@manitou-mail.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox