pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedwal logs in pg_xlog
4+ messages / 3 participants
[nested] [flat]
* wal logs in pg_xlog
@ 2005-06-27 06:04 Nasir Iqbal Danish <nasir@amaana.com>
2005-06-27 14:56 ` Re: wal logs in pg_xlog Michael Fuhr <mike@fuhr.org>
0 siblings, 1 reply; 4+ messages in thread
From: Nasir Iqbal Danish @ 2005-06-27 06:04 UTC (permalink / raw)
To: pgsql-admin
I am using postgres 8.0.3, and wanted to use Point In Time Recovery enable.
could any one tell me about how to indentify the current WAL file, also
let me know if there is any fix patteren for WAL log file generations.
documentaion says it will generate ever increasing number starting from
some thing like "0000000100000000000000000". but I have observed
different behaviour. I would also want to know, how does it archive
files. for example we have log file 000002, now when archiving will
it start new file as 000003 or will it archive 000002 as
000003 and lastest will be same as 000002.
- Nasir
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: wal logs in pg_xlog
2005-06-27 06:04 wal logs in pg_xlog Nasir Iqbal Danish <nasir@amaana.com>
@ 2005-06-27 14:56 ` Michael Fuhr <mike@fuhr.org>
2005-06-28 12:52 ` Re: wal logs in pg_xlog Nasir Iqbal Danish <nasir@amaana.com>
0 siblings, 1 reply; 4+ messages in thread
From: Michael Fuhr @ 2005-06-27 14:56 UTC (permalink / raw)
To: Nasir Iqbal Danish <nasir@amaana.com>; +Cc: pgsql-admin
On Mon, Jun 27, 2005 at 11:04:50AM +0500, Nasir Iqbal Danish wrote:
>
> I am using postgres 8.0.3, and wanted to use Point In Time Recovery enable.
> could any one tell me about how to indentify the current WAL file, also
> let me know if there is any fix patteren for WAL log file generations.
> documentaion says it will generate ever increasing number starting from
> some thing like "0000000100000000000000000". but I have observed
> different behaviour.
What behavior have you observed?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: wal logs in pg_xlog
2005-06-27 06:04 wal logs in pg_xlog Nasir Iqbal Danish <nasir@amaana.com>
2005-06-27 14:56 ` Re: wal logs in pg_xlog Michael Fuhr <mike@fuhr.org>
@ 2005-06-28 12:52 ` Nasir Iqbal Danish <nasir@amaana.com>
2005-06-29 15:08 ` Re: wal logs in pg_xlog Jeff Frost <jeff@frostconsultingllc.com>
0 siblings, 1 reply; 4+ messages in thread
From: Nasir Iqbal Danish @ 2005-06-28 12:52 UTC (permalink / raw)
To: Michael Fuhr <mike@fuhr.org>; +Cc: pgsql-admin
Michael Fuhr wrote:
>On Mon, Jun 27, 2005 at 11:04:50AM +0500, Nasir Iqbal Danish wrote:
>
>
>>I am using postgres 8.0.3, and wanted to use Point In Time Recovery enable.
>>could any one tell me about how to indentify the current WAL file, also
>>let me know if there is any fix patteren for WAL log file generations.
>>documentaion says it will generate ever increasing number starting from
>>some thing like "0000000100000000000000000". but I have observed
>>different behaviour.
>>
>>
>
>What behavior have you observed?
>
>
>
the files in pg_xlog like 000010000000000005, 000010000000000006,
000010000000000007, 000010000000000008, (in short term call these 5,6,7,8).
with file 8 being most recent and 5 being 2 months back, with respect to
time stamp. after I did some work and then observed log files, now 5 and
6 were showing me latest time stamps. I was confused which is the latest
one.
I also want to know when new WAL segment files is created, is it 16MB or
this will start from 0 bytes and size inceases as soon as db server will
manupulate.
Please provide me if u can some script to identify which one is latest
file so that I can copy this to some other place.
One more question. Is there a way to build or configure the database
server to replicate pg_xlogs ?
-Nasir
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: wal logs in pg_xlog
2005-06-27 06:04 wal logs in pg_xlog Nasir Iqbal Danish <nasir@amaana.com>
2005-06-27 14:56 ` Re: wal logs in pg_xlog Michael Fuhr <mike@fuhr.org>
2005-06-28 12:52 ` Re: wal logs in pg_xlog Nasir Iqbal Danish <nasir@amaana.com>
@ 2005-06-29 15:08 ` Jeff Frost <jeff@frostconsultingllc.com>
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Frost @ 2005-06-29 15:08 UTC (permalink / raw)
To: pgsql-admin
On Tue, 28 Jun 2005, Nasir Iqbal Danish wrote:
> Please provide me if u can some script to identify which one is latest file
> so that I can copy this to some other place.
> One more question. Is there a way to build or configure the database server
> to replicate pg_xlogs ?
I use this fairly simple method:
LASTLOG=`ls -rt /pg_xlog/ | grep -v "backup\|archive" | tail -1`
There might be something more elegant. I also use the following method to get
rid of archived wal files that are older than the oldest base backup I am
keeping:
OLDESTFILE=$PITRBASEDIR/`ls -t $PITRBASEDIR | tail -1`/backup_label
if [ -f $OLDESTFILE ]; then
/usr/bin/find $PITRDESTDIR -type f -not -newer $OLDESTFILE \
-exec rm -f \{\} \;
fi
Your mileage may vary, but it appears to work for me.
--
Jeff Frost, Owner <jeff@frostconsultingllc.com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-06-29 15:08 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-27 06:04 wal logs in pg_xlog Nasir Iqbal Danish <nasir@amaana.com>
2005-06-27 14:56 ` Michael Fuhr <mike@fuhr.org>
2005-06-28 12:52 ` Nasir Iqbal Danish <nasir@amaana.com>
2005-06-29 15:08 ` Jeff Frost <jeff@frostconsultingllc.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox