From: | Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_receivexlog always handles -d option argument as connstr |
Date: | 2014-10-07 14:43:46 |
Message-ID: | CAD21AoCgpr1qZb-9KA1t5K73=sQ73jD4ccNntPrj+n-kFREfVA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 7, 2014 at 12:58 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Mon, Oct 6, 2014 at 10:23 PM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
> wrote:
>>
>> Hi all,
>>
>> pg_receivexlog always handles argument of -d option as connstr formatted
>> value.
>> We can doubly specify host name, port number.
>> The other client tools handles -d option as connstr value only if
>> argument has "=" character.
>
> pg_basebackup also seems to behave same as pg_receivexlog.
> psql also treats it in similar way. The behaviour of psql is as
> below:
> psql.exe -d="host=localhost port=5432 dbname=postgres"
> psql: invalid connection option ""
>
> psql.exe -d "host=localhost port=5432 dbname=postgres"
> psql (9.5devel)
> WARNING: Console code page (437) differs from Windows code page (1252)
> 8-bit characters might not work correctly. See psql reference
> page "Notes for Windows users" for details.
> Type "help" for help.
>
> postgres=#
>
>> The document says that pg_receivexlog ignores database name, and this
>> option is called for consistency with other client applications.
>> But if we specify database name like other client tool '-d hoge' ,
>> then we will definitely got error.
>
> What I understand from document is that it ignores database name
> when given in connection string.
>
Yep, but we can use -d option like 'psql -d postgres'.
pg_receivexlog and pg_basebackup doesn't seem to work like that.
they always handles argument as connstr formatted value.
psql handles argument as database name or connstr, depends on variable argument.
$ bin/pg_receivexlog -D xlog_dir/ -S hoge -d postgres -p 5432
pg_receivexlog: missing "=" after "postgres" in connection info string
Regards,
-------
Sawada Masahiko
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-10-07 14:45:24 | Re: Dynamic LWLock tracing via pg_stat_lwlock (proof of concept) |
Previous Message | Ilya Kosmodemiansky | 2014-10-07 14:40:32 | Re: Dynamic LWLock tracing via pg_stat_lwlock (proof of concept) |