From 25d1486856fe31698c1a7d9264cea5fcf2f3fa66 Mon Sep 17 00:00:00 2001 From: Georgy Shelkovy Date: Wed, 27 Sep 2023 14:22:38 +0500 Subject: [PATCH] tests --- end_to_end/end_to_end_suite_test.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/end_to_end/end_to_end_suite_test.go b/end_to_end/end_to_end_suite_test.go index d9d45dacd..2c60817e1 100644 --- a/end_to_end/end_to_end_suite_test.go +++ b/end_to_end/end_to_end_suite_test.go @@ -1485,13 +1485,6 @@ var _ = Describe("backup and restore end to end tests", func() { skipIfOldBackupVersionBefore("1.18.0") testhelper.AssertQueryRuns(backupConn, ` - CREATE TABLE et ( - id character varying(13), - flg smallint, - dttm timestamp without time zone, - src character varying(80) - ) WITH (appendonly='true', orientation='row', compresstype=zstd, compresslevel='3') DISTRIBUTED BY (id); - CREATE TABLE pt ( id character varying(13), flg smallint, @@ -1502,17 +1495,14 @@ var _ = Describe("backup and restore end to end tests", func() { ); INSERT INTO pt(id, flg, dttm, src) VALUES (1, 1, now(), 'val'); - INSERT INTO et(id, flg, dttm, src) VALUES (2, 2, now(), 'val'); ANALYZE pt; - ANALYZE et; ANALYZE ROOTPARTITION pt; - - ALTER TABLE pt EXCHANGE PARTITION src_mdm WITH TABLE et; `) timestamp := gpbackup(gpbackupPath, backupHelperPath, "--with-stats", + "--leaf-partition-data", "--backup-dir", backupDir) files, err := path.Glob(path.Join(backupDir, "*-1/backups/*", timestamp, "*statistics.sql")) @@ -1530,7 +1520,7 @@ var _ = Describe("backup and restore end to end tests", func() { assertPGClassStatsRestored(backupConn, restoreConn, publicSchemaTupleCounts) assertPGClassStatsRestored(backupConn, restoreConn, schema2TupleCounts) - statsQuery := fmt.Sprintf(`SELECT count(*) AS string FROM pg_statistic st left join pg_class cl on st.starelid = cl.oid left join pg_namespace nm on cl.relnamespace = nm.oid where cl.relname != 'pt_1_prt_src_mdm' AND %s;`, backup.SchemaFilterClause("nm")) + statsQuery := fmt.Sprintf(`SELECT count(*) AS string FROM pg_statistic st left join pg_class cl on st.starelid = cl.oid left join pg_namespace nm on cl.relnamespace = nm.oid where %s;`, backup.SchemaFilterClause("nm")) backupStatisticCount := dbconn.MustSelectString(backupConn, statsQuery) restoredStatisticsCount := dbconn.MustSelectString(restoreConn, statsQuery)