RE: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "TALLURI Nareshkumar" <nareshkumar(dot)talluri(at)socgen(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: RE: psql: FATAL: database "postgres" does not exist or ERROR: 23505: duplicate key value violates unique constraint "pg_namespace_nspname_index"
Date: 2020-07-15 09:57:43
Message-ID: b37456a1-3f12-4134-8cb7-e6762e59a6ad@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

TALLURI Nareshkumar wrote:

> [0]postgres(at)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Radoslav Nedyalkov 2020-07-15 12:22:24 Re: single table - fighting a seq scan
Previous Message Fabio 2020-07-15 09:34:52 Cross-site cookies warnings