Skip to content

CREATE EXTENSION pg_stat_statements fails when AGE 1.5.0 is in shared_preload_libraries #2180

@nms9403

Description

@nms9403

Hi.

When Apache AGE (version 1.5.0) is included in shared_preload_libraries and its extension is created in a dedicated database (e.g., service_db, creating the ag_catalog schema there), attempting to run CREATE EXTENSION pg_stat_statements; in a different database (e.g., the default postgres database) fails with:
ERROR: 3F000: schema "ag_catalog" does not exist; LOCATION: get_namespace_oid, namespace.c:3098.

This occurs on PostgreSQL 15.12. The pg_stat_statements extension itself has no dependency on ag_catalog. The issue seems to stem from an attempted lookup of ag_catalog within the context of the postgres database, where it doesn't exist.

Environment:

PostgreSQL Version: 15.12
Apache AGE Version: 1.5.0

Suspected Cause:

The globally preloaded AGE library components (due to shared_preload_libraries) appear to interfere with DDL commands in other databases. It's suspected that an AGE global hook or process attempts to reference ag_catalog without correctly checking the current database context, leading to the failure when CREATE EXTENSION pg_stat_statements is executed in a database lacking ag_catalog.

Request:
We request the Apache AGE development team to investigate this potential issue where AGE's presence in shared_preload_libraries might cause interference with standard extension DDL in other databases by incorrectly attempting to access its specific ag_catalog schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions