From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, sahapasci(at)gmail(dot)com, pgsql-docs(at)postgresql(dot)org, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Subject: | Re: libpq options |
Date: | 2018-03-02 01:50:38 |
Message-ID: | 20180302014938.GC1186@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
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).
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Greg k | 2018-03-02 06:04:42 | Postgres 10 and the pg_ctl "--wait" option |
Previous Message | Daniel Gustafsson | 2018-03-01 09:50:31 | Re: Document WaitForBackgroundWorkerShutdown and fix bgworker typo |