From: | sym39 <marechal(dot)sylvain2(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | BDR: DDL lock problem with function inside a schema |
Date: | 2015-06-08 20:43:58 |
Message-ID: | 5575FE8E.6020303@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello All,
I am doing some tests with BDR to study the ability of replacing
bucardo with BDR.
I experience some DDL locks problem when a function is in a schema, and
I try to remove the whole schema.
Node 1:
-----------
mydb=# CREATE SCHEMA IF NOT EXISTS test;
mydb=# CREATE OR REPLACE FUNCTION test.nothing() RETURNS void AS $$
BEGIN END; $$ LANGUAGE plpgsql;
CREATE FUNCTION
mydb=# drop schema test cascade ;
NOTICE: drop cascades to function test.nothing()
DROP SCHEMA
mydb=# \dn
List of schemas
Name | Owner
--------+----------
bdr | postgres
public | postgres
(2 rows)
Then if I switch to node 2
---------------------------------
List of schemas
Name | Owner
--------+----------
bdr | postgres
public | postgres
test | dbadmin
(3 rows)
mydb=# drop schema test cascade ;
ERROR: database is locked against ddl by another node
HINT: Node (6158090345987221693,1,17189) in the cluster is already
performing DDL
After that, I am not able to recover the situation: I tried to restart
postgres on both nodes, but nothing work for me. After that, it is not
possible anymore to do DDL operations:
- this "blocks" on node 1 (I do CTRL C to cancel the query in psql)
-on node 2, the message above "ERROR: database is locked against ddl by
another node" is displayed.
Additionally, I am not able to detach / reattach the node.
One workaround could be to remove first the function on _both_ nodes,
then to remove the schema, but what makes me not confident is that I
don't know how to recover the situation when such DDL locks operation
appear.
Questions:
---------------
-Is it a known bug? If yes should I report it (and where)?
-How to recover such DDL lock problems operation without recreating the
database? In other words, what is the proper way to cleanly restart both
nodes?
-Is it a well known method to properly detach and attach nodes?
Thanks and Regards,
Sylvain
From | Date | Subject | |
---|---|---|---|
Next Message | Anderson Valadares | 2015-06-08 22:20:39 | Re: Momentary Delay |
Previous Message | Geoff Montee | 2015-06-08 17:40:25 | Re: Joins between foreign tables |