Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: exclude PolarDB pg_bitmapindex schema from pg dumps (#19645)

p0ny3ca57134dc95
diff --git a/backend/plugin/parser/pg/system_objects.go b/backend/plugin/parser/pg/system_objects.go
index 4f1c916773..abf802f8cf 100644
--- a/backend/plugin/parser/pg/system_objects.go
+++ b/backend/plugin/parser/pg/system_objects.go
@@ -745,6 +745,7 @@ var (
"information_schema": true,
"pg_catalog": true,
"pg_toast": true,
+ "pg_bitmapindex": true,
"rw_catalog": true,
"timescaledb_information": true,
"timescaledb_experimental": true,
diff --git a/backend/plugin/parser/pg/system_objects_test.go b/backend/plugin/parser/pg/system_objects_test.go
new file mode 100644
index 0000000000..62e0c9be69
--- /dev/null
+++ b/backend/plugin/parser/pg/system_objects_test.go
@@ -0,0 +1,13 @@
+package pg
+
+import (
+ "strings"
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestPolarDBSystemSchema(t *testing.T) {
+ require.True(t, IsSystemSchema("pg_bitmapindex"))
+ require.Contains(t, strings.Split(SystemSchemaWhereClause, ","), "'pg_bitmapindex'")
+}