• Tom Lane's avatar
    Fix pg_dumpall to restore its ability to dump from ancient servers. · be09ceb2
    Tom Lane authored
    Fix breakage induced by commits d8d3d2a4
    and 463f2625: pg_dumpall has crashed when
    attempting to dump from pre-8.1 servers since then, due to faulty
    construction of the query used for dumping roles from older servers.
    The query was erroneous as of the earlier commit, but it wasn't exposed
    unless you tried to use --binary-upgrade, which you presumably wouldn't
    with a pre-8.1 server.  However commit 463f2625 made it fail always.
    
    In HEAD, also fix additional breakage induced in the same query by
    commit 491c029d, which evidently wasn't
    tested against pre-8.1 servers either.
    
    The bug is only latent in 9.1 because 463f2625 hadn't landed yet, but
    it seems best to back-patch all branches containing the faulty query.
    
    Gilles Darold
    be09ceb2
pg_dumpall.c 59 KB