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

From Bruce Momjian
Subject Re: Patch for disaster recovery
Date
Msg-id 200502201458.j1KEwWN09361@candle.pha.pa.us
Whole thread Raw
In response to Re: Patch for disaster recovery  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
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                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/utils/time/tqual.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v
retrieving revision 1.82
diff -c -c -r1.82 tqual.c
*** src/backend/utils/time/tqual.c    20 Feb 2005 04:56:00 -0000    1.82
--- src/backend/utils/time/tqual.c    20 Feb 2005 14:56:33 -0000
***************
*** 776,786 ****
  HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, Snapshot snapshot,
                             Buffer buffer)
  {
- /* This is to be used only for disaster recovery and requires serious analysis. */
- #ifdef MAKE_ALL_TUPLES_VISIBLE
-     return true;
- #endif
-
      if (!(tuple->t_infomask & HEAP_XMIN_COMMITTED))
      {
          if (tuple->t_infomask & HEAP_XMIN_INVALID)
--- 776,781 ----
***************
*** 965,971 ****
--- 960,971 ----
          }
      }

+ /* This is to be used only for disaster recovery and requires serious analysis. */
+ #ifdef MAKE_ALL_TUPLES_VISIBLE
      return false;
+ #else
+     return true;
+ #endif
  }



pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Patch for disaster recovery
Next
From: Bruce Momjian
Date:
Subject: Re: Patch for disaster recovery