You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue on Agensgraph 2.12.0 and is preventing our team from upgrading to the latest release of Agensgraph. We use materialized views to support our most frequently used queries, and these view queries can return vertex types. When I run pg_upgrade --check to prepare for upgrading to AG 2.13/PG 13, I see the following:
Checking for system-defined composite types in user tables fatal
Your installation contains system-defined composite type(s) in user tables.
These type OIDs are not stable across PostgreSQL versions,
so this cluster cannot currently be upgraded. You can
drop the problem columns and restart the upgrade.
A list of the problem columns is in the file:
tables_using_composite.txt
For materialized views that return vertexes, there is a related error when I try to export our view definitions through Postgres. The view definitions can't be exported with a \d+ command or by inspecting pg_catalog.pg_matviews. Some example output is below.
The key that causes the bug in the below example is the lack of an alias for the married edge in the clause OPTIONAL MATCH ("v")-[:"married" {"year": 1990}]->("gen":"Actor"). If I give that an alias, the view definition is visible, but for optimization purposes in our queries we often don't want the properties on the intermediate elements.
gamma=#
-- Create a simple graph
CREATE GRAPH trymeout;
SET graph_path=trymeout;
CREATE VLABEL "Actor";
CREATE ELABEL "married";
-- Some data
CREATE (a:"Actor" {name: 'Tom Cruise'});
MATCH (a:"Actor" {name: 'Tom Cruise'}) CREATE (a)-[:married {"year": 1990}]->(:"Actor" {name: 'Nicole Kidman'});
MATCH (a:"Actor" {name: 'Tom Cruise'}) CREATE (a)-[:married {"year": 2006}]->(:"Actor" {name: 'Katie Holmes'});
-- The problematic view definition
CREATE MATERIALIZED VIEW read_me AS (
SELECT * FROM (
MATCH ("v":"Actor" ONLY)
OPTIONAL MATCH ("v")-[:"married" {"year": 1990}]->("gen":"Actor")
RETURN "v".name AS "v", "gen".name AS gen
)
AS _) WITH DATA;
-- The view exists with data
SELECT * from read_me;
-- The PG metadata exists
SELECT schemaname, matviewname from pg_matviews WHERE matviewname='read_me';
-- But the view definition can't be printed out
SELECT schemaname, matviewname, definition from pg_matviews WHERE matviewname='read_me';
This is an issue on Agensgraph 2.12.0 and is preventing our team from upgrading to the latest release of Agensgraph. We use materialized views to support our most frequently used queries, and these view queries can return vertex types. When I run
pg_upgrade --check
to prepare for upgrading to AG 2.13/PG 13, I see the following:For materialized views that return vertexes, there is a related error when I try to export our view definitions through Postgres. The view definitions can't be exported with a
\d+
command or by inspectingpg_catalog.pg_matviews
. Some example output is below.The key that causes the bug in the below example is the lack of an alias for the
married
edge in the clauseOPTIONAL MATCH ("v")-[:"married" {"year": 1990}]->("gen":"Actor")
. If I give that an alias, the view definition is visible, but for optimization purposes in our queries we often don't want the properties on the intermediate elements.Output:
The text was updated successfully, but these errors were encountered: