| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Jeff Frost <jeff(at)frostconsultingllc(dot)com> |
| Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Richard Huxton <dev(at)archonet(dot)com>, pgsql-docs(at)postgresql(dot)org |
| Subject: | Re: Proposed doc-patch: Identifying the Current WAL file |
| Date: | 2006-04-15 17:56:32 |
| Message-ID: | 20245.1145123792@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs pgsql-patches |
Jeff Frost <jeff(at)frostconsultingllc(dot)com> 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 just lets us filter directories out.
This seems both overly cute and wrong, because it fails to filter plain
files that might have a new mtime but aren't WAL files. I'd suggest a
simple test on file name to make sure it looks like a WAL file, ie,
24 hex digits.
ls -t .../pg_xlog | grep '^[0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]$' | head -1
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-04-15 17:57:43 | Re: Proposed doc-patch: Identifying the Current WAL file |
| Previous Message | Jeff Frost | 2006-04-15 17:47:12 | Re: Proposed doc-patch: Identifying the Current WAL file |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martijn van Oosterhout | 2006-04-15 17:57:20 | Re: [PATCH] Reduce noise from tsort |
| Previous Message | Jeff Frost | 2006-04-15 17:47:12 | Re: Proposed doc-patch: Identifying the Current WAL file |