Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-15 Thread Fujii Masao
On Fri, Sep 11, 2015 at 1:57 PM, Amit Kapila wrote: > On Fri, Sep 11, 2015 at 10:10 AM, Fujii Masao wrote: >> >> So I added the object type, i.e., file in this case, to the errdetail >> messages. Attached is the updated version of the patch. >> >>

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-10 Thread Robert Haas
On Wed, Sep 9, 2015 at 11:49 PM, Amit Kapila wrote: > - errdetail("Could not rename \"%s\" to \"%s\": %m.", > + errdetail("\"%s\" could not be renamed to \"%s\": %m.", > > Is there any reason to change this message? > I think you have changed this message to make it

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-10 Thread Fujii Masao
On Fri, Sep 11, 2015 at 5:43 AM, Robert Haas wrote: > On Thu, Sep 10, 2015 at 3:52 PM, Tom Lane wrote: >> Robert Haas writes: >>> On Wed, Sep 9, 2015 at 11:49 PM, Amit Kapila >>> wrote: -

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-10 Thread Amit Kapila
On Fri, Sep 11, 2015 at 10:10 AM, Fujii Masao wrote: > > So I added the object type, i.e., file in this case, to the errdetail > messages. Attached is the updated version of the patch. > > I also changed other log messages related to tablespace_map > so that they follow the

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-10 Thread Tom Lane
Robert Haas writes: > On Wed, Sep 9, 2015 at 11:49 PM, Amit Kapila wrote: >> - errdetail("Could not rename \"%s\" to \"%s\": %m.", >> + errdetail("\"%s\" could not be renamed to \"%s\": %m.", >> >> Is there any reason to change this message? >> I

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-10 Thread Robert Haas
On Thu, Sep 10, 2015 at 3:52 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Sep 9, 2015 at 11:49 PM, Amit Kapila wrote: >>> - errdetail("Could not rename \"%s\" to \"%s\": %m.", >>> + errdetail("\"%s\" could not be

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-09 Thread Fujii Masao
On Fri, Sep 4, 2015 at 4:48 PM, Amit Kapila wrote: > On Thu, Sep 3, 2015 at 6:07 PM, Fujii Masao wrote: >> >> On Tue, Aug 4, 2015 at 12:15 PM, Amit Kapila >> wrote: >> > On Mon, Aug 3, 2015 at 7:44 PM, Fujii Masao

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-09 Thread Fujii Masao
On Thu, Sep 10, 2015 at 1:08 PM, Amit Kapila wrote: > On Thu, Sep 10, 2015 at 9:29 AM, Fujii Masao wrote: >> >> On Thu, Sep 10, 2015 at 12:49 PM, Amit Kapila >> wrote: >> > On Wed, Sep 9, 2015 at 6:43 PM, Fujii Masao

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-09 Thread Amit Kapila
On Wed, Sep 9, 2015 at 6:43 PM, Fujii Masao wrote: > > On Fri, Sep 4, 2015 at 4:48 PM, Amit Kapila wrote: > > > > You mean to say, just try renaming tablespace_map and don't display any > > message whether that is successful or not-successful? > >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-09 Thread Amit Kapila
On Thu, Sep 10, 2015 at 9:29 AM, Fujii Masao wrote: > > On Thu, Sep 10, 2015 at 12:49 PM, Amit Kapila wrote: > > On Wed, Sep 9, 2015 at 6:43 PM, Fujii Masao wrote: > >> > >> On Fri, Sep 4, 2015 at 4:48 PM, Amit Kapila

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-09 Thread Fujii Masao
On Thu, Sep 10, 2015 at 12:49 PM, Amit Kapila wrote: > On Wed, Sep 9, 2015 at 6:43 PM, Fujii Masao wrote: >> >> On Fri, Sep 4, 2015 at 4:48 PM, Amit Kapila >> wrote: >> > >> > You mean to say, just try renaming

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-04 Thread Amit Kapila
On Thu, Sep 3, 2015 at 6:07 PM, Fujii Masao wrote: > > On Tue, Aug 4, 2015 at 12:15 PM, Amit Kapila wrote: > > On Mon, Aug 3, 2015 at 7:44 PM, Fujii Masao wrote: > >> ISTM that we can > >> see that the online backup mode has

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-03 Thread Fujii Masao
On Tue, Aug 4, 2015 at 12:15 PM, Amit Kapila wrote: > On Mon, Aug 3, 2015 at 7:44 PM, Fujii Masao wrote: >> >> >> Thanks! Pushed. >> > > Thanks to you as well for committing the patch. > >> BTW, while reading the code related to tablespace_map, I

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-09-03 Thread Fujii Masao
On Sat, Aug 8, 2015 at 1:14 PM, Amit Kapila wrote: > On Tue, Aug 4, 2015 at 8:45 AM, Amit Kapila wrote: >> >> On Mon, Aug 3, 2015 at 7:44 PM, Fujii Masao wrote: >> >> > BTW, while reading the code related to

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-08-07 Thread Amit Kapila
On Tue, Aug 4, 2015 at 8:45 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Aug 3, 2015 at 7:44 PM, Fujii Masao masao.fu...@gmail.com wrote: BTW, while reading the code related to tablespace_map, I found that CancelBackup() emits the WARNING message online backup mode was not

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-08-03 Thread Fujii Masao
On Mon, Aug 3, 2015 at 8:55 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jul 16, 2015 at 9:58 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jul 16, 2015 at 9:41 AM, Fujii Masao masao.fu...@gmail.com wrote: Here are some minor comments: +ereport(LOG, +

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-08-03 Thread Amit Kapila
On Mon, Aug 3, 2015 at 7:44 PM, Fujii Masao masao.fu...@gmail.com wrote: Thanks! Pushed. Thanks to you as well for committing the patch. BTW, while reading the code related to tablespace_map, I found that CancelBackup() emits the WARNING message online backup mode was not canceled when

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-08-03 Thread Amit Kapila
On Thu, Jul 16, 2015 at 9:58 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jul 16, 2015 at 9:41 AM, Fujii Masao masao.fu...@gmail.com wrote: Here are some minor comments: +ereport(LOG, +(errmsg(ignoring \%s\ file because no \%s\ file

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-16 Thread Alvaro Herrera
Amit Kapila wrote: This can be tracked either in 9.5 Open Items or for next CF, any opinions? If nobody else has any opinion on this, I will add it to 9.5 Open Items list. I think this belongs in the open items list, yeah. -- Álvaro Herrerahttp://www.2ndQuadrant.com/

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-16 Thread Fujii Masao
On Fri, Jul 3, 2015 at 12:15 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jul 2, 2015 at 7:44 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Amit Kapila wrote: Added the above log messages in attached patch with small change such that in message, file names will be

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-16 Thread Robert Haas
On Thu, Jul 16, 2015 at 9:41 AM, Fujii Masao masao.fu...@gmail.com wrote: Here are some minor comments: +ereport(LOG, +(errmsg(ignoring \%s\ file because no \%s\ file exists, +TABLESPACE_MAP, BACKUP_LABEL_FILE), +

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-16 Thread Alvaro Herrera
Robert Haas wrote: On Thu, Jul 16, 2015 at 9:41 AM, Fujii Masao masao.fu...@gmail.com wrote: Here are some minor comments: +ereport(LOG, +(errmsg(ignoring \%s\ file because no \%s\ file exists, +TABLESPACE_MAP,

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-16 Thread Amit Kapila
On Thu, Jul 16, 2015 at 12:30 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Amit Kapila wrote: This can be tracked either in 9.5 Open Items or for next CF, any opinions? If nobody else has any opinion on this, I will add it to 9.5 Open Items list. I think this belongs in the

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-16 Thread Fujii Masao
On Fri, Jul 17, 2015 at 1:28 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Jul 16, 2015 at 9:41 AM, Fujii Masao masao.fu...@gmail.com wrote: Here are some minor comments: +ereport(LOG, +(errmsg(ignoring \%s\ file because no \%s\ file exists, +

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-16 Thread Robert Haas
On Thu, Jul 16, 2015 at 9:54 PM, Fujii Masao masao.fu...@gmail.com wrote: Isn't this rule confusing the administrators? I'd like to think not, but yeah, it probably is. It is not like it isn't documented. There are even comments in postgresql.conf explaining it. But the fact that we have

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-15 Thread Amit Kapila
On Fri, Jul 3, 2015 at 8:45 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jul 2, 2015 at 7:44 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Can we reduce that to a single one? Maybe the first one could be errdetail or something. I think it is better other way (basically

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-02 Thread Alvaro Herrera
Amit Kapila wrote: On Sat, Jun 27, 2015 at 12:54 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jun 15, 2015 at 2:52 PM, Amit Kapila amit.kapil...@gmail.com wrote: Attached patch provides a fix as per above discussion. I think we should emit some LOG messages here. When we

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-02 Thread Amit Kapila
On Thu, Jul 2, 2015 at 7:44 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Amit Kapila wrote: Added the above log messages in attached patch with small change such that in message, file names will be displayed with quotes as most of other usages of rename (failure) in that file uses

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-07-01 Thread Amit Kapila
On Sat, Jun 27, 2015 at 12:54 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jun 15, 2015 at 2:52 PM, Amit Kapila amit.kapil...@gmail.com wrote: Attached patch provides a fix as per above discussion. I think we should emit some LOG messages here. When we detect the file is there:

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-26 Thread Robert Haas
On Mon, Jun 15, 2015 at 2:52 PM, Amit Kapila amit.kapil...@gmail.com wrote: Attached patch provides a fix as per above discussion. I think we should emit some LOG messages here. When we detect the file is there: LOG: ignoring tablespace_map file because no backup_label file exists If the

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-26 Thread Robert Haas
On Wed, Jun 10, 2015 at 3:34 AM, Amit Kapila amit.kapil...@gmail.com wrote: Okay, I have updated the patch to destroy_tablespace_directories() code as well in the attached patch. I have tried to modify remove_tablespace_symlink(), so that it can be called from destroy_tablespace_directories(),

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-26 Thread Amit Kapila
On Sat, Jun 27, 2015 at 1:32 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jun 10, 2015 at 3:34 AM, Amit Kapila amit.kapil...@gmail.com wrote: Okay, I have updated the patch to destroy_tablespace_directories() code as well in the attached patch. I have tried to modify

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-15 Thread Amit Kapila
On Thu, Jun 11, 2015 at 9:55 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Jun 10, 2015 at 12:09 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 9, 2015 at 3:29 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jun 9, 2015 at 10:56 AM, Fujii Masao

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-10 Thread Amit Kapila
On Tue, Jun 9, 2015 at 8:37 PM, Andrew Dunstan and...@dunslane.net wrote: On 06/08/2015 11:19 PM, Amit Kapila wrote: I think Robert and Alvaro also seems to be inclined towards throwing error for such a case, so let us do that way, but one small point is that don't you think that similar

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-10 Thread Fujii Masao
On Tue, Jun 9, 2015 at 3:29 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jun 9, 2015 at 10:56 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 9, 2015 at 1:04 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jun 9, 2015 at 9:09 AM, Fujii Masao masao.fu...@gmail.com

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-10 Thread Amit Kapila
On Wed, Jun 10, 2015 at 12:09 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 9, 2015 at 3:29 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jun 9, 2015 at 10:56 AM, Fujii Masao masao.fu...@gmail.com wrote: Or what about removing tablespace_map file at the beginning of

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-09 Thread Amit Kapila
On Tue, Jun 9, 2015 at 10:56 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jun 9, 2015 at 1:04 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jun 9, 2015 at 9:09 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, May 12, 2015 at 10:42 PM, Andrew Dunstan and...@dunslane.net

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-09 Thread Andrew Dunstan
On 06/08/2015 11:19 PM, Amit Kapila wrote: On Tue, Jun 9, 2015 at 12:27 AM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 06/08/2015 11:16 AM, Amit Kapila wrote: I have to retry that operation, but for me unlink hasn't deleted the file on

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-08 Thread Fujii Masao
On Tue, Jun 9, 2015 at 1:04 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jun 9, 2015 at 9:09 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, May 12, 2015 at 10:42 PM, Andrew Dunstan and...@dunslane.net wrote: Map basebackup tablespaces using a tablespace_map file Windows

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-08 Thread Amit Kapila
On Tue, Jun 9, 2015 at 12:27 AM, Andrew Dunstan and...@dunslane.net wrote: On 06/08/2015 11:16 AM, Amit Kapila wrote: I have to retry that operation, but for me unlink hasn't deleted the file on Windows, may be I am not doing properly, but in anycase why we want to throw error for such a

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-08 Thread Amit Kapila
On Tue, Jun 9, 2015 at 9:09 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, May 12, 2015 at 10:42 PM, Andrew Dunstan and...@dunslane.net wrote: Map basebackup tablespaces using a tablespace_map file Windows can't reliably restore symbolic links from a tar format, so instead during

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-08 Thread Andrew Dunstan
On 06/08/2015 12:08 AM, Amit Kapila wrote: On Mon, Jun 8, 2015 at 5:52 AM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 06/05/2015 11:08 PM, Amit Kapila wrote: Okay, I think I can understand why you want to be cautious for having a different check for

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-08 Thread Amit Kapila
On Mon, Jun 8, 2015 at 6:39 PM, Andrew Dunstan and...@dunslane.net wrote: On 06/08/2015 12:08 AM, Amit Kapila wrote: How about if it is just a flat file with same name as tablespace link, why we want to give error for that case? I think now it just don't do anything with that file (unlink

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-08 Thread Robert Haas
On Mon, Jun 8, 2015 at 11:16 AM, Amit Kapila amit.kapil...@gmail.com wrote: I have to retry that operation, but for me unlink hasn't deleted the file on Windows, may be I am not doing properly, but in anycase why we want to throw error for such a case, why can't we just ignore and create a

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-07 Thread Amit Kapila
On Mon, Jun 8, 2015 at 5:52 AM, Andrew Dunstan and...@dunslane.net wrote: On 06/05/2015 11:08 PM, Amit Kapila wrote: Okay, I think I can understand why you want to be cautious for having a different check for this path, but in that case there is a chance that recovery might fail

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-07 Thread Andrew Dunstan
On 06/05/2015 11:08 PM, Amit Kapila wrote: On Fri, Jun 5, 2015 at 10:51 AM, Amit Kapila amit.kapil...@gmail.com mailto:amit.kapil...@gmail.com wrote: On Fri, Jun 5, 2015 at 9:57 AM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 06/04/2015 11:35 PM,

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-05 Thread Amit Kapila
On Fri, Jun 5, 2015 at 10:51 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Jun 5, 2015 at 9:57 AM, Andrew Dunstan and...@dunslane.net wrote: On 06/04/2015 11:35 PM, Amit Kapila wrote: Theoretically, I don't see much problem by changing the checks way you have done in patch, but

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-04 Thread Amit Kapila
On Thu, Jun 4, 2015 at 8:43 PM, Andrew Dunstan and...@dunslane.net wrote: On 06/04/2015 12:44 AM, Amit Kapila wrote: Given that the function raises an error on failure, I think it will otherwise be OK as is. Please find an updated patch attached with this mail. No

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-04 Thread Amit Kapila
On Fri, Jun 5, 2015 at 9:57 AM, Andrew Dunstan and...@dunslane.net wrote: On 06/04/2015 11:35 PM, Amit Kapila wrote: Theoretically, I don't see much problem by changing the checks way you have done in patch, but it becomes different than what we have in destroy_tablespace_directories() and

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-04 Thread Andrew Dunstan
On 06/04/2015 09:23 AM, Amit Kapila wrote: Okay, as we both seem to agree that it can be mostly used in tablespace symlinks context, so I have changed the name to remove_tablespace_symlink() and moved the function to tablespace.c. S_ISLINK check is used for non-windows code,

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-04 Thread Amit Kapila
On Fri, Jun 5, 2015 at 7:29 AM, Andrew Dunstan and...@dunslane.net wrote: On 06/04/2015 09:23 AM, Amit Kapila wrote: Okay, as we both seem to agree that it can be mostly used in tablespace symlinks context, so I have changed the name to remove_tablespace_symlink() and moved

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-04 Thread Andrew Dunstan
On 06/04/2015 11:35 PM, Amit Kapila wrote: On Fri, Jun 5, 2015 at 7:29 AM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 06/04/2015 09:23 AM, Amit Kapila wrote: Okay, as we both seem to agree that it can be mostly used in tablespace

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-04 Thread Andrew Dunstan
On 06/04/2015 12:44 AM, Amit Kapila wrote: Given that the function raises an error on failure, I think it will otherwise be OK as is. Please find an updated patch attached with this mail. No attachment. cheers andrew -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-04 Thread Amit Kapila
On Thu, Jun 4, 2015 at 10:14 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jun 4, 2015 at 1:52 AM, Andrew Dunstan and...@dunslane.net wrote: On 06/02/2015 11:55 PM, Amit Kapila wrote: On Tue, Jun 2, 2015 at 10:26 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-03 Thread Andrew Dunstan
On 06/02/2015 11:55 PM, Amit Kapila wrote: On Tue, Jun 2, 2015 at 10:26 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 05/15/2015 02:21 AM, Amit Kapila wrote: Find the patch which gets rid of rmtree usage. I have made it as a separate

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-03 Thread Amit Kapila
On Thu, Jun 4, 2015 at 1:52 AM, Andrew Dunstan and...@dunslane.net wrote: On 06/02/2015 11:55 PM, Amit Kapila wrote: On Tue, Jun 2, 2015 at 10:26 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: Well, it seems to me the new function is being altogether way too

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-02 Thread Amit Kapila
On Tue, Jun 2, 2015 at 10:26 PM, Andrew Dunstan and...@dunslane.net wrote: On 05/15/2015 02:21 AM, Amit Kapila wrote: Find the patch which gets rid of rmtree usage. I have made it as a separate function because the same code is used from create_tablespace_directories() as well. I thought

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-06-02 Thread Andrew Dunstan
On 05/15/2015 02:21 AM, Amit Kapila wrote: On Thu, May 14, 2015 at 10:29 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 05/14/2015 10:52 AM, Robert Haas wrote: On Thu, May 14, 2015 at 12:12 AM, Amit Kapila amit.kapil...@gmail.com

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-05-23 Thread Andrew Dunstan
On 05/23/2015 01:29 AM, Amit Kapila wrote: On Fri, May 15, 2015 at 11:51 AM, Amit Kapila amit.kapil...@gmail.com mailto:amit.kapil...@gmail.com wrote: On Thu, May 14, 2015 at 10:29 PM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 05/14/2015 10:52 AM, Robert

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-05-23 Thread Amit Kapila
On Sat, May 23, 2015 at 9:28 PM, Andrew Dunstan and...@dunslane.net wrote: On 05/23/2015 01:29 AM, Amit Kapila wrote: Find the patch which gets rid of rmtree usage. I have made it as a separate function because the same code is used from create_tablespace_directories() as well. I

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-05-22 Thread Amit Kapila
On Fri, May 15, 2015 at 11:51 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, May 14, 2015 at 10:29 PM, Andrew Dunstan and...@dunslane.net wrote: On 05/14/2015 10:52 AM, Robert Haas wrote: On Thu, May 14, 2015 at 12:12 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu,

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-05-15 Thread Amit Kapila
On Thu, May 14, 2015 at 10:29 PM, Andrew Dunstan and...@dunslane.net wrote: On 05/14/2015 10:52 AM, Robert Haas wrote: On Thu, May 14, 2015 at 12:12 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, May 14, 2015 at 2:10 AM, Andrew Dunstan and...@dunslane.net wrote: How about if we

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-05-14 Thread Robert Haas
On Thu, May 14, 2015 at 12:12 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, May 14, 2015 at 2:10 AM, Andrew Dunstan and...@dunslane.net wrote: How about if we simply abort if we find a non-symlink where we want the symlink to be, and only remove something that is actually a symlink (or

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-05-14 Thread Andrew Dunstan
On 05/14/2015 10:52 AM, Robert Haas wrote: On Thu, May 14, 2015 at 12:12 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, May 14, 2015 at 2:10 AM, Andrew Dunstan and...@dunslane.net wrote: How about if we simply abort if we find a non-symlink where we want the symlink to be, and only

Re: [HACKERS] Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

2015-05-14 Thread Robert Haas
On Thu, May 14, 2015 at 12:59 PM, Andrew Dunstan and...@dunslane.net wrote: I'm not sure I understand this issue in detail, but why would using rmtree() on something you expect to be a symlink ever be a good idea? It seems like if things are the way you expect them to be, it has no benefit,