[
https://issues.apache.org/jira/browse/HAWQ-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085158#comment-15085158
]
ASF GitHub Bot commented on HAWQ-322:
-------------------------------------
GitHub user liming01 opened a pull request:
https://github.com/apache/incubator-hawq/pull/249
HAWQ-322. Fixed DROP TABLESPACE doesnot check sub-object(database/relation)
in some cases
We need to check catalog (pg_database/pg_class) instead of related
persistent table, because the persistent table doesn't hold lock until
transaction end, so concurrency problem will occurs in previous implementation.
Here we add code to check catalog.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liming01/incubator-hawq mli/drop_tblspc_chk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-hawq/pull/249.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #249
----
commit 2bbbc335115d120006a36c3fd28ae31468aaa916
Author: Ming LI <[email protected]>
Date: 2016-01-06T07:42:27Z
HAWQ-322. Fixed DROP TABLESPACE doesnot check sub-object(database/relation)
in some cases
----
> Drop tablespace problem: doesn't check database/relations in some cases
> -----------------------------------------------------------------------
>
> Key: HAWQ-322
> URL: https://issues.apache.org/jira/browse/HAWQ-322
> Project: Apache HAWQ
> Issue Type: Bug
> Reporter: Ming LI
> Assignee: Lei Chang
>
> This defect includes 2 test cases with 2 bugs.
> Case 1:
> create tablespace myts filespace dfs_system;
> create DATABASE dbinmyts TABLESPACE myts;
> \c postgres
> drop TABLESPACE myts;
> \c dbinmyts
> create table t1 (i int ) tablespace dfs_default;
> ERROR: lookup failed for tablespace 64127 (tablespace.c:1127)
> Case 2: The last statement doesn't report error.
> postgres=# create filespace fs0 ON hdfs ('localhost:9000/fs0');
> CREATE FILESPACE
> postgres=# create tablespace tsinfs0 filespace fs0;
> CREATE TABLESPACE
> postgres=# create tablespace tsinfs1 filespace fs0;
> CREATE TABLESPACE
> postgres=# create table tableinfs1(i int) tablespace tsinfs1;
> CREATE TABLE
> postgres=# drop tablespace tsinfs1;
> ERROR: tablespace "tsinfs1" is not empty
> postgres=# begin transaction ISOLATION LEVEL SERIALIZABLE;
> BEGIN
> postgres=# create table tableinfs0(i int) tablespace tsinfs0;
> CREATE TABLE
> postgres=# drop tablespace tsinfs0;
> DROP TABLESPACE
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)