Re: hot spare / log shipping work on - Mailing list pgsql-hackers

From Gaetano Mendola
Subject Re: hot spare / log shipping work on
Date
Msg-id 411D4578.6040206@bigfoot.com
Whole thread Raw
In response to Re: hot spare / log shipping work on  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> Gaetano Mendola <mendola@bigfoot.com> writes:
> 
>>I'm facing however to the following problems:
> 
> 
>>1) Discovery the actual WAL file
>>    I'm supposing is the last modified file inside the
>>         pg_xlog directory. If this is not the good method
>>         may I know how I can know it ?
> 
> 
> While that theoretically will work, it leaves a bad taste in my mouth.
> I have been thinking of proposing that we add a "pg_current_wal_file()"
> function, or some such name, to return the name of the active WAL file.

Totally agree, this could help during the process.

Actually I detect the current wal file in this way:

ls -t1p $PGXLOGDIR | grep -v / | head 1

that is an almost "empirical" process, in the first phase
I can live with it but for sure a more robust way is a must.


Regards
Gaetano Mendola









pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Calling PL functions with named parameters
Next
From: Oliver Jowett
Date:
Subject: Re: Calling PL functions with named parameters