forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpcrondump should not dump pg_temp schemas
* We noticed that when gpcrondump is given with a -S option (exclude schema) gpcrondump will also try to dump pg_temp schemas. This can be detected by the following issue: user creates a new schema user creates a temp table -- Keep the session alive On another session: Run gpcrondump -S <exclude schema> -x <dbname> * We've filtered out pg_temp in our queries to prevent this issue. Dumping pg_temp schemas doesn't make sense as gpdbrestore can't restore those schemas and tables anyways, since pg_ and gp_ schemas are restricted for the system. Make sure to ignore pg_temp from backup. * We want to make sure that we ignore pg_temp and not error out if we can't find the pg_temp tables during a backup Authors: Marbin Tan, Karen Huddleston, & Chumki Roy
- Loading branch information
Showing
5 changed files
with
65 additions
and
14 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
11 changes: 11 additions & 0 deletions
11
...ppylib/test/behave/mgmt_utils/steps/data/gpcrondump/create_temp_schema_in_transaction.sql
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
\t | ||
create temp table temp_table(i int); | ||
create schema good_schema; | ||
create table good_schema.good_table(i int); | ||
\o gppylib/test/behave/mgmt_utils/steps/data/gpcrondump/pid_leak | ||
select pg_backend_pid(); | ||
begin; | ||
select * from temp_table; | ||
-- we are just picking an arbitrary number that's long enough for gpcrondump to finish | ||
-- we will kill this process once the dump is done. | ||
select pg_sleep(500) |
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