We had a report of the subject message during testing a while back
and attempted to address the issue.  It can result in a LOG level
message and the accumulation of files in the pg_serial SLRU
subdirectory.  We haven't seen a recurrence, until I hit it during
testing of the just-posted patch for SSI DDL.  I re-read the code
and believe that the attached is the correct fix.
 
-Kevin

*** a/src/backend/storage/lmgr/predicate.c
--- b/src/backend/storage/lmgr/predicate.c
***************
*** 926,943 **** CheckPointPredicate(void)
        else
        {
                /*
!                * The SLRU is no longer needed. Truncate everything.  If we 
try to
!                * leave the head page around to avoid re-zeroing it, we might 
not use
!                * the SLRU again until we're past the wrap-around point, which 
makes
!                * SLRU unhappy.
!                *
!                * While the API asks you to specify truncation by page, it 
silently
!                * ignores the request unless the specified page is in a 
segment past
!                * some allocated portion of the SLRU.  We don't care which 
page in a
!                * later segment we hit, so just add the number of pages per 
segment
!                * to the head page to land us *somewhere* in the next segment.
                 */
!               tailPage = oldSerXidControl->headPage + SLRU_PAGES_PER_SEGMENT;
                oldSerXidControl->headPage = -1;
        }
  
--- 926,935 ----
        else
        {
                /*
!                * The SLRU is no longer needed. Truncate to head before we set 
head
!                * invalid.
                 */
!               tailPage = oldSerXidControl->headPage;
                oldSerXidControl->headPage = -1;
        }
  
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to