[ https://issues.apache.org/jira/browse/HAWQ-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15189082#comment-15189082 ]
ASF GitHub Bot commented on HAWQ-512: ------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/incubator-hawq/pull/431 > Query hang due to deadlock in entrydb catalog access > ---------------------------------------------------- > > Key: HAWQ-512 > URL: https://issues.apache.org/jira/browse/HAWQ-512 > Project: Apache HAWQ > Issue Type: Bug > Components: Catalog > Affects Versions: 2.0.0-beta-incubating > Reporter: zhenglin tao > Assignee: zhenglin tao > Fix For: 2.0.0 > > > When entry database is involved in query with joins, it may hang due to > deadlock while accessing catalog. > {noformat} > DROP TABLE IF EXISTS t; > CREATE TABLE t (key INT, value INT) DISTRIBUTED RANDOMLY; > INSERT INTO t VALUES (1, 0); > CREATE OR REPLACE FUNCTION f() > RETURNS VOID AS $$ > sql = """ALTER TABLE t SET DISTRIBUTED BY (key)""" > plpy.execute(sql) > sql = """INSERT INTO t > SELECT t2.key, t2.value > FROM > (SELECT key, value FROM t WHERE value = 0) AS t1, > (SELECT generate_series(1, 2)::INT AS key, 0::INT AS value ) > AS t2 > WHERE t1.value = t2.value """ > # plan = plpy.prepare(sql) > plpy.execute(sql) > $$ > LANGUAGE plpythonu VOLATILE; > -- Call of function f() hangs here > SELECT f(); > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)