逻辑复制的凝胶配置问题
To fix, I inserted my own primary keys as an auto-incrementing integer. 4. Certain views and functions rely on data types of the form reg* that cause the blue/green deployment to fail. To fix this, I dropped these from databases in the blue cluster and recreated them on the green cluster. On my cluster, the following objects that caused issues were: "edgedbsql_v6_2f20b3fed0".pg_type view "edgedbsql_v6_2f20b3fed0"._pg_truetypmod function "edgedbsql_v6_2f20b3fed0"._pg_truetypid function "edgedbsql_v6_2f20b3fed0".pg_type materialized view I used the following query to find the problem columns (this was provided in the RDS logs): WITH RECURSIVE oids AS ( SELECT oid FROM pg_catalog.pg_type t WHERE t.typnamespace = ( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = 'pg_catalog') AND t.typname IN ('regcollation', 'regconfig', 'regdictionary', 'regnamespace', 'regoper', 'regoperator', 'regproc', 'regprocedure') UNION ALL SELECT * FROM (WITH x AS ( SELECT oid FROM oids) SELECT t.oid FROM pg_catalog.pg_type t, x WHERE typbasetype = x.oid AND typtype = 'd' UNION ALL SELECT t.oid FROM pg_catalog.pg_type t, x WHERE typelem = x.oid AND typtype = 'b' UNION ALL SELECT t.oid FROM pg_catalog.pg_type t, pg_catalog.pg_class c, pg_catalog.pg_attribute a, x WHERE t.typtype = 'c' AND t.oid = c.reltype AND c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid = x.oid UNION ALL SELECT t.oid FROM pg_catalog.pg_type t, pg_catalog.pg_range r, x WHERE t.typtype = 'r' AND r.rngtypid = t.oid AND r.rngsubtype = x.oid) foo) SELECT relnamespace, relname, attname, reltype, nspname, nspowner FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n, pg_catalog.pg_attribute a WHERE c.oid = a.attrelid AND NOT a.attisdropped AND a.atttypid IN (SELECT oid FROM oids) AND c.relkind IN ('r', 'm', 't') AND n.oid = c.relowner AND n.nspowner = 'public' ORDER BY 1, 2, 3;
内容来源: geldata/gel