From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Şahap Aşçı <sahapasci(at)gmail(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Subject: | Re: libpq options |
Date: | 2018-03-02 11:58:50 |
Message-ID: | CABUevEzwbfDb5fUWc7opVFyGBeCXqChrq-S1KXRSYDDexSuthw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Fri, Mar 2, 2018 at 2:50 AM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Thu, Mar 01, 2018 at 01:35:54AM -0800, Andres Freund wrote:
> > On 2017-11-25 19:05:54 +0900, Michael Paquier wrote:
> >> A Boolean value of <literal>true</literal> tells the backend
> >> + to go into walsender mode, wherein a small set of replication
> commands
> >> + can be issued instead of SQL statements.
> >
> > This actually is wrong now I think. Petr?
>
> On more or less HEAD:
> $ psql -X -d "replication=1 dbname=postgres"
> postgres=# create table aa (a int);
> ERROR: cannot execute SQL commands in WAL sender for physical replication
> $ psql -X -d "replication=database dbname=postgres"
> postgres=# create table aa (a int);
> CREATE TABLE
>
> So one needs to use replication=database in order to be able to issue
> normal SQL statements, while replication=true enforces physical
> replication where this cannot happen (no connection to a specified
> database).
>
To nitpick:
+ protocol. A Boolean value of <literal>true</literal> tells the
backend
We don't really have boolean values here, do we? It's just the string true
that's treated as a boolean by the backend. It just sounds really weird to
me when written that way. Particularly since the next sentence talks about
passing "database" as the same thing.
I know that's pretty much nitpicking, but I want to make sure I haven't
actually missed/forgotten how some part of that one is handled..
It also talks separately about "going into walsender mode" (=physical
replication) and "instructs the walsender to connect to the database". I
think that's a bit confusing. I suggest just calling it "physical
replication mode" and "logical replication mode", and not bother mentioning
walsender since that's quite internal.
--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-03-02 19:51:54 | Re: MacPorts xsltproc is very slow? |
Previous Message | Petr Jelinek | 2018-03-02 09:44:13 | Re: libpq options |