forked from greenplum-db/gpbackup-archive
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible to backup/restore extension configuration tables (#75)
This patch adds support for extension configuration tables to gpbackup. The extension script can specify tables that need to be backuped/restored using the standard function pg_catalog.pg_extension_config_dump. As a result, gpbackup will include the data of the specified tables (but not their definition) in the backup. If the second argument to the pg_catalog.pg_extension_config_dump function is an empty string, then gpbackup will dump the entire contents of the table. A non-empty string in the second argument of the pg_catalog.pg_extension_config_dump function means a WHERE clause that filters out the data to be dumped. GPDB versions earlier than 7 do not support the IGNORE EXTERNAL PARTITIONS option for the COPY ( query ) TO command, so this option is omitted if an additional filter is present. (cherry picked from commit e75a86a)
- Loading branch information
Showing
7 changed files
with
86 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/* src/test/modules/test_extensions/test_ext1--1.0.sql */ | ||
-- complain if script is sourced in psql, rather than via CREATE EXTENSION | ||
\echo Use "CREATE EXTENSION test_ext1" to load this file. \quit | ||
|
||
CREATE TABLE test1 (i int) DISTRIBUTED BY (i); | ||
CREATE TABLE test2 (i int, b bool) DISTRIBUTED BY (i); | ||
SELECT pg_catalog.pg_extension_config_dump('test1', ''); | ||
SELECT pg_catalog.pg_extension_config_dump('test2', 'WHERE b'); |