gpdb
gpdb copied to clipboard
Backport gp_switch_wal() and gp_stat_archiver to 6X (gp_pitr extension)
-
This commit creates a new version of the gp_pitr extension (version 1.1.)
-
The new version of the extension contains:
gp_stat_arcrhiver view (copied to gp_pitr extension from the original GPDB7 commit: https://github.com/greenplum-db/gpdb/commit/9792ebdedf7ae5830af4c69e8cf75c8084396cac)
GPDB7 commit description: introduce the gp_stat_archiver system view This is a view that will show the output of the system view pg_stat_archiver across all segments and the coordinator. For testing, we exercise the view in the gpdb_pitr test suite.
gp_switch_wal() function (copied to gp_pitr extension from the original GPDB7 commit: https://github.com/greenplum-db/gpdb/commit/7a850e94dedfbbb69f5a84b780d3d0710d8c98e4)
GPDB7 commit description: When calling pg_switch_wal, it will only execute on the coordinator segment. To run pg_switch_wal on the primary segments, we would need to use gp_dist_random or use utility-mode connections. To make things easier for end-users and help with external WAL archiving projects, this commit introduces a new catalog function that switches WAL segment files on all segments by using the GPDB-specific EXECUTE ON [COORDINATOR | ALL SEGMENTS] feature of CREATE FUNCTION (a less hacky way compared to using gp_dist_random for function calls).
@x4m FYI, we're enhancing the gp_pitr
GPDB 6X extension to add some quality-of-life shortcuts that currently exist in GPDB 7devel. We're making sure that it doesn't interfere with old 1.0 installations that current WAL-g GPDB users might already have installed.
In the commit message, need to fix gp_stat_arcrhiver
to gp_stat_archiver
.
@usernamedt JFYI here's some cool new stuff.