pg_dump only selected components of ACCESS METHODs
authorStephen Frost <[email protected]>
Tue, 7 Jun 2016 13:56:02 +0000 (09:56 -0400)
committerStephen Frost <[email protected]>
Tue, 7 Jun 2016 13:56:02 +0000 (09:56 -0400)
commit562f06f3f0da92e397a2f05e1b9b5bfbde336fb2
tree42aa19d9c6f555b00d31c3fc4a09078eea8abc1b
parent83590771241fc89a944ba7703f506f4ca50f7e5f
pg_dump only selected components of ACCESS METHODs

dumpAccessMethod() didn't get the memo that we now have a bitfield for
the components which should be dumped instead of a simple boolean.

Correct that by checking if the relevant bit is set for each component
being dumped out (and not dumping it out if it isn't set).

This corrects an issue where CREATE ACCESS METHOD commands were being
included in non-binary-upgrades when an extension included an access
method (as the bloom extensions does).

Also add a regression test to make sure that we only dump out the
ACCESS METHOD commands, when they are part of an extension, when doing
a binary upgrade.

Pointed out by Thom Brown.
src/bin/pg_dump/pg_dump.c
src/test/modules/test_pg_dump/t/001_base.pl
src/test/modules/test_pg_dump/test_pg_dump--1.0.sql