Re: New option for pg_basebackup, to specify a different directory for pg_xlog - Mailing list pgsql-hackers

From Haribabu Kommi
Subject Re: New option for pg_basebackup, to specify a different directory for pg_xlog
Date
Msg-id CAJrrPGdcqvOZWggPQ8m0RgaT2qa3PBiQFRuhD8j-ugEAsWJE9Q@mail.gmail.com
Whole thread Raw
In response to Re: New option for pg_basebackup, to specify a different directory for pg_xlog  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: New option for pg_basebackup, to specify a different directory for pg_xlog  (Fujii Masao <masao.fujii@gmail.com>)
Re: New option for pg_basebackup, to specify a different directory for pg_xlog  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers

On Tue, Jan 28, 2014 at 1:17 PM, Peter Eisentraut wrote:
On 11/30/13, 6:59 AM, Haribabu kommi wrote:
> To detect provided data and xlog directories are same or not, I reused the
> Existing make_absolute_path() code as follows.

I note that initdb does not detect whether the data and xlog directories
are the same.  I think there is no point in addressing this only in
pg_basebackup.  If we want to forbid it, it should be done in initdb
foremost.

 Thanks for pointing it. if the following approach is fine for identifying the identical directories
 then I will do the same for initdb also.
 
I'm not sure it's worth the trouble, but if I were to do it, I'd just
stat() the two directories and compare their inodes.  That seems much
easier and more robust than comparing path strings

stat() is having problems in windows, because of that reason the patch is
written to identify the directories with string comparison.

Regards,
Hari Babu

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: updated emacs configuration
Next
From: Tomas Vondra
Date:
Subject: Re: GIN improvements part2: fast scan