-1

After starting the Postgres server process for a cluster: bin/pg_ctl -D demo -l logfile start Starting a process for a database 'demo': bin/psql demo

When I try to load AGE extension by

LOAD 'age'; It shows error that access to 'age' is denied. Do I need to change some security/credential information for the user?

I expected the extension to be loaded so that I can execute cypher queries.

6 Answers6

0

Run install check to see if postgresql and Apache AGE have been sucessfully installed without any error using the command in the age folder:

make PG_CONFIG=/home/path/to/age/bin/pg_config installcheck

and if this is the case then you have to create an extension of age and then load as follows:

CREATE EXTENSION age; 
Load 'age';

Now set Search Path and run a simple cypher query:

SET search_path = ag_catalog, "$user", public;
SELECT create_graph('demo_graph');
0

You might need superuser privileges as described here in order to execute the CREATE EXTENSION statement.

Here's a possible relevant issue with a solution in GitHub issues

marodin
  • 41
  • 2
0

Move to the "age" directory:

cd /path/to/age

run this command to configure pg to age

sudo make PG_CONFIG=/home/path/to/postgres/bin/pg_config install

check install

make PG_CONFIG=/home/path/to/postgres/bin/pg_config installcheck

Start the server

bin/pg_ctl -D demo -l logfile start

For every connection of AGE you start, you will need to load the AGE extension.

CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;

To create a graph, use the create_graph function located in the ag_catalog namespace.

SELECT create_graph('graph_name');
0

There could be two potential reasons for this issue. To begin with, it's possible that AGE wasn't installed correctly. You might want to use the following command:

sudo make PG_CONFIG=path/to/postgres/bin/pg_config install

Additionally, make sure you've created the extension before utilizing the LOAD command by running:

CREATE EXTENSION age;
Mohayu Din
  • 433
  • 9
0

Here are some steps, that might help you.

  • Make sure AGE is properly integrated with PostgreSQL compatible version OR connect it using this command: sudo make PG_CONFIG=~/postgresql-11.18/bin/pg_config install

  • Make sure the server is UP properly OR up the server using this command: bin/pg_ctl -D demoDataBase -l logfile start

  • Switch to Postgres using this command: bin/psql demoDataBase

Create and Load extension using the following commands:

  • CREATE EXTENSION age;
  • LOAD 'age';
  • SET search_path = ag_catalog, "$user", public;
0

You need to grant the user the LOAD privilege on the extension. Use the following command:

GRANT LOAD ON age TO username;

replace the username with your actual username

Once the permissions are granted load the extension again and you should be able to load the extension without any errors. If for some reason error appears again there may be a problem with the installation of the extension. Try installing the age extension again.

Hope it helps!