• Michael Paquier's avatar
    Tweak behavior of pg_dump --extension with configuration tables · 344487e2
    Michael Paquier authored
    6568cef2, that introduced the option, had an inconsistent behavior when
    it comes to configuration tables set up by pg_extension_config_dump, as
    the data of all configuration tables would included in a dump even for
    extensions not listed by a set of --extension switches.
    
    The contents dumped changed depending on the schema where an extension
    was installed when an extension was not listed.  For example, an
    extension installed under the public schema would have its configuration
    data not dumped even when not listed with --extension, which was
    inconsistent with the case of an extension installed on a non-public
    schema, where the configuration would be dumped.
    
    Per discussion with Noah, we have settled down to the simple rule of
    dumping configuration data of an extension if it is listed in
    --extension (default is unchanged and backward-compatible, to dump
    everything on sight if there are no extensions directly listed).  This
    avoids some weird cases where the dumps depended on a --schema for one.
    
    More tests are added to cover the gap, where we cross-check more
    behaviors depending on --schema when an extension is not listed.
    
    Reported-by: Noah Misch
    Reviewed-by: Noah Misch
    Discussion: https://postgr.es/m/20210404220802.GA728316@rfd.leadboat.com
    344487e2
pg_dump.sgml 60.5 KB