Re: Documentation patch for ALTER SUBSCRIPTION

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: David Christensen <david(at)endpoint(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Documentation patch for ALTER SUBSCRIPTION
Date: 2020-02-05 13:56:10
Message-ID: 20200205135610.GA9721@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Feb-05, Amit Kapila wrote:

> It is possible that one might not understand how this option works by
> reading the already existing text in docs, but I think writing in a
> different language the same thing also doesn't seem advisable. I
> think if we want to explain it better, then maybe a succinct example
> at the end of the page might be helpful.

For reference, the complete varlistentry is:

<term><literal>REFRESH PUBLICATION</literal></term>
<listitem>
<para>
Fetch missing table information from publisher. This will start
replication of tables that were added to the subscribed-to publications
since the last invocation of <command>REFRESH PUBLICATION</command> or
since <command>CREATE SUBSCRIPTION</command>. <!-- [2] -->
</para>

<para>
<replaceable>refresh_option</replaceable> specifies additional options for the
refresh operation. The supported options are:

<variablelist>
<varlistentry>
<term><literal>copy_data</literal> (<type>boolean</type>)</term>
<listitem>
<para>
Specifies whether the existing data in the publications that are
being subscribed to should be copied once the replication starts.
The default is <literal>true</literal>. <!-- [1] -->
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</listitem>

I tend to agree with David that this is ambiguous enough to warrant a
few words. Maybe his proposed wording is too verbose; how about just
adding "(Previously subscribed tables are not copied.)" where the [1]
appears? Alternatively, we could add "Tables that were already present
in the subscription are not modified in any way." where [2] appears, but
that seems less clear to me.

An example would not be bad if it showed that existing data is not
copied. But examples are actually just syntactical examples, so you'd
have to resort to a comment explaining that existing tables are not
copied by the shown syntax. You might as well just add the words in the
reference docs ...

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-02-05 14:10:11 Re: [Proposal] Global temporary tables
Previous Message Kirill Bychik 2020-02-05 13:35:59 WAL usage calculation patch