Re: [PATCHES] Patch for disaster recovery

2005-02-21 Thread Simon Riggs
On Sun, 2005-02-20 at 13:08 -0500, Bruce Momjian wrote: > Bruno Wolff III wrote: > > On Sun, Feb 20, 2005 at 09:43:11 -0500, > > Bruce Momjian wrote: > > > > > > We regularly have people on IRC who delete data and then want to recover > > > it. That is (one of) the purpose(s) of PITR. > By

Re: [PATCHES] Patch for disaster recovery

2005-02-21 Thread Richard Huxton
Bruce Momjian wrote: Tom Lane wrote: I think the only real effect of this patch will be to confuse people who are reading the source code. tqual.c is already complicated and fragile enough --- it doesn't need conditionally compiled "features" that we can't even explain the use of. I need a note s

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> Not sure where this leads to, but it's not leading to an undocumented >> one-line hack in tqual.c, and definitely not *that* one-line hack. > Sorry, here is the proper change I just applied: > /* This is to be used only for disaster recovery and require

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Bruce Momjian
Bruno Wolff III wrote: > On Sun, Feb 20, 2005 at 09:43:11 -0500, > Bruce Momjian wrote: > > > > We regularly have people on IRC who delete data and then want to recover > > it. By having the define it makes it easier for us to help them without > > them having to add actual C code. > > > > Do

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> Not sure where this leads to, but it's not leading to an undocumented > >> one-line hack in tqual.c, and definitely not *that* one-line hack. > > > Sorry, here is the proper change I just applied: > > > /* This is to be used only f

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Bruno Wolff III
On Sun, Feb 20, 2005 at 09:43:11 -0500, Bruce Momjian wrote: > > We regularly have people on IRC who delete data and then want to recover > it. By having the define it makes it easier for us to help them without > them having to add actual C code. > > Does that make sense? You aren't going t

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Bruce Momjian
Tom Lane wrote: > Not sure where this leads to, but it's not leading to an undocumented > one-line hack in tqual.c, and definitely not *that* one-line hack. Sorry, here is the proper change I just applied: /* This is to be used only for disaster recovery and requires serious analysis. */ #ifndef

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Bruce Momjian
Tom Lane wrote: > Not sure where this leads to, but it's not leading to an undocumented > one-line hack in tqual.c, and definitely not *that* one-line hack. OK, it turns out the bottom of the function is the right place to fix this. Patch attached and applied. -- Bruce Momjian

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > + /* This is to be used only for disaster recovery and requires serious > > analysis. */ > > + #ifdef MAKE_ALL_TUPLES_VISIBLE > > + return true; > > + #endif > > If this requires serious analysis, why did you install the patch without > any public di

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Bruce Momjian
Tom Lane wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > Hmmm...after seeing Tom's reply, I suppose I should have first > > asked, "Gee, looks simple, but does it work?" Should I even bother > > experimenting with it in a test environment? > > Experiment away, but I have a hard time visuali

Re: [PATCHES] Patch for disaster recovery

2005-02-20 Thread Michael Fuhr
On Sun, Feb 20, 2005 at 02:21:00AM -0500, Tom Lane wrote: > Just brainstorming here, but it seems to me that what might make some > kind of sense is a command to "undelete all tuples in this table". Would it be possible to start a transaction with specific snapshot parameters? Could you "time wa

Re: [PATCHES] Patch for disaster recovery

2005-02-19 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > Hmmm...after seeing Tom's reply, I suppose I should have first > asked, "Gee, looks simple, but does it work?" Should I even bother > experimenting with it in a test environment? Experiment away, but I have a hard time visualizing how you'll find it usef

Re: [PATCHES] Patch for disaster recovery

2005-02-19 Thread Michael Fuhr
On Sat, Feb 19, 2005 at 11:07:55PM -0700, Michael Fuhr wrote: > On Sat, Feb 19, 2005 at 10:56:46PM -0700, Michael Fuhr wrote: > > > > What about making the behavior configurable at run time, say via a > > command-line option? > > Such functionality should be easy to backpatch to earlier versions,

Re: [PATCHES] Patch for disaster recovery

2005-02-19 Thread Michael Fuhr
On Sat, Feb 19, 2005 at 10:56:46PM -0700, Michael Fuhr wrote: > > What about making the behavior configurable at run time, say via a > command-line option? Such functionality should be easy to backpatch to earlier versions, shouldn't it? Pleas for help could then be answered with, "upgrade to th

Re: [PATCHES] Patch for disaster recovery

2005-02-19 Thread Tom Lane
Bruce Momjian writes: > + /* This is to be used only for disaster recovery and requires serious > analysis. */ > + #ifdef MAKE_ALL_TUPLES_VISIBLE > + return true; > + #endif If this requires serious analysis, why did you install the patch without any public discussion? I cannot imagine any

Re: [PATCHES] Patch for disaster recovery

2005-02-19 Thread Michael Fuhr
On Sat, Feb 19, 2005 at 11:56:28PM -0500, Bruce Momjian wrote: > I have added this define to help people recover deleted tuples. > Of course it is only to be used for disaster recovery. Wouldn't the patch as provided require a special build of the postmaster, useful only for disaster recovery? W

[PATCHES] Patch for disaster recovery

2005-02-19 Thread Bruce Momjian
I have added this define to help people recover deleted tuples. Of course it is only to be used for disaster recovery. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts