• Tom Lane's avatar
    Drop no-longer-needed buffers during ALTER DATABASE SET TABLESPACE. · 33f80f84
    Tom Lane authored
    The previous coding assumed that we could just let buffers for the
    database's old tablespace age out of the buffer arena naturally.
    The folly of that is exposed by bug #11867 from Marc Munro: the user could
    later move the database back to its original tablespace, after which any
    still-surviving buffers would match lookups again and appear to contain
    valid data.  But they'd be missing any changes applied while the database
    was in the new tablespace.
    
    This has been broken since ALTER SET TABLESPACE was introduced, so
    back-patch to all supported branches.
    33f80f84
dbcommands.c 63.6 KB