Punctuation error

2018-09-19 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: 
https://www.postgresql.org/docs/10/static/logical-replication-publication.html
Description:

This sentence should not use a semicolon: "Both the ADD TABLE and DROP TABLE
operations are transactional; so the table will start or stop replicating at
the correct snapshot once the transaction has committed." You can either
change it to a comma, or else leave out the "so" that follows the semicolon.
The text that follows a semicolon must be a complete sentence that stands on
its own.


Re: Punctuation error

2018-09-19 Thread Tom Lane
=?utf-8?q?PG_Doc_comments_form?=  writes:
> This sentence should not use a semicolon: "Both the ADD TABLE and DROP TABLE
> operations are transactional; so the table will start or stop replicating at
> the correct snapshot once the transaction has committed."

That looks perfectly fine to me.  Moreover, there are a *lot* of places
in the PG docs that we'd have to change if we got persnickety about this
sort of thing.

> You can either
> change it to a comma, or else leave out the "so" that follows the semicolon.
> The text that follows a semicolon must be a complete sentence that stands on
> its own.

I am unfamiliar with this grammar "rule", and vigorously dispute that
anyone follows it in the real world.

regards, tom lane



Re: Punctuation error

2018-09-19 Thread Neil


> On Sep 19, 2018, at 9:43 AM, Tom Lane  wrote:
> 
> =?utf-8?q?PG_Doc_comments_form?=  writes:
>> This sentence should not use a semicolon: "Both the ADD TABLE and DROP TABLE
>> operations are transactional; so the table will start or stop replicating at
>> the correct snapshot once the transaction has committed."
> 
> That looks perfectly fine to me.  Moreover, there are a *lot* of places
> in the PG docs that we'd have to change if we got persnickety about this
> sort of thing.
> 
>> You can either
>> change it to a comma, or else leave out the "so" that follows the semicolon.
>> The text that follows a semicolon must be a complete sentence that stands on
>> its own.
> 
> I am unfamiliar with this grammar "rule", and vigorously dispute that
> anyone follows it in the real world.
> 
>   regards, tom lane
> 

Seems Tom is correct for at least the last 100 years or so.  From Strunk & 
White, Elements of Style 1918, Rule 5 (available on-line). Not saying this is 
the definitive PG writing guide, but most of us in the US used it for college 
writing.

“Note that if the second clause is preceded by an adverb, such as accordingly, 
besides, so, then, therefore, or thus, and not by a conjunction, the semicolon 
is still required.”

“I had never been in the place before; so I had difficulty in finding my way 
about.”

Neil


Re: Mention FK creation take ShareRowExclusiveLock on referenced table

2018-09-19 Thread Adrien Nayrat
On 9/19/18 4:53 AM, Michael Paquier wrote:
> On Tue, Sep 18, 2018 at 12:32:54PM +0200, Adrien NAYRAT wrote:
>> A few days ago I was surprised a CREATE TABLE containing FK constraint was
>> stuck due to an automatic vacuum freeze (which took ShareUpdateExclusiveLock
>> if I remember) on referenced table.
> 
> Right.  See the top of vacuum_rel() where lmode is set.
> 
>> After digging into the code I found theses lines in tablecmds.c :
>>
>> /*
>>  * Grab ShareRowExclusiveLock on the pk table, so that someone doesn't
>>  * delete rows out from under us.
>>  */
>>
>> Maybe it should be documented in theses pages?
>>
>> https://www.postgresql.org/docs/current/static/sql-createtable.html
>> https://www.postgresql.org/docs/current/static/sql-altertable.html
>>
>> If you agree I can send a patch.
> 
> That looks like a good idea.  Are you thinking about adding a comment
> about that in "ADD table_constraint" for the ALTER TABLE page, and in
> "FOREIGN KEY" for the CREATE TABLE page?

Yes, here is the patch

Thanks


-- 
Adrien

diff --combined doc/src/sgml/ref/alter_table.sgml
index 1e4a327327,ec6b4c3311..00
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@@ -377,11 -377,6 +377,11 @@@ WITH ( MODULUS .
   
  
 + 
 + Adding a foreign key requires taking a SHARE ROW EXCLUSIVE
 + lock on the referenced table.
 + 
 +
  
 
  
diff --combined doc/src/sgml/ref/create_table.sgml
index a974bea6b1,5a19f94ce9..00
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@@ -993,8 -993,6 +993,8 @@@ WITH ( MODULUS 
signature.asc
Description: OpenPGP digital signature