Re: Streaming Replication Configuration

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: Streaming Replication Configuration
Дата
Msg-id 4EEA25DC.9070900@iol.ie
обсуждение исходный текст
Ответ на Streaming Replication Configuration  (Carlos Mennens <carlos.mennens@gmail.com>)
Список pgsql-general
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@iol.ie

В списке pgsql-general по дате отправления:

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: Double Denormalizing in Postgres
Следующее
От: Gabriele Bartolini
Дата:
Сообщение: Re: Streaming Replication Configuration