Skip to content

Allowing non-superuser to access Apache AGE through python driver #839

@CC-Hsu

Description

@CC-Hsu

Hi, Team,

Previously we try to use Apache AGE Python driver to access an AGE database.

But we find that we can not run the driver successfully without a DB user with superuser privilege due to LOAD age; command.

We know that in the prerequisite information one need to test the setup with LOAD age; command in the psql.
https://github.com/apache/age/tree/master/drivers/python#check-age-loaded-on-your-postgresql

And we also see the driver also execute LOAD age; first (I copy the corresponding code snippet below).
https://github.com/apache/age/blob/master/drivers/python/age/age.py#L32

def setUpAge(conn:ext.connection, graphName:str):
    with conn.cursor() as cursor:
        cursor.execute("LOAD 'age';")

Although the LOAD command is superuser-restricted, it may be replaced by setting local_preload_libraries GUC, so that LOAD command can be skipped and allow non-superuser DB roles to use Apache AGE objects.

Is it possible to improve the python driver to also support non-superuser usage in this way?

Best Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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