You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "markgomer (via GitHub)" <gi...@apache.org> on 2023/08/23 13:48:01 UTC
[GitHub] [age] markgomer opened a new issue, #1178: drop_graph('graph_name') fails to Delete Graph
markgomer opened a new issue, #1178:
URL: https://github.com/apache/age/issues/1178
**Describe the bug**
`SELECT drop_graph('graph_name')` is not deleting recently created graph.
**How are you accessing AGE (Command line, driver, etc.)?**
- psql interface, command line.
**What is the necessary configuration info needed?**
- Fresh install of PostgreSQL 15 and Apache AGE master, on Debian stable-slim Docker image.
**What is the command that caused the error?**
```pgsql
psql (15.4)
Type "help" for help.
test=# CREATE EXTENSION age;
CREATE EXTENSION
test=# LOAD 'age';
SET search_path TO ag_catalog;
LOAD
SET
test=# SELECT * FROM ag_catalog.ag_graph;
graphid | name | namespace
---------+------+-----------
(0 rows)
```
```
test=# SELECT create_graph('agload');
NOTICE: graph "agload" has been created
create_graph
--------------
(1 row)
test=# SELECT drop_graph('agload');
2023-08-23 10:33:23.574 -03 [28787] ERROR: cannot drop schema agload because other objects depend on it
2023-08-23 10:33:23.574 -03 [28787] DETAIL: table agload._ag_label_vertex depends on schema agload
table agload._ag_label_edge depends on schema agload
2023-08-23 10:33:23.574 -03 [28787] HINT: Use DROP ... CASCADE to drop the dependent objects too.
2023-08-23 10:33:23.574 -03 [28787] STATEMENT: SELECT drop_graph('agload');
ERROR: cannot drop schema agload because other objects depend on it
DETAIL: table agload._ag_label_vertex depends on schema agload
table agload._ag_label_edge depends on schema agload
HINT: Use DROP ... CASCADE to drop the dependent objects too.
test=#
```
**Expected behavior**
After `SELECT drop_graph('graph_name');` the graph should be dropped along with all its vertexes and edges.
**Environment (please complete the following information):**
- AGE Version: 1.3.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] Munmud commented on issue #1178: drop_graph('graph_name') fails to Delete Graph
Posted by "Munmud (via GitHub)" <gi...@apache.org>.
Munmud commented on issue #1178:
URL: https://github.com/apache/age/issues/1178#issuecomment-1713773886
cascade is A boolean that will will delete labels and data that depend on the graph. So, it is recommended to set the cascade option to true, otherwise everything in the graph must be manually dropped with SQL DDL commands.
See references [here](https://age.apache.org/age-manual/master/intro/graphs.html#drop-graph)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] Amr-Shams commented on issue #1178: drop_graph('graph_name') fails to Delete Graph
Posted by "Amr-Shams (via GitHub)" <gi...@apache.org>.
Amr-Shams commented on issue #1178:
URL: https://github.com/apache/age/issues/1178#issuecomment-1690139826
When there are multiple graphs with foreign key relationships between them, deleting the "main" graph with the cascade option set to True could cause errors or data integrity issues in the dependent graphs.
but as you mentioned it would be better if we set it to "true" and pop up a message in case we found a relation or dependency
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] drop_graph('graph_name') fails to Delete Graph [age]
Posted by "markgomer (via GitHub)" <gi...@apache.org>.
markgomer closed issue #1178: drop_graph('graph_name') fails to Delete Graph
URL: https://github.com/apache/age/issues/1178
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] markgomer commented on issue #1178: drop_graph('graph_name') fails to Delete Graph
Posted by "markgomer (via GitHub)" <gi...@apache.org>.
markgomer commented on issue #1178:
URL: https://github.com/apache/age/issues/1178#issuecomment-1690044732
I actually forgot one argument, so I should be calling `SELECT drop_graph('graph_name', true);`, which works.
So now I raise a question: in what cases would setting the `cascade` option to `false` would be useful?
Calling the function with `false`, on any graph I tested, raised the same error.
Should we change the function so it always considers the `cascade` argument as `true`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org