Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-05-30 Thread Bruce Momjian
Simon, I understand this is only for the 8.1.X and 8.0.X branches. I am hesitant to put something in back branches when the main branch does not have this functionality. I will hold the patch until we are sure where the head branch is going. -

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-05-29 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --- Si

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-05-23 Thread Simon Riggs
On Sun, 2006-04-16 at 15:22 +0100, Simon Riggs wrote: > On Sat, 2006-04-15 at 16:20 -0400, Bruce Momjian wrote: > > Simon Riggs wrote: > > > On Sat, 2006-04-15 at 12:24 -0400, Bruce Momjian wrote: > > > > And if we can't provide one, should we supply an SQL function > > > > to return the current WA

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-17 Thread Alvaro Herrera
Jeff Frost wrote: > So it looks like the original was correct all along, but with Tom's regex > it's much cleaner. Too bad grep's regex engine doesn't support {24}. Try grep -E ... it's even POSIX AFAIR. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-17 Thread Bruce Momjian
Stephen Frost wrote: -- Start of PGP signed section. > * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > > In the first case, x2 is current, having be just switched to from x1, > > while in the second case, x1 is current. In BSD, you can use ls -ltT to > > see the seconds, but in Linux it is somet

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-17 Thread Stephen Frost
* Bruce Momjian (pgman@candle.pha.pa.us) wrote: > In the first case, x2 is current, having be just switched to from x1, > while in the second case, x1 is current. In BSD, you can use ls -ltT to > see the seconds, but in Linux it is something different, and I am sure > there are some operating syst

[DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-17 Thread Richard Huxton
Reading Tom's posting here: http://archives.postgresql.org/pgsql-general/2006-04/msg00499.php I just realised we don't seem to mention this in the docs anywhere. I propose adding a short paragraph to 23.3.1 http://www.postgresql.org/docs/8.1/static/backup-online.html#BACKUP-ONLINE-CAVEATS Afte

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-16 Thread Simon Riggs
On Sat, 2006-04-15 at 16:20 -0400, Bruce Momjian wrote: > Simon Riggs wrote: > > On Sat, 2006-04-15 at 12:24 -0400, Bruce Momjian wrote: > > > And if we can't provide one, should we supply an SQL function > > > to return the current WAL name? > > > > I'll do this. Just give me a few days to get my

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-16 Thread Jaime Casanova
On 4/15/06, Tom Lane <[EMAIL PROTECTED]> wrote: > Bruce Momjian writes: > > The point is that the test does not have a > > one-second window of showing the wrong answer, meaning I could wait for > > 60 seconds, and still see the wrong WAL file at the top. > > Oh, I see your point: you can lose at

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Bruce Momjian
Simon Riggs wrote: > On Sat, 2006-04-15 at 12:24 -0400, Bruce Momjian wrote: > > And if we can't provide one, should we supply an SQL function > > to return the current WAL name? > > I'll do this. Just give me a few days to get my feet under the new desk. > I know its well past time I sorted this

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Simon Riggs
On Sat, 2006-04-15 at 12:24 -0400, Bruce Momjian wrote: > And if we can't provide one, should we supply an SQL function > to return the current WAL name? I'll do this. Just give me a few days to get my feet under the new desk. I know its well past time I sorted this and a few other things out. --

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Tom Lane
Bruce Momjian writes: > The point is that the test does not have a > one-second window of showing the wrong answer, meaning I could wait for > 60 seconds, and still see the wrong WAL file at the top. Oh, I see your point: you can lose at most one second's worth of data, but that second could be a

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Jeff Frost
On Sat, 15 Apr 2006, Bruce Momjian wrote: And I tried it on Fedora Core 2: Device: 11h/17d Inode: 24707338Links: 1 Access: (0644/-rw-r--r--) Uid: ( 7078/bmomjian) Gid: ( 100/ users) Access: 2006-04-15 11:41:53.0 -0700 Modify: 2006-04-15 11:41:53

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Bruce Momjian
Jeff Frost wrote: > On Sat, 15 Apr 2006, Bruce Momjian wrote: > > > Tom Lane wrote: > > > > No, I am not: > > > > $ touch x1 x2; touch x2 > > $ sleep 2; ls -lt > > total 0 > > -rw-r--r-- 1 root postgres 0 Apr 15 14:04 x1 > > -rw-r--r-- 1 root postgres 0 Apr 15 14:04 x2 >

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Jeff Frost
On Sat, 15 Apr 2006, Bruce Momjian wrote: Tom Lane wrote: No, I am not: $ touch x1 x2; touch x2 $ sleep 2; ls -lt total 0 -rw-r--r-- 1 root postgres 0 Apr 15 14:04 x1 -rw-r--r-- 1 root postgres 0 Apr 15 14:04 x2 If the write to x2 happens in the f

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Jeff Frost
On Sat, 15 Apr 2006, Tom Lane wrote: Bruce Momjian writes: Also, what happens if the log switch happens, and some data change is written to the new WAL file in the first second, but nothing happens to the database after that for a minute? Your test would still show the old log file. You see

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Also, what happens if the log switch happens, and some data change is > > written to the new WAL file in the first second, but nothing happens to > > the database after that for a minute? Your test would still show the > > old log file. > > You seem to

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Tom Lane
Bruce Momjian writes: > Also, what happens if the log switch happens, and some data change is > written to the new WAL file in the first second, but nothing happens to > the database after that for a minute? Your test would still show the > old log file. You seem to be assuming that ls will sort

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Tom Lane
Jeff Frost <[EMAIL PROTECTED]> writes: >>> ls -tp /pg_xlog/ | grep -v "backup\|/" | head -1 >> >> What does the -p and \| pipe check do? We don't have named pipes in >> that directory, do we? > The -p shows forward slashes after directories and the \| acts as an or and > the / following that jus

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Jeff Frost
On Sat, 15 Apr 2006, Bruce Momjian wrote: ls -tp /pg_xlog/ | grep -v "backup\|/" | head -1 which seems to work fairly well. Looks like that thread is here: http://archives.postgresql.org/pgsql-admin/2005-10/msg00173.php What does the -p and \| pipe check do? We don't have named pipes in th

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Bruce Momjian
Jeff Frost wrote: > On Sat, 15 Apr 2006, Tom Lane wrote: > > > For a command-line solution it's probably sufficient to sort by mtime, > > ie > > ls -t | head -1 > > A while back when I was trying to work this out on the admin list, I believe > we came up with the following: > > ls -tp /pg_x

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Jeff Frost
On Sat, 15 Apr 2006, Tom Lane wrote: For a command-line solution it's probably sufficient to sort by mtime, ie ls -t | head -1 A while back when I was trying to work this out on the admin list, I believe we came up with the following: ls -tp /pg_xlog/ | grep -v "backup\|/" | head -1

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Tom Lane
Bruce Momjian writes: > In the first case, x2 is current, having be just switched to from x1, > while in the second case, x1 is current. In BSD, you can use ls -ltT to > see the seconds, but in Linux it is something different, and I am sure > there are some operating systems that don't allow you

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-15 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Richard Huxton wrote: > >> To identify the current, partially-filled WAL segment, sort first by > >> mtime and second by file name. That is, take the latest mtime among the > >> properly-named files, breaking ties by taking the higher filename. > > > I

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-14 Thread Tom Lane
Bruce Momjian writes: > Richard Huxton wrote: >> To identify the current, partially-filled WAL segment, sort first by >> mtime and second by file name. That is, take the latest mtime among the >> properly-named files, breaking ties by taking the higher filename. > I am confused by this. Why do b

Re: [DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-14 Thread Bruce Momjian
Richard Huxton wrote: > Reading Tom's posting here: > http://archives.postgresql.org/pgsql-general/2006-04/msg00499.php > > I just realised we don't seem to mention this in the docs anywhere. I > propose adding a short paragraph to 23.3.1 > http://www.postgresql.org/docs/8.1/static/backup-online.h

[DOCS] Proposed doc-patch: Identifying the Current WAL file

2006-04-13 Thread Richard Huxton
Reading Tom's posting here: http://archives.postgresql.org/pgsql-general/2006-04/msg00499.php I just realised we don't seem to mention this in the docs anywhere. I propose adding a short paragraph to 23.3.1 http://www.postgresql.org/docs/8.1/static/backup-online.html#BACKUP-ONLINE-CAVEATS After