Re: [DOCS] Documentation of pg_badkend_pid and stats functions

2007-05-13 Thread Jim Nasby

On May 7, 2007, at 11:03 AM, Jim Nasby wrote:

On May 6, 2007, at 11:44 AM, Bruce Momjian wrote:

Jim Nasby wrote:

On Apr 12, 2007, at 7:54 AM, Jim Nasby wrote:

Two questions: Why is pg_backend_pid documented with the stats
functions (9.19 System Information Functions) seems more logical.

Also, I can see mentioning the stats functions in the monitoring
section, but shouldn't they actually be documented in with the rest
of the functions?


No comments? Does that mean if I write up a patch it'll be accepted?


Yea, I was wondering about that.  I think the best idea would be to
reference the backend functions from the main functions page, rather
than move them.


Well, pg_backend_pid makes no sense being in with the stats  
functions, so I'll move it. I'll just include references to the  
other stuff.


Turns out it didn't really make much more sense to move  
pg_backend_pid either, so I went with Bruce's original idea.

monfunc.patch
Description: Binary data


--
Jim Nasby[EMAIL PROTECTED]
EnterpriseDB  http://enterprisedb.com  512.569.9461 (cell)



---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


[DOCS] OS/X startup scripts

2007-05-13 Thread David Fetter
Folks,

The attached tarball should be unpacked in contrib/startup-scripts,
and supplants PostgreSQL.darwin and StartupParameters.plist.darwin.
Thanks to Mark Cotner of Reflectr
 fame for this update :)

I haven't included the customary diffs.  This points me to some of the
many deficiencies of CVS, namely that I would need write access in
order to have it create a diff, and write access is boolean, which
means that I can't get write access only to the parts of the tree that
make sense for me to have write access to.

What say we consider using Git, which includes a CVS interface,
starting after 8.3 gets out the door?

Cheers,
David.
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate


PostgreSQL_startup.tgz
Description: GNU Zip compressed data

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [DOCS] [GENERAL] PITR and tar

2007-05-13 Thread Jim C. Nasby
Moving to -docs...

Does anyone know what the history of the docs saying that GNU tar had
issues with files changing underneath it? According to this report it's
actually BSD tar that has the issue.

On Wed, May 09, 2007 at 10:19:05AM -0700, Jeff Davis wrote:
> On Wed, 2007-05-09 at 11:40 -0500, Jim Nasby wrote:
> > Actually, looking at the docs, the problem is with some versions of  
> > GNU tar. AFAIK bsdtar is perfectly happy to archive files that have  
> > changed from underneath it.
> > 
> 
> $ tar --version
> bsdtar 1.2.53 - libarchive 1.3.1
> 
> That fails to create a file in proper gzip format when the files are
> concurrently modified.
> 
> However, 
> 
> $ tar --version
> tar (GNU tar) 1.14
> Copyright (C) 2004 Free Software Foundation, Inc.
> This program comes with NO WARRANTY, to the extent permitted by law.
> You may redistribute it under the terms of the GNU General Public
> License;
> see the file named COPYING for details.
> Written by John Gilmore and Jay Fenlason.
> 
> That _appears_ to work.
> 
> Perhaps FreeBSD users should take notice of this problem. It's certainly
> not a postgresql problem, but I know there are a lot of freebsd users
> here, and using tar on fast-changing data may be rare outside of
> postgresql.
> 
> Regards,
>   Jeff Davis
> 

-- 
Jim Nasby  [EMAIL PROTECTED]
EnterpriseDB  http://enterprisedb.com  512.569.9461 (cell)

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [DOCS] Documentation of pg_badkend_pid and stats functions

2007-05-13 Thread Tom Lane
Jim Nasby <[EMAIL PROTECTED]> writes:
> System Information Functions
  
> 
> +In addition to the functions listed in this section, there are a number 
> of
> +functions related to the statistics system that also provide system
> +information. See  for more
> +information.
> +   

Surely a section should not *begin* with a cross-reference to someplace
else.

regards, tom lane

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [DOCS] OS/X startup scripts

2007-05-13 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes:
> I haven't included the customary diffs.  This points me to some of the
> many deficiencies of CVS, namely that I would need write access in
> order to have it create a diff,

Strange, it works fine for everyone else.

regards, tom lane

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [DOCS] Documentation of pg_badkend_pid and stats functions

2007-05-13 Thread Jim C. Nasby


monfunc2.patch
Description: Binary data

On Sun, May 13, 2007 at 06:48:01PM -0400, Tom Lane wrote:

Jim Nasby <[EMAIL PROTECTED]> writes:

System Information Functions




+In addition to the functions listed in this section, there  
are a number of
+functions related to the statistics system that also provide  
system
+information. See  for  
more

+information.
+   


Surely a section should not *begin* with a cross-reference to  
someplace

else.


My concern is that folks will see the table right below it, not find
what they're looking for there, and move on... what about immediately
after the table?
--
Jim Nasby  [EMAIL PROTECTED]
EnterpriseDB  http://enterprisedb.com  512.569.9461 (cell)

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [PATCHES] [DOCS] OS/X startup scripts

2007-05-13 Thread Andrew Dunstan



Tom Lane wrote:

David Fetter <[EMAIL PROTECTED]> writes:
  

I haven't included the customary diffs.  This points me to some of the
many deficiencies of CVS, namely that I would need write access in
order to have it create a diff,



Strange, it works fine for everyone else.


  


Especially if you have cvsutils installed (can be found in many places 
including fedora extras).


cheers

andrew

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

   http://www.postgresql.org/about/donate


Re: [DOCS] Documentation of pg_badkend_pid and stats functions

2007-05-13 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> On Sun, May 13, 2007 at 06:48:01PM -0400, Tom Lane wrote:
>> Surely a section should not *begin* with a cross-reference to  
>> someplace else.

> My concern is that folks will see the table right below it, not find
> what they're looking for there, and move on... what about immediately
> after the table?

Immediately after is fine with me.  For that matter, you could probably
get away with putting it between the introductory para and the table
proper.  I'm just allergic to sections that don't begin with a topic
sentence telling you what they are about.

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [DOCS] [GENERAL] PITR and tar

2007-05-13 Thread Bruce Momjian
Jim C. Nasby wrote:
> Moving to -docs...
> 
> Does anyone know what the history of the docs saying that GNU tar had
> issues with files changing underneath it? According to this report it's
> actually BSD tar that has the issue.

As I remember, Tom was the one who found that GNU tar would return a
non-zero exit status if the file changed during backup, so you couldn't
determine if the backup was successful based on the exit code.

---


> 
> On Wed, May 09, 2007 at 10:19:05AM -0700, Jeff Davis wrote:
> > On Wed, 2007-05-09 at 11:40 -0500, Jim Nasby wrote:
> > > Actually, looking at the docs, the problem is with some versions of  
> > > GNU tar. AFAIK bsdtar is perfectly happy to archive files that have  
> > > changed from underneath it.
> > > 
> > 
> > $ tar --version
> > bsdtar 1.2.53 - libarchive 1.3.1
> > 
> > That fails to create a file in proper gzip format when the files are
> > concurrently modified.
> > 
> > However, 
> > 
> > $ tar --version
> > tar (GNU tar) 1.14
> > Copyright (C) 2004 Free Software Foundation, Inc.
> > This program comes with NO WARRANTY, to the extent permitted by law.
> > You may redistribute it under the terms of the GNU General Public
> > License;
> > see the file named COPYING for details.
> > Written by John Gilmore and Jay Fenlason.
> > 
> > That _appears_ to work.
> > 
> > Perhaps FreeBSD users should take notice of this problem. It's certainly
> > not a postgresql problem, but I know there are a lot of freebsd users
> > here, and using tar on fast-changing data may be rare outside of
> > postgresql.
> > 
> > Regards,
> > Jeff Davis
> > 
> 
> -- 
> Jim Nasby  [EMAIL PROTECTED]
> EnterpriseDB  http://enterprisedb.com  512.569.9461 (cell)
> 
> ---(end of broadcast)---
> TIP 4: Have you searched our list archives?
> 
>http://archives.postgresql.org/

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>  http://momjian.us
  EnterpriseDB   http://www.enterprisedb.com

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

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[DOCS] Autovacuum and XID wraparound

2007-05-13 Thread David Fetter
Folks,

Per Neil Conway, here's some doc patches re: the autovacuum daemon's
behavior.  Should this be back-patched to 8.2x?

Cheers,
D
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
Index: doc/src/sgml/config.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/config.sgml,v
retrieving revision 1.122
diff -c -r1.122 config.sgml
*** doc/src/sgml/config.sgml20 Apr 2007 02:37:37 -  1.122
--- doc/src/sgml/config.sgml14 May 2007 01:16:02 -
***
*** 3172,3177 
--- 3172,3185 
  This parameter can only be set in the postgresql.conf
  file or on the server command line.
 
+
+ 
+   Even when this variable is set to off, the autovacuum daemon
+   will run periodically in order to prevent transaction_id
+   wraparound.  See  for
+   more information.
+ 
+

   
  
Index: src/backend/utils/misc/postgresql.conf.sample
===
RCS file: 
/projects/cvsroot/pgsql/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.215
diff -c -r1.215 postgresql.conf.sample
*** src/backend/utils/misc/postgresql.conf.sample   18 Apr 2007 16:44:18 
-  1.215
--- src/backend/utils/misc/postgresql.conf.sample   14 May 2007 01:16:02 
-
***
*** 372,377 
--- 372,379 
  #---
  # AUTOVACUUM PARAMETERS
  #---
+ # Note: even when autovacuum is turned off, the autovacuum daemon will
+ # run in order to prevent transaction id wraparound.
  
  #autovacuum = on  # enable autovacuum subprocess?
# 'on' requires stats_start_collector

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [PATCHES] [DOCS] OS/X startup scripts

2007-05-13 Thread David Fetter
On Sun, May 13, 2007 at 07:04:44PM -0400, Andrew Dunstan wrote:
> 
> 
> Tom Lane wrote:
> >David Fetter <[EMAIL PROTECTED]> writes:
> >  
> >>I haven't included the customary diffs.  This points me to some of
> >>the many deficiencies of CVS, namely that I would need write
> >>access in order to have it create a diff,
> >
> >Strange, it works fine for everyone else.
> 
> Especially if you have cvsutils installed (can be found in many
> places including fedora extras).

I didn't know about those, so I'll prepare a patch to the developer
and documenter docs that mentions this utility :)

Cheers,
D
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Re: [DOCS] [GENERAL] PITR and tar

2007-05-13 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> Does anyone know what the history of the docs saying that GNU tar had
> issues with files changing underneath it? According to this report it's
> actually BSD tar that has the issue.

It seems to be a different issue.  The problem with GNU tar is that it
issues a warning and exits with nonzero status, which is a problem for
backup scripts because they can't easily distinguish this case from an
actual failure.  But AFAIK the output file is self-consistent anyway.
It sounds like bsd tar is just plain broken :-(

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [PATCHES] [DOCS] OS/X startup scripts

2007-05-13 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes:
> On Sun, May 13, 2007 at 07:04:44PM -0400, Andrew Dunstan wrote:
>> Tom Lane wrote:
>>> Strange, it works fine for everyone else.
>> 
>> Especially if you have cvsutils installed (can be found in many
>> places including fedora extras).

> I didn't know about those, so I'll prepare a patch to the developer
> and documenter docs that mentions this utility :)

I dunno what cvsutils is, but I do know that plain old "cvs diff" works
fine whether you have commit privs or not.  Rather than preparing a
patch to our docs, perhaps you should spend some time reading the CVS
docs.

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[DOCS] On patching without write access to CVS

2007-05-13 Thread David Fetter
Folks,

Thanks to Andrew Dunstan for pointing me toward cvsutils.  As not
everybody knows about them, here's a small patch which lets people
know at least in theory where they are.

Cheers,
D
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate
Index: doc/FAQ_DEV
===
RCS file: /projects/cvsroot/pgsql/doc/FAQ_DEV,v
retrieving revision 1.135
diff -c -r1.135 FAQ_DEV
*** doc/FAQ_DEV 5 May 2007 14:33:55 -   1.135
--- doc/FAQ_DEV 14 May 2007 01:56:11 -
***
*** 108,114 
 work. Failure to do so might mean your patch is rejected. If your work
 is being sponsored by a company, read this article for tips on being
 more effective.
!
 A web site is maintained for patches awaiting review,
 http://momjian.postgresql.org/cgi-bin/pgpatches, and those that are
 being kept for the next release,
--- 108,120 
 work. Failure to do so might mean your patch is rejected. If your work
 is being sponsored by a company, read this article for tips on being
 more effective.
! 
!To create patches which would otherwise require that you have write
!access to the CVS repository, for example ones that add or remove
!files, you can use cvsutils.  The cvsutils toolchain is packaged
!for many operating systems and available in source form at
!http://www.red-bean.com/cvsutils/
! 
 A web site is maintained for patches awaiting review,
 http://momjian.postgresql.org/cgi-bin/pgpatches, and those that are
 being kept for the next release,
Index: doc/src/sgml/cvs.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/cvs.sgml,v
retrieving revision 1.42
diff -c -r1.42 cvs.sgml
*** doc/src/sgml/cvs.sgml   27 Mar 2007 01:45:22 -  1.42
--- doc/src/sgml/cvs.sgml   14 May 2007 01:56:11 -
***
*** 15,20 
--- 15,24 
  Thomas
  Lockhart
 
+
+ David
+ Fetter
+

1999-05-20
   
***
*** 150,155 
--- 154,166 
 comes with CVS, or see the online
 documentation at http://www.nongnu.org/cvs/";>.

+   
+For those things which CVS does not do
+by itself, such as letting you create patches without write access,
+you can use cvsutils, which is packaged
+for many operating systems, or available in source form at http://www.red-bean.com/cvsutils/";>.
+   
   
  
   

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [PATCHES] [DOCS] OS/X startup scripts

2007-05-13 Thread David Fetter
On Sun, May 13, 2007 at 09:51:53PM -0400, Tom Lane wrote:
> David Fetter <[EMAIL PROTECTED]> writes:
> > On Sun, May 13, 2007 at 07:04:44PM -0400, Andrew Dunstan wrote:
> >> Tom Lane wrote:
> >>> Strange, it works fine for everyone else.
> >> 
> >> Especially if you have cvsutils installed (can be found in many
> >> places including fedora extras).
> 
> > I didn't know about those, so I'll prepare a patch to the
> > developer and documenter docs that mentions this utility :)
> 
> I dunno what cvsutils is, but I do know that plain old "cvs diff"
> works fine whether you have commit privs or not.  Rather than
> preparing a patch to our docs, perhaps you should spend some time
> reading the CVS docs.

cvs diff works just great until you want to add or remove a file
without write permissions to the CVS repository, i.e. when you've
checked out as anonymous.

Cheers,
David.
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [DOCS] Autovacuum and XID wraparound

2007-05-13 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes:
> Per Neil Conway, here's some doc patches re: the autovacuum daemon's
> behavior.  Should this be back-patched to 8.2x?

This fact is already documented in at least three places; do we really
need two more?  The proposed addition to postgresql.conf seems
particularly over-the-top, since there is no entry in that file that
even pretends to offer a complete description of the associated
behavior.

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [DOCS] Autovacuum and XID wraparound

2007-05-13 Thread David Fetter
On Sun, May 13, 2007 at 10:06:40PM -0400, Tom Lane wrote:
> David Fetter <[EMAIL PROTECTED]> writes:
> > Per Neil Conway, here's some doc patches re: the autovacuum
> > daemon's behavior.  Should this be back-patched to 8.2x?
> 
> This fact is already documented in at least three places; do we
> really need two more?

Yes.

> The proposed addition to postgresql.conf seems particularly
> over-the-top, since there is no entry in that file that even
> pretends to offer a complete description of the associated behavior.

I think that a boolean that doesn't do what you expect booleans to do,
i.e. turn the thing all the way off, is worth a mention.

Cheers,
David.
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
phone: +1 415 235 3778AIM: dfetter666
  Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [PATCHES] [DOCS] OS/X startup scripts

2007-05-13 Thread Mark Kirkwood

David Fetter wrote:

cvs diff works just great until you want to add or remove a file
without write permissions to the CVS repository, i.e. when you've
checked out as anonymous.



I usually saved an untouched version of the tree to compare against, so 
something like:


$ cvs diff -Nacr pgsql.orig pgsql

gives a complete patch including added/deleted files. It is a bit 
primitive, but is pretty easy to do!


Cheers

Mark

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [PATCHES] [DOCS] Autovacuum and XID wraparound

2007-05-13 Thread Neil Conway
On Sun, 2007-13-05 at 22:06 -0400, Tom Lane wrote:
> This fact is already documented in at least three places; do we really
> need two more?

I think we need to at least modify the documentation for the autovacuum
GUC parameter, which currently states only that it "controls whether the
server should run the autovacuum launcher daemon" -- this is not
strictly true, and in any case, it isn't the whole story.

> The proposed addition to postgresql.conf seems particularly
> over-the-top

I agree that this information doesn't really belong in postgresql.conf.

-Neil



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [PATCHES] [DOCS] OS/X startup scripts

2007-05-13 Thread Neil Conway
On Sun, 2007-13-05 at 18:58 -0700, David Fetter wrote:
> cvs diff works just great until you want to add or remove a file
> without write permissions to the CVS repository, i.e. when you've
> checked out as anonymous.

Personally, I usually work against a checkout from a local mirror of the
CVS repository (which you can create via cvsup or rsync). With that
setup, "cvs add" and "cvs diff -N" work fine, since you can arrange for
write access to the local mirror.

(I'm always surprised to hear that anyone does a non-trivial amount of
work on Postgres without setting up a CVS mirror...)

-Neil



---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org