pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pg_dumpall restore question

> Hi!
> I'm doing postgresql backups with pg_dumpall.
> When I restore them, all the guides on the net say to just use
>     psql -f backupfile
> but when I do that as pgsql user on NetBSD, I get
>     psql: error: FATAL:  database "pgsql" does not exist
> and my workaround was to do
>     psql -d postgres -f backupfile
> instead. Why is that necessary?
> Thomas

`psql` has to connect to a database; the database name defaults to username and that doesn't exists in your case, so you have to provide an existing database name.

Kind regards,

Home | Main Index | Thread Index | Old Index