Search Postgresql Archives

Re: Streaming Replication Configuration

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

 



On 15/12/2011 16:41, Carlos Mennens wrote:
> carlos@db1:~$ psql -c "SELECT pg_start_backup('label', true)"
> psql: FATAL:  database "carlos" does not exist
> 
> Now I'm showing they want me to use the -c switch to connect but no
> database is defined so is it implied that I need to add 'postgres'
> maintenance database in there or something else?
> 

Yes, depending on your setup you may need both -U <user name> and the
database name also - if neither is specified, psql tries to connect to a
database named after the current OS user, and tries to connect as a user
with the same name as the current OS user also.

So if you're logged in as "carlos", then the above command is the same as:

  psql -U carlos -c "...." carlos

HTH,

Ray.

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
rod@xxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux