Re: [DOCS] [PATCH] Various documentation typo/grammar fixes

2014-09-03 Thread Kevin Grittner
Marti Raudsepp  wrote:
> On Sat, Aug 30, 2014 at 8:43 PM, Tom Lane  wrote:
>> I would argue against applying patch 2 at all.
>
> I don't feel strongly about this, I originally didn't plan to submit
> this patch at all. But I don't agree with:
>
>> doing it only because some style guide tells
>> you to is not the way to approach the issue.  We're writing English
>> not C code here, and so there is no single standard of correctness.
>
> There isn't a "single standard", but there are many style guides
> about
> English and pretty much all of them agree on the usage of periods in
> "e.g.", "i.e.", "etc." and "et al."

To me, omitting the dots in any of those looks like a misspelling.
I think we should fix those.

Also, it seems odd to so strictly enforce formatting rules in C
code (where it makes no semantic difference) but blow off style
issues, and even correctness of English usage, in the
documentation.

> With regards to commas following e.g. and i.e., this article surveyed
> 6 different English style guides and just 1 recommended not using the
>
> comma: http://www.quickanddirtytips.com/education/grammar/ie-versus-eg?page=2

Commas after "i.e." and "e.g." are less clearly a correctness issue 
and getting more into style questions, so I wouldn't feel too bad 
about letting those go where it doesn't cause confusion or too much 
of a "double take" on reading.  Note that the cited page summarizes 
the positions of these documents on the topic with phrases like "is 
usually used", "preferable/optional", "makes good sense", and 
"should be".  Only "The Columbia Guide to Standard American 
English" actually said it was "required".

Starting a parenthetical clause with "e.g." and ending it with
", etc." also looks wrong to me.  My inclination is to pick one;
otherwise I find it distracting or confusing and tend to go back
over it one or two extra times to make sure I'm understanding.

There's at least one place I spotted "e.g." where it seemed to me
that the "example" was really a restatement in other terms, so it
seemed like it should have been "i.e." -- I would be inclined to
scan for more of those and present that as a separate patch, since
it's less mechanical than the others.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] Add link to partial unique index from Constraints (5.3)

2014-09-03 Thread Bruce Momjian
On Wed, Apr 30, 2014 at 10:18:22AM -0400, Robert Haas wrote:
> On Wed, Apr 9, 2014 at 8:17 AM, Tomáš Greif
>  wrote:
> > would it be good idea to add new paragraph 5.3.7 to chapter 5.3
> > (Constraints) with at least information that there is something like partial
> > unique index and link to chapter 11.8 (Partial Indexes)?
> >
> > Partial index can be used to enforce uniqueness in a way other constraints
> > cannot provide. Currently, it not easy to find this type of constraint as
> > not a lot of people would read through documentation on indexes when looking
> > for constraints.
> 
> I think adding something to that chapter would be good.

Attached patch applied, and backpatched to 9.4.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
new file mode 100644
index 0fcd9f8..c07f5a2
*** a/doc/src/sgml/ddl.sgml
--- b/doc/src/sgml/ddl.sgml
*** CREATE TABLE products (
*** 546,552 
  
 
  Adding a unique constraint will automatically create a unique btree
! index on the column or group of columns used in the constraint.
 
  
 
--- 546,554 
  
 
  Adding a unique constraint will automatically create a unique btree
! index on the column or group of columns used in the constraint. 
! A uniqueness constraint on only some rows can be enforced by creating
! a partial index.
 
  
 

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] dead ISBN link

2014-09-03 Thread Bruce Momjian
On Tue, May  6, 2014 at 09:00:58PM -0400, Peter Eisentraut wrote:
> The following URL linked to in isn.sgml has disappeared:
> 
> http://www.isbn-international.org/en/identifiers.html
> 
> Apparently, they reorganized their web site.
> 
> Could someone familiar with the matter find the new location for this
> material?

I found three URLs to replace the non-existant URL.  Attached patch
applied to head and 9.4.  Thanks for the report.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/doc/src/sgml/isn.sgml b/doc/src/sgml/isn.sgml
new file mode 100644
index 4a2e7da..c1da702
*** a/doc/src/sgml/isn.sgml
--- b/doc/src/sgml/isn.sgml
*** SELECT isbn13(id) FROM test;
*** 364,370 
 The prefixes used for hyphenation were also compiled from:
 
  http://www.gs1.org/productssolutions/idkeys/support/prefix_list.html";>
! http://www.isbn-international.org/en/identifiers.html";>
  http://www.ismn-international.org/ranges.html";>
 
  
--- 364,372 
 The prefixes used for hyphenation were also compiled from:
 
  http://www.gs1.org/productssolutions/idkeys/support/prefix_list.html";>
! http://en.wikipedia.org/wiki/List_of_ISBN_identifier_groups";>
! https://www.isbn-international.org/content/isbn-users-manual";>
! http://en.wikipedia.org/wiki/International_Standard_Music_Number";>
  http://www.ismn-international.org/ranges.html";>
 
  

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


[DOCS] Missing docs: setting up replication slots for standbys

2014-09-03 Thread Josh Berkus

Section 46.2.2 has this:

Note: PostgreSQL also has streaming replication slots (see Section
25.2.5), but they are used somewhat differently there.

Section 25.2.5 has this:

 You can avoid this by setting wal_keep_segments to a value large enough
to ensure that WAL segments are not recycled too early, or by
configuring a replication slot for the standby.

... however, absolutely nowhere is it explained how to configure a
replication slot for a streaming replica.  Is it, in fact, possible to
do so?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] Missing docs: setting up replication slots for standbys

2014-09-03 Thread Josh Berkus
On 09/03/2014 10:43 PM, Josh Berkus wrote:
> 
> Section 46.2.2 has this:
> 
> Note: PostgreSQL also has streaming replication slots (see Section
> 25.2.5), but they are used somewhat differently there.
> 
> Section 25.2.5 has this:
> 
>  You can avoid this by setting wal_keep_segments to a value large enough
> to ensure that WAL segments are not recycled too early, or by
> configuring a replication slot for the standby.
> 
> ... however, absolutely nowhere is it explained how to configure a
> replication slot for a streaming replica.  Is it, in fact, possible to
> do so?

Searching ... it is possible.  However, the way to do so is actually
scattered among 5 different doc pages.  I'm not sure that I'm up for the
surgery required to make this make sense to users ... anybody else have
the energy/time?

The relevant pages in the docs are these:

http://www.postgresql.org/docs/9.4/static/standby-settings.html
http://www.postgresql.org/docs/9.4/static/functions-admin.html#FUNCTIONS-REPLICATION
http://www.postgresql.org/docs/9.4/static/logicaldecoding-explanation.html#AEN66111
http://www.postgresql.org/docs/9.4/static/warm-standby.html#STREAMING-REPLICATION

... otherwise, I'll just write a blog or postgresguide or something.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] Missing docs: setting up replication slots for standbys

2014-09-03 Thread Andres Freund
On 2014-09-03 22:43:19 -0700, Josh Berkus wrote:
> 
> Section 46.2.2 has this:
> 
> Note: PostgreSQL also has streaming replication slots (see Section
> 25.2.5), but they are used somewhat differently there.
> 
> Section 25.2.5 has this:
> 
>  You can avoid this by setting wal_keep_segments to a value large enough
> to ensure that WAL segments are not recycled too early, or by
> configuring a replication slot for the standby.
> 
> ... however, absolutely nowhere is it explained how to configure a
> replication slot for a streaming replica.  Is it, in fact, possible to
> do so?

It actually is explained. I don't have a built source handy right now,
so chapter numbers... But at least the following is there:

   
Configuration Example

 You can create a replication slot like this:

postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot');
  slot_name  | xlog_position
-+---
 node_a_slot |

postgres=# SELECT * FROM pg_replication_slots;
  slot_name  | slot_type | datoid | database | active | xmin | restart_lsn
-+---++--++--+-
 node_a_slot | physical  ||  | f  |  |
(1 row)

 To configure the standby to use this slot, primary_slot_name
 should be configured in the standby's recovery.conf.
 Here is a simple example:

standby_mode = 'on'
primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
primary_slot_name = 'node_a_slot'


and I'm pretty sure primary_slot_name and such is configured at the
appropriate place too.

That's not to say it can't be be expanded and/or better linked...

Greetings,

Andres Freund

-- 
 Andres Freund http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] Missing docs: setting up replication slots for standbys

2014-09-03 Thread Josh Berkus
On 09/03/2014 11:03 PM, Andres Freund wrote:
> It actually is explained. I don't have a built source handy right now,
> so chapter numbers... But at least the following is there:
> 
>
> Configuration Example
> 
>  You can create a replication slot like this:
> 
> postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot');
>   slot_name  | xlog_position
> -+---
>  node_a_slot |
> 
> postgres=# SELECT * FROM pg_replication_slots;
>   slot_name  | slot_type | datoid | database | active | xmin | restart_lsn
> -+---++--++--+-
>  node_a_slot | physical  ||  | f  |  |
> (1 row)
> 
>  To configure the standby to use this slot, primary_slot_name
>  should be configured in the standby's recovery.conf.
>  Here is a simple example:
> 
> standby_mode = 'on'
> primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
> primary_slot_name = 'node_a_slot'
> 
> 
> and I'm pretty sure primary_slot_name and such is configured at the
> appropriate place too.

Huh.  I can't seem to find any way to navigate to that page.  What is it
supposed to be under?


-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs