Re: Patch for disaster recovery - Mailing list pgsql-patches

From Tom Lane
Subject Re: Patch for disaster recovery
Date
Msg-id 15262.1108923635@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch for disaster recovery  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Patch for disaster recovery
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> 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 requires serious analysis. */
> #ifndef MAKE_ALL_TUPLES_VISIBLE
>     return false;
> #else
>     return true;
> #endif

AFAICS this has no value whatsoever.  Assuming that someone has a
disaster recovery problem on their hands, how likely is it that they
will know that that code is there, or be able to turn it on (most
users don't compile from source anymore), or be able to use it
effectively, given the complete lack of documentation?  As is, this
is of value only to someone familiar with the code, and such a someone
could go in and modify the logic for themselves just as easily as
turn on a #define.

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.

            regards, tom lane

pgsql-patches by date:

Previous
From: Michael Fuhr
Date:
Subject: Bibliography updates
Next
From: Bruce Momjian
Date:
Subject: Re: Patch for disaster recovery