From: | Alex Shulgin <ash(at)commandprompt(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Replication connection URI? |
Date: | 2014-11-25 07:17:22 |
Message-ID: | 87y4qzoikd.fsf@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alex Shulgin <ash(at)commandprompt(dot)com> writes:
> Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
>>>
>>> It appears that replication connection doesn't support URI but only the
>>> traditional conninfo string.
>>>
>>> src/backend/replication/libpqwalreceiver/libpqwalreceiver.c:99: in libpqrcv_connect():
>>>
>>> snprintf(conninfo_repl, sizeof(conninfo_repl),
>>> "%s dbname=replication replication=true fallback_application_name=walreceiver",
>>> conninfo);
>>>
>>> A patch to fix this welcome?
>>
>> Yeah, seems like an oversight. Hopefully you can fix that without
>> teaching libpqwalreceiver what connection URIs look like..
>
> Please see attached. We're lucky that PQconnectdbParams has an option
> to parse and expand the first dbname parameter if it looks like a
> connection string (or a URI).
>
> The first patch is not on topic, I just spotted this missing check.
>
> The second one is a self-contained fix, but the third one which is the
> actual patch depends on the second one, because it specifies the dbname
> keyword two times: first to parse the conninfo/URI, then to override any
> dbname provided by the user with "replication" pseudo-database name.
These patches are really simple, I hope a committer will pick them up?
Or should I add them to the commitfest?
Also, I'd rather get this committed first, then rebase that
recovery.conf->GUC patch onto it and submit an updated version.
Thanks.
--
Alex
From | Date | Subject | |
---|---|---|---|
Next Message | Kouhei Kaigai | 2014-11-25 08:44:53 | Re: [v9.5] Custom Plan API |
Previous Message | Michael Paquier | 2014-11-25 06:33:58 | Re: [REVIEW] Re: Compression of full-page-writes |