• Tom Lane's avatar
    Remove the logId/logSeg fields from pg_control, because they are not needed · 0cb91ccb
    Tom Lane authored
    in normal operation, and we can avoid rewriting pg_control at every log
    segment switch if we don't insist that these values be valid.  Reducing
    the number of pg_control updates is a good idea for both performance and
    reliability.  It does make pg_resetxlog's life a bit harder, but that seems
    a good tradeoff; and anyway the change to pg_resetxlog amounts to automating
    something people formerly needed to do by hand, namely look at the existing
    pg_xlog files to make sure the new WAL start point was past them.
    
    In passing, change the wording of xlog.c's "database system was interrupted"
    messages: describe the pg_control timestamp as "last known up at" rather than
    implying it is the exact time of service interruption.  With this change the
    timestamp will generally be the time of the last checkpoint, which could be
    many minutes before the failure; and we've already seen indications that
    people tend to misinterpret the old wording.
    
    initdb forced due to change in pg_control layout.  Simon Riggs and Tom Lane
    0cb91ccb
pg_control.h 5.43 KB