[DOCS] Hot Standby documentation updates

2010-02-18 Thread Greg Smith
Attached is a patch that fixes up a couple of spots I felt could use 
improvement in the Hot Standby documentation.  Most of this is simple 
wordsmithing, or minor expansion of points I tried to explain more 
clearly.  A few of the edits I'd marked up on paper were already applied 
in the last update done today--even the same commas added or removed in 
some spots.  I think this section is closing in on complete and fully 
edited when we are all finding the same things to nitpick over.


The main change I added here that could use a review is this addition:

+ Waiting to acquire buffer cleanup locks.  This can occur when one
+ database backend is trying to access to data block that is 
"pinned"
+ by another backend that is making a change to it.  Such pins 
should

+ normally be very short-lived, but they can take longer than normal
+ under some circumstances, such as when a cursor executing over
+ a set of data has stopped for some reason.

That's how I interpreted what Simon told me about this subject, but I 
may not have captured the details accurately.  I didn't think that 
saying something as ominous sounding as "Waiting to acquire buffer 
cleanup locks" should be there without any description at all what 
conditions that happens under, which is what's there right now.


There are only two open things in these docs I'm still a little bugged by:

-The first paragraph mentions "restoring a backup to an exact state with 
great precision"; I have no idea what that's supposed to mean in this 
context.


-The section about stats collection says "The stats file is deleted at 
the start of recovery, so stats from primary and standby will differ; 
this is considered a feature not a bug".  This left me going "why?", and 
some clarification of the reasoning or limitation causing that drift 
would be nice.


P.S.  I touched a few other files as well, related to a debate from 
dinner the other night that touched on Simon introducing more UK 
spelling into the docs.  This is what the docs look like now:


postgresql/doc/src/sgml $ grep -r behavior * | wc -l
386

postgresql/doc/src/sgml $ grep -r behaviour * | wc -l
9

Half of the latter were in the new material, so while on a binge fixing 
those I adjusted the mis-"behaviour"s in other sections too.


--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
[email protected]   www.2ndQuadrant.us

diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 2007cd0..2f28da2 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -126,7 +126,7 @@ psql dbname < psql with
 the ON_ERROR_STOP variable set to alter that
-behaviour and have psql exit with an
+behavior and have psql exit with an
 exit status of 3 if an SQL error occurs:
 
 psql --set ON_ERROR_STOP=on dbname < infile
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 841b49b..103d02a 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -2882,7 +2882,7 @@ struct sqlname
program and most of the additional functions of the Informix compatibility
mode allow you to operate on those C host program types. Note however that
the extent of the compatibility is limited. It does not try to copy Informix
-   behaviour; it allows you to do more or less the same operations and gives
+   behavior; it allows you to do more or less the same operations and gives
you functions that have the same name and the same basic behavior but it is
no drop-in replacement if you are using Informix at the moment. Moreover,
some of the data types are different. For example,
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 14fa895..045d6b8 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -13801,8 +13801,8 @@ SELECT (pg_stat_file('filename')).modification;
   function, suppress_redundant_updates_trigger, 
   which will prevent any update
   that does not actually change the data in the row from taking place, in
-  contrast to the normal behaviour which always performs the update
-  regardless of whether or not the data has changed. (This normal behaviour
+  contrast to the normal behavior which always performs the update
+  regardless of whether or not the data has changed. (This normal behavior
   makes updates run faster, since no checking is required, and is also
   useful in certain cases.)
 
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 668fe96..bf3bd8d 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -1056,8 +1056,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
 is useful for both log shipping replication and for restoring a backup
 to an exact state with great precision.
 The term Hot Standby also refers to the ability of the server to move
-from re

Re: [DOCS] Hot Standby documentation updates

2010-02-18 Thread Bruce Momjian

Applied;  updated version attached.  I talked to Greg via IM and we
decide to not use his buffer cleanup locks text below but to use
something simpler:

 The standby waiting longer than max_standby_delay
 to acquire a buffer cleanup lock.

---

Greg Smith wrote:
> Attached is a patch that fixes up a couple of spots I felt could use 
> improvement in the Hot Standby documentation.  Most of this is simple 
> wordsmithing, or minor expansion of points I tried to explain more 
> clearly.  A few of the edits I'd marked up on paper were already applied 
> in the last update done today--even the same commas added or removed in 
> some spots.  I think this section is closing in on complete and fully 
> edited when we are all finding the same things to nitpick over.
> 
> The main change I added here that could use a review is this addition:
> 
> + Waiting to acquire buffer cleanup locks.  This can occur when one
> + database backend is trying to access to data block that is 
> "pinned"
> + by another backend that is making a change to it.  Such pins 
> should
> + normally be very short-lived, but they can take longer than normal
> + under some circumstances, such as when a cursor executing over
> + a set of data has stopped for some reason.
> 
> That's how I interpreted what Simon told me about this subject, but I 
> may not have captured the details accurately.  I didn't think that 
> saying something as ominous sounding as "Waiting to acquire buffer 
> cleanup locks" should be there without any description at all what 
> conditions that happens under, which is what's there right now.
> 
> There are only two open things in these docs I'm still a little bugged by:
> 
> -The first paragraph mentions "restoring a backup to an exact state with 
> great precision"; I have no idea what that's supposed to mean in this 
> context.
> 
> -The section about stats collection says "The stats file is deleted at 
> the start of recovery, so stats from primary and standby will differ; 
> this is considered a feature not a bug".  This left me going "why?", and 
> some clarification of the reasoning or limitation causing that drift 
> would be nice.
> 
> P.S.  I touched a few other files as well, related to a debate from 
> dinner the other night that touched on Simon introducing more UK 
> spelling into the docs.  This is what the docs look like now:
> 
> postgresql/doc/src/sgml $ grep -r behavior * | wc -l
> 386
> 
> postgresql/doc/src/sgml $ grep -r behaviour * | wc -l
> 9
> 
> Half of the latter were in the new material, so while on a binge fixing 
> those I adjusted the mis-"behaviour"s in other sections too.
> 
> -- 
> Greg Smith  2ndQuadrant US  Baltimore, MD
> PostgreSQL Training, Services and Support
> [email protected]   www.2ndQuadrant.us
> 


> 
> -- 
> Sent via pgsql-docs mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs

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

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/backup.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v
retrieving revision 2.141
diff -c -c -r2.141 backup.sgml
*** doc/src/sgml/backup.sgml	9 Feb 2010 16:50:25 -	2.141
--- doc/src/sgml/backup.sgml	19 Feb 2010 00:15:12 -
***
*** 126,132 
  execute after an SQL error is encountered. You might wish to run
  psql with
  the ON_ERROR_STOP variable set to alter that
! behaviour and have psql exit with an
  exit status of 3 if an SQL error occurs:
  
  psql --set ON_ERROR_STOP=on dbname < infile
--- 126,132 
  execute after an SQL error is encountered. You might wish to run
  psql with
  the ON_ERROR_STOP variable set to alter that
! behavior and have psql exit with an
  exit status of 3 if an SQL error occurs:
  
  psql --set ON_ERROR_STOP=on dbname < infile
Index: doc/src/sgml/ecpg.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/ecpg.sgml,v
retrieving revision 1.96
diff -c -c -r1.96 ecpg.sgml
*** doc/src/sgml/ecpg.sgml	17 Feb 2010 04:19:37 -	1.96
--- doc/src/sgml/ecpg.sgml	19 Feb 2010 00:15:12 -
***
*** 2882,2888 
 program and most of the additional functions of the Informix compatibility
 mode allow you to operate on those C host program types. Note however that
 the extent of the compatibility is limited. It does not try to copy Informix
!behaviour; it allows you to do more or less the same operations and gives
 you functions that have the same name and the same basic behavior but it is
 no drop-in replacement if you are using Informix at the