Re: [DOCS] [ADMIN] shared_buffers and shmmax

2008-12-15 Thread Bruce Momjian
Tom Lane wrote:
> [ redirecting to pgsql-docs ]
> 
> Valentin Bogdanov  writes:
> >> From: dx k9 
> >> I'm trying to understand what the documentation means
> >> by bytes per increment, what is the increment supposed to
> >> be bytes, MB, or Kb.
> 
> > shared_buffers is in disk block size, typically 8K, at least that's what it 
> > is on Linux platforms. shmmax is quite simply in bytes.
> 
> The table the OP is looking at (table 17.2 in the 8.3 docs) predates
> the ability to specify shared_buffers in KB or MB instead of
> number-of-buffers.  I agree it's not entirely obvious that what it
> means is "multiply your setting in KB/MB by 8400/8192".  Anybody have
> an idea how to clarify things?

I have updated the table title to be clearer.

-- 
  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/runtime.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v
retrieving revision 1.422
diff -c -c -r1.422 runtime.sgml
*** doc/src/sgml/runtime.sgml	20 Nov 2008 11:48:26 -	1.422
--- doc/src/sgml/runtime.sgml	15 Dec 2008 23:22:24 -
***
*** 1087,1093 
   

 Name
!Approximate multiplier (bytes per increment) as of 8.3

   
  
--- 1087,1093 
   

 Name
!Additional bytes per object, as of 8.3

   
  
***
*** 1119,1125 
  

 Fixed space requirements
!770 kB

   
  
--- 1119,1125 
  

 Fixed space requirements
!770 k

   
  

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


Re: [DOCS] [ADMIN] shared_buffers and shmmax

2008-12-15 Thread Bruce Momjian

I have added this TODO item:

Rationalize the discrepancy between settings that use values in bytes
and SHOW that returns the object count

* http://archives.postgresql.org/pgsql-docs/2008-07/msg7.php 

---

Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: RIPEMD160
> NotDashEscaped: You need GnuPG to verify this message
> 
> 
> >> shared_buffers is in disk block size, typically 8K
> 
> > The table the OP is looking at (table 17.2 in the 8.3 docs) predates
> > the ability to specify shared_buffers in KB or MB instead of
> > number-of-buffers.  I agree it's not entirely obvious that what it
> > means is "multiply your setting in KB/MB by 8400/8192".  Anybody have
> > an idea how to clarify things?
> 
> Bite the bullet and start showing the buffer settings as a pure number of 
> bytes
> everywhere, and get rid of the confusing '8kB' unit in pg_settings? Things 
> like
> this don't help our cause:
> 
> test=# show shared_buffers;
>  shared_buffers
> 
>  24MB
> (1 row)
> 
> test=# set temp_buffers = '24MB';
> SET
> 
> test=# show temp_buffers;
>  temp_buffers
> --
>  3072
> 
> test=# select name, setting from pg_settings where name ~ 'buffers';
>   name  | setting
> +-
>  shared_buffers | 3072
>  temp_buffers   | 3072
>  wal_buffers| 8
> 
> test=# show wal_buffers;
>  wal_buffers
> -
>  64kB
> 
> 
> --
> Greg Sabino Mullane [email protected]
> End Point Corporation
> PGP Key: 0x14964AC8 200807241351
> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
> -BEGIN PGP SIGNATURE-
> 
> iEYEAREDAAYFAkiIwYYACgkQvJuQZxSWSsiY5wCfU/tca+1JakWaMCDDRHEHk/Uj
> 1rcAoMi1FNGSpJhyXWde1psygq6v3MlS
> =gCPg
> -END PGP SIGNATURE-
> 
> 
> 
> -- 
> 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. +

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


Re: [DOCS] [ADMIN] shared_buffers and shmmax

2008-12-15 Thread Alvaro Herrera
Bruce Momjian wrote:
> Tom Lane wrote:
> > [ redirecting to pgsql-docs ]
> > 
> > Valentin Bogdanov  writes:
> > >> From: dx k9 
> > >> I'm trying to understand what the documentation means
> > >> by bytes per increment, what is the increment supposed to
> > >> be bytes, MB, or Kb.
> > 
> > > shared_buffers is in disk block size, typically 8K, at least that's what 
> > > it is on Linux platforms. shmmax is quite simply in bytes.
> > 
> > The table the OP is looking at (table 17.2 in the 8.3 docs) predates
> > the ability to specify shared_buffers in KB or MB instead of
> > number-of-buffers.  I agree it's not entirely obvious that what it
> > means is "multiply your setting in KB/MB by 8400/8192".  Anybody have
> > an idea how to clarify things?
> 
> I have updated the table title to be clearer.

I don't find it any clearer ... I think the missing clue is that if you
specify shared_buffers values in MB, you must divide the value by block
size.


> ***
> *** 1119,1125 
>   
> 
>  Fixed space requirements
> !770 kB
> 
>
>   
> --- 1119,1125 
>   
> 
>  Fixed space requirements
> !770 k
> 
>
>   

This change is wrong, why did you do it?

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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


Re: [DOCS] [ADMIN] shared_buffers and shmmax

2008-12-15 Thread Bruce Momjian
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > Tom Lane wrote:
> > > [ redirecting to pgsql-docs ]
> > > 
> > > Valentin Bogdanov  writes:
> > > >> From: dx k9 
> > > >> I'm trying to understand what the documentation means
> > > >> by bytes per increment, what is the increment supposed to
> > > >> be bytes, MB, or Kb.
> > > 
> > > > shared_buffers is in disk block size, typically 8K, at least that's 
> > > > what it is on Linux platforms. shmmax is quite simply in bytes.
> > > 
> > > The table the OP is looking at (table 17.2 in the 8.3 docs) predates
> > > the ability to specify shared_buffers in KB or MB instead of
> > > number-of-buffers.  I agree it's not entirely obvious that what it
> > > means is "multiply your setting in KB/MB by 8400/8192".  Anybody have
> > > an idea how to clarify things?
> > 
> > I have updated the table title to be clearer.
> 
> I don't find it any clearer ... I think the missing clue is that if you
> specify shared_buffers values in MB, you must divide the value by block
> size.

Well, the heading says "object" now so I thought it would suggest we are
talking about objects and not bytes.

> > ***
> > *** 1119,1125 
> >   
> > 
> >  Fixed space requirements
> > !770 kB
> > 
> >
> >   
> > --- 1119,1125 
> >   
> > 
> >  Fixed space requirements
> > !770 k
> > 
> >
> >   
> 
> This change is wrong, why did you do it?

The heading says "bytes" so having the "B" was unnecessary and possibly
confusing.


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

  + If your life is a hard drive, Christ can be your backup. +

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


Re: [DOCS] [ADMIN] shared_buffers and shmmax

2008-12-15 Thread Tom Lane
Bruce Momjian  writes:
> Alvaro Herrera wrote:
>> I don't find it any clearer ... I think the missing clue is that if you
>> specify shared_buffers values in MB, you must divide the value by block
>> size.

> Well, the heading says "object" now so I thought it would suggest we are
> talking about objects and not bytes.

I'm with Alvaro: neither of those changes were improvements.

regards, tom lane

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


Re: [DOCS] triggers on views?

2008-12-15 Thread Bruce Momjian
Tom Lane wrote:
> Robert Treat  writes:
> > We had a doc comment come in noting that the second paragraph seems to be 
> > incorrect on 
> > http://www.postgresql.org/docs/8.3/interactive/rules-triggers.html, 
> > specifically the part that says "On the other hand, a trigger that is fired 
> > on INSERT on a view can do the same as a rule".
> 
> This was discussed last month:
> http://archives.postgresql.org/pgsql-general/2008-06/msg00669.php

OK, updated wording applied to CVS HEAD; attached.

-- 
  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/rules.sgml
===
RCS file: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v
retrieving revision 1.51
diff -c -c -r1.51 rules.sgml
*** doc/src/sgml/rules.sgml	1 Feb 2007 19:10:24 -	1.51
--- doc/src/sgml/rules.sgml	16 Dec 2008 03:10:55 -
***
*** 1869,1881 
  
  
  
! On the other hand, a trigger that is fired on
! INSERT on a view can do the same as a rule: put
! the data somewhere else and suppress the insert in the view. But
! it cannot do the same thing on UPDATE or
! DELETE, because there is no real data in the
! view relation that could be scanned, and thus the trigger would
! never get called. Only a rule will help.
  
  
  
--- 1869,1877 
  
  
  
! On the other hand, a trigger cannot be created on views because
! there is no real data in a view relation;  however INSERT, UPDATE,
! and DELETE rules can be created on views.
  
  
  

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


Re: [DOCS] [ADMIN] shared_buffers and shmmax

2008-12-15 Thread Bruce Momjian
Tom Lane wrote:
> Bruce Momjian  writes:
> > Alvaro Herrera wrote:
> >> I don't find it any clearer ... I think the missing clue is that if you
> >> specify shared_buffers values in MB, you must divide the value by block
> >> size.
> 
> > Well, the heading says "object" now so I thought it would suggest we are
> > talking about objects and not bytes.
> 
> I'm with Alvaro: neither of those changes were improvements.

OK, I never got the change applied because of Alvaro's objection so
there is nothing to revert.   Alvaro said he has an idea for improved
wording;  I do not.

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

  + If your life is a hard drive, Christ can be your backup. +

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