Re: Documentation patch for ALTER SUBSCRIPTION
OK, pushed that. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: Documentation patch for ALTER SUBSCRIPTION
> On Feb 5, 2020, at 7:56 AM, Alvaro Herrera wrote: > > 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: > >REFRESH PUBLICATION > > > 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 REFRESH PUBLICATION or > since CREATE SUBSCRIPTION. > > > > refresh_option specifies additional options > for the > refresh operation. The supported options are: > > > >copy_data (boolean) > > > Specifies whether the existing data in the publications that are > being subscribed to should be copied once the replication starts. > The default is true. > > > > > > > > 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 … I would be happy with the suggestion [1]; it would have clarified my specific question. Thanks, David signature.asc Description: Message signed with OpenPGP
Re: Documentation patch for ALTER SUBSCRIPTION
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: REFRESH PUBLICATION 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 REFRESH PUBLICATION or since CREATE SUBSCRIPTION. refresh_option specifies additional options for the refresh operation. The supported options are: copy_data (boolean) Specifies whether the existing data in the publications that are being subscribed to should be copied once the replication starts. The default is true. 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 Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: Documentation patch for ALTER SUBSCRIPTION
On Wed, Feb 5, 2020 at 8:44 AM David Christensen wrote: > > >> On Feb 4, 2020, at 8:45 PM, Amit Kapila wrote: > >> > >> On Fri, Jan 24, 2020 at 2:05 AM David Christensen > >> wrote: > >> Greetings, > >> Enclosed find a documentation patch that clarifies the behavior of ALTER > >> SUBSCRIPTION … REFRESH PUBLICATION with new tables; I ran into a situation > >> today where the docs were not clear that existing tables would not be > >> re-copied, so remedying this situation. > > > > It seems this is already covered in REFRESH PUBLICATION, see "This > > will start replication of tables that were added to the subscribed-to > > publications since the last invocation of REFRESH PUBLICATION or since > > CREATE SUBSCRIPTION.". As far as I understand, this text explains the > > situation you were facing. Can you explain why the text quoted by me > > is not sufficient? > > Hi Amit, > > From several reads of the text it was not explicitly clear to me that when > you issued the copy_data that it would not effectively recopy existing tables > in the existing publication, which I had been trying to confirm was not the > case prior to running a refresh operation. I had to resort to reviewing the > source code to get the answer I was looking for. > > If you are already familiar with the operation under the hood I am sure the > ambiguity is not there but since I was recently confused by this I wanted to > be more explicit in a way that would have helped me answer my original > question. > 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. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
Re: Documentation patch for ALTER SUBSCRIPTION
>> On Feb 4, 2020, at 8:45 PM, Amit Kapila wrote: >> >> On Fri, Jan 24, 2020 at 2:05 AM David Christensen >> wrote: >> Greetings, >> Enclosed find a documentation patch that clarifies the behavior of ALTER >> SUBSCRIPTION … REFRESH PUBLICATION with new tables; I ran into a situation >> today where the docs were not clear that existing tables would not be >> re-copied, so remedying this situation. > > It seems this is already covered in REFRESH PUBLICATION, see "This > will start replication of tables that were added to the subscribed-to > publications since the last invocation of REFRESH PUBLICATION or since > CREATE SUBSCRIPTION.". As far as I understand, this text explains the > situation you were facing. Can you explain why the text quoted by me > is not sufficient? Hi Amit, From several reads of the text it was not explicitly clear to me that when you issued the copy_data that it would not effectively recopy existing tables in the existing publication, which I had been trying to confirm was not the case prior to running a refresh operation. I had to resort to reviewing the source code to get the answer I was looking for. If you are already familiar with the operation under the hood I am sure the ambiguity is not there but since I was recently confused by this I wanted to be more explicit in a way that would have helped me answer my original question. Best, David
Re: Documentation patch for ALTER SUBSCRIPTION
On Fri, Jan 24, 2020 at 2:05 AM David Christensen wrote: > > Greetings, > > Enclosed find a documentation patch that clarifies the behavior of ALTER > SUBSCRIPTION … REFRESH PUBLICATION with new tables; I ran into a situation > today where the docs were not clear that existing tables would not be > re-copied, so remedying this situation. > It seems this is already covered in REFRESH PUBLICATION, see "This will start replication of tables that were added to the subscribed-to publications since the last invocation of REFRESH PUBLICATION or since CREATE SUBSCRIPTION.". As far as I understand, this text explains the situation you were facing. Can you explain why the text quoted by me is not sufficient? -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
Documentation patch for ALTER SUBSCRIPTION
Greetings, Enclosed find a documentation patch that clarifies the behavior of ALTER SUBSCRIPTION … REFRESH PUBLICATION with new tables; I ran into a situation today where the docs were not clear that existing tables would not be re-copied, so remedying this situation. Should apply back to Pg 10. Best, David 0001-Be-explicit-about-the-behavior-of-REFRESH-PUBLICATIO.patch Description: Binary data -- David Christensen Senior Software and Database Engineer End Point Corporation da...@endpoint.com 785-727-1171 signature.asc Description: Message signed with OpenPGP