[jira] [Resolved] (HAWQ-1543) PXF port,heap size etc should be configurable through pxf-env

2017-11-03 Thread Shivram Mani (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shivram Mani resolved HAWQ-1543.

   Resolution: Fixed
Fix Version/s: 2.3.0.0-incubating

> PXF port,heap size etc should be configurable through pxf-env
> -
>
> Key: HAWQ-1543
> URL: https://issues.apache.org/jira/browse/HAWQ-1543
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: PXF
>Reporter: Shivram Mani
>Assignee: Shivram Mani
> Fix For: 2.3.0.0-incubating
>
>
> Currently the configs in pxf-env take effect in the pxf service only upon pxf 
> init. This should be consumed upon pxf start as well.
> Also introduce configuration for pxf heapsize



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (HAWQ-1543) PXF port,heap size etc should be configurable through pxf-env

2017-11-03 Thread Shivram Mani (JIRA)

 [ 
https://issues.apache.org/jira/browse/HAWQ-1543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shivram Mani closed HAWQ-1543.
--

> PXF port,heap size etc should be configurable through pxf-env
> -
>
> Key: HAWQ-1543
> URL: https://issues.apache.org/jira/browse/HAWQ-1543
> Project: Apache HAWQ
>  Issue Type: Improvement
>  Components: PXF
>Reporter: Shivram Mani
>Assignee: Shivram Mani
> Fix For: 2.3.0.0-incubating
>
>
> Currently the configs in pxf-env take effect in the pxf service only upon pxf 
> init. This should be consumed upon pxf start as well.
> Also introduce configuration for pxf heapsize



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-hawq pull request #1306: HAWQ-1543. Make pxf configurable upon res...

2017-11-03 Thread shivzone
Github user shivzone closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1306


---


[GitHub] incubator-hawq pull request #1306: HAWQ-1543. Make pxf configurable upon res...

2017-11-03 Thread lavjain
Github user lavjain commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1306#discussion_r148859336
  
--- Diff: pxf/pxf-service/src/scripts/pxf-service ---
@@ -249,6 +206,34 @@ function patchWebapp()
 cat $web_file | \
 sed 
"s:.*pxf-log4j.properties<\/param-value>:$PXF_HOME\/conf\/pxf-log4j.properties<\/param-value>:"
 > web.xml.tmp
 mv web.xml.tmp $web_file
+
+# set port
+
catalinaProperties=$instance_root/$instance_name/conf/catalina.properties
+cat $catalinaProperties | \
+sed 
"s|^[[:blank:]]*connector.http.port=.*$|connector.http.port=$instance_port|g" \
+> ${catalinaProperties}.tmp
+
+rm $catalinaProperties
+mv ${catalinaProperties}.tmp $catalinaProperties
--- End diff --

sed -i would be preferred as Alex suggested.


---


[GitHub] incubator-hawq pull request #1306: HAWQ-1543. Make pxf configurable upon res...

2017-11-03 Thread shivzone
Github user shivzone commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1306#discussion_r148838659
  
--- Diff: pxf/pxf-service/src/scripts/pxf-service ---
@@ -216,17 +174,16 @@ function doInit()
determineHadoopDistro
generatePrivateClasspath || return 1
createInstance || return 1
-   configureInstance || return 1
deployWebapp || return 1
createLogsDir || return 1
createRunDir  || return 1
 }
 
 #
-# patchWebapp patches the webapp config files
-# patch applied only if PXF_HOME is defined
+# configureWebapp patches the webapp with pxf and user overriden configs
+# applied only if PXF_HOME is defined
 #
-function patchWebapp()
+function configureWebapp()
--- End diff --

The purpose of patching the war is so that an update done to PXF as part of 
upgrades wouldn't require the user to run pxf init again. They can simply use 
pxf restart.
Can evaluate that change outside of this PR


---


[jira] [Comment Edited] (HAWQ-1530) Illegally killing a JDBC select query causes locking problems

2017-11-03 Thread Grant Krieger (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237223#comment-16237223
 ] 

Grant Krieger edited comment on HAWQ-1530 at 11/3/17 11:50 AM:
---

Hi,

I think any JDBC client from windows will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC from windows only. Do not use psql on linux as this seems to work 
fine

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL (Do not just stop the 
query) before it finishes . (Test and kill from windows only) . You will notice 
query kills but lock on table is never released until reboot of server or kill 
-9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a.*,
  b.description
FROM
  PUBLIC.test_table_fact3 a
  JOIN PUBLIC.test_prod_dim3 b
  ON a.productid = b.productid ) AS q LIMIT 1;
-- end test query 

--Then in a new session try drop the table . Unable to do so as its locked and 
unable to free lock until restart of server

drop table public.test_prod_dim3;

select * from pg_stat_activity
where procpid = 335492

1075919 edw_performance3  335492  342   10gpadmin drop table 
public.test_prod_dim3
  true  2017/09/21 10:51:22 AM  2017/09/21 8:58:55 AM   10.1.3.201  61257   
2017/09/21
10:51:22 AM  false

select * from pg_locks
where pid = 335492

relation1075919 1710089 (null)  (null)  (null)  (null)  
(null)
 (null)  109830156   335492  AccessExclusiveLock false 342  
false -1
transactionid (null)  (null)  (null)  (null)  109830156   
(null) 
(null)  (null)  109830156   335492  ExclusiveLock true  342 
 false -1
relation1075919 1259  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 2608  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 1247  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1

Thank you



was (Author: ncsballie):
Hi,

I think any JDBC client will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL (Do not just stop the 
query) before it finishes . (Test and kill from windows only) . You will notice 
query kills but lock on table is never released until reboot of server or kill 
-9
  
-- test query (This should be killed before completion)
SELECT
   

[jira] [Comment Edited] (HAWQ-1530) Illegally killing a JDBC select query causes locking problems

2017-11-03 Thread Grant Krieger (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237223#comment-16237223
 ] 

Grant Krieger edited comment on HAWQ-1530 at 11/3/17 7:51 AM:
--

Hi,

I think any JDBC client will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL (Do not just stop the 
query) before it finishes . (Test and kill from windows only) . You will notice 
query kills but lock on table is never released until reboot of server or kill 
-9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a.*,
  b.description
FROM
  PUBLIC.test_table_fact3 a
  JOIN PUBLIC.test_prod_dim3 b
  ON a.productid = b.productid ) AS q LIMIT 1;
-- end test query 

--Then in a new session try drop the table . Unable to do so as its locked and 
unable to free lock until restart of server

drop table public.test_prod_dim3;

select * from pg_stat_activity
where procpid = 335492

1075919 edw_performance3  335492  342   10gpadmin drop table 
public.test_prod_dim3
  true  2017/09/21 10:51:22 AM  2017/09/21 8:58:55 AM   10.1.3.201  61257   
2017/09/21
10:51:22 AM  false

select * from pg_locks
where pid = 335492

relation1075919 1710089 (null)  (null)  (null)  (null)  
(null)
 (null)  109830156   335492  AccessExclusiveLock false 342  
false -1
transactionid (null)  (null)  (null)  (null)  109830156   
(null) 
(null)  (null)  109830156   335492  ExclusiveLock true  342 
 false -1
relation1075919 1259  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 2608  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 1247  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1

Thank you



was (Author: ncsballie):
Hi,

I think any JDBC client will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL (Do not just stop the 
query) before it finishes . (Test and kill from windows only) . You will notice 
query kills but lock on table is never released until reboot of server or kill 
-9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT

[jira] [Comment Edited] (HAWQ-1530) Illegally killing a JDBC select query causes locking problems

2017-11-03 Thread Grant Krieger (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237223#comment-16237223
 ] 

Grant Krieger edited comment on HAWQ-1530 at 11/3/17 7:50 AM:
--

Hi,

I think any JDBC client will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL (Do not just stop the 
query) before it finishes . (Test and kill from windows only) . You will notice 
query kills but lock on table is never released until reboot of server or kill 
-9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a.*,
  b.description
FROM
  PUBLIC.test_table_fact3 a
  JOIN PUBLIC.test_prod_dim3 b
  ON a.productid = b.productid ) AS q LIMIT 1;
-- end test query 

--Then in a new session try drop the table . Unable to do so as its locked and 
unable to free lock until restart of server

drop table public.test_prod_dim3;

select * from pg_stat_activity
where procpid = 335492

1075919 edw_performance3  335492  342   10gpadmin drop table 
public.test_prod_dim3
  true  2017/09/21 10:51:22 AM  2017/09/21 8:58:55 AM   10.1.3.201  61257   
2017/09/21
10:51:22 AM  false

select * from pg_locks
where pid = 335492

relation1075919 1710089 (null)  (null)  (null)  (null)  
(null)
 (null)  109830156   335492  AccessExclusiveLock false 342  
false -1
transactionid (null)  (null)  (null)  (null)  109830156   
(null) 
(null)  (null)  109830156   335492  ExclusiveLock true  342 
 false -1
relation1075919 1259  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 2608  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 1247  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1



was (Author: ncsballie):
Hi,

I think any JDBC client will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL (Do not just stop the 
query) before it finishes . (Test and kill from windows only) . You will notice 
query kills but lock on table is never released until reboot of server or kill 
-9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a

[jira] [Comment Edited] (HAWQ-1530) Illegally killing a JDBC select query causes locking problems

2017-11-03 Thread Grant Krieger (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237223#comment-16237223
 ] 

Grant Krieger edited comment on HAWQ-1530 at 11/3/17 7:47 AM:
--

Hi,

I think any JDBC client will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL (Do not just stop the 
query) before it finishes . (Test and kill from windows only) . You will notice 
query kills but lock on table is never released until reboot of server or kill 
-9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a.*,
  b.description
FROM
  PUBLIC.test_table_fact3 a
  JOIN PUBLIC.test_prod_dim3 b
  ON a.productid = b.productid ) AS q LIMIT 1;
-- end test query 

--Then in a new session

drop table public.test_prod_dim3;

select * from pg_stat_activity
where procpid = 335492

1075919 edw_performance3  335492  342   10gpadmin drop table 
public.test_prod_dim3
  true  2017/09/21 10:51:22 AM  2017/09/21 8:58:55 AM   10.1.3.201  61257   
2017/09/21
10:51:22 AM  false

select * from pg_locks
where pid = 335492

relation1075919 1710089 (null)  (null)  (null)  (null)  
(null)
 (null)  109830156   335492  AccessExclusiveLock false 342  
false -1
transactionid (null)  (null)  (null)  (null)  109830156   
(null) 
(null)  (null)  109830156   335492  ExclusiveLock true  342 
 false -1
relation1075919 1259  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 2608  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 1247  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1



was (Author: ncsballie):
Hi,

I think any JDBC client will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL before it finishes . 
(Test and kill from windows only) . You will notice query kills but lock on 
table is never released until reboot of server or kill -9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a.*,
  b.description
FROM
  PUBLIC.test_table_fact3 a
  JOIN PUBLIC.tes

[jira] [Comment Edited] (HAWQ-1530) Illegally killing a JDBC select query causes locking problems

2017-11-03 Thread Grant Krieger (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237223#comment-16237223
 ] 

Grant Krieger edited comment on HAWQ-1530 at 11/3/17 7:46 AM:
--

Hi,

I think any JDBC client will do. Aqua should not be a must

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL before it finishes . 
(Test and kill from windows only) . You will notice query kills but lock on 
table is never released until reboot of server or kill -9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a.*,
  b.description
FROM
  PUBLIC.test_table_fact3 a
  JOIN PUBLIC.test_prod_dim3 b
  ON a.productid = b.productid ) AS q LIMIT 1;
-- end test query 

--Then in a new session

drop table public.test_prod_dim3;

select * from pg_stat_activity
where procpid = 335492

1075919 edw_performance3  335492  342   10gpadmin drop table 
public.test_prod_dim3
  true  2017/09/21 10:51:22 AM  2017/09/21 8:58:55 AM   10.1.3.201  61257   
2017/09/21
10:51:22 AM  false

select * from pg_locks
where pid = 335492

relation1075919 1710089 (null)  (null)  (null)  (null)  
(null)
 (null)  109830156   335492  AccessExclusiveLock false 342  
false -1
transactionid (null)  (null)  (null)  (null)  109830156   
(null) 
(null)  (null)  109830156   335492  ExclusiveLock true  342 
 false -1
relation1075919 1259  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 2608  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 1247  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1



was (Author: ncsballie):
Hi,

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL before it finishes . 
(Test and kill from windows only) . You will notice query kills but lock on 
table is never released until reboot of server or kill -9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a.*,
  b.description
FROM
  PUBLIC.test_table_fact3 a
  JOIN PUBLIC.test_prod_dim3 b
  ON a.productid = b.productid ) AS q LIMIT 1;
-- end te

[jira] [Commented] (HAWQ-1530) Illegally killing a JDBC select query causes locking problems

2017-11-03 Thread Grant Krieger (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237223#comment-16237223
 ] 

Grant Krieger commented on HAWQ-1530:
-

Hi,

Below is a test script which loads data then a test query. Please do this 
through JDBC only. Do not use psql. Problem is from JDBC only.

--- loading dummy data

DROP
  TABLE if EXISTS PUBLIC.test_prod_dim3;
CREATE
  TABLE PUBLIC.test_prod_dim3
  (
productid int4 NULL,
description text NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_prod_dim3
SELECT
  1   AS productid,
  '1 desc' AS description
FROM
  generate_series(1,1);
DROP
  TABLE if EXISTS PUBLIC.test_table_fact3;
CREATE
  TABLE PUBLIC.test_table_fact3
  (
productid int4 NULL,
value1 int4 NULL
  )
  WITH
  (
APPENDONLY = TRUE,
COMPRESSTYPE = SNAPPY,
OIDS = FALSE
  )
  DISTRIBUTED RANDOMLY;
INSERT
INTO
  PUBLIC.test_table_fact3
SELECT
  1 AS productid,
  1 AS value1
FROM
  generate_series(1,1);
  --End loading dummy data


  --Starting test query and kill it with CTRL ALT DEL before it finishes . 
(Test and kill from windows only) . You will notice query kills but lock on 
table is never released until reboot of server or kill -9
  
-- test query (This should be killed before completion)
SELECT
  *
FROM
  ( SELECT
  a.*,
  b.description
FROM
  PUBLIC.test_table_fact3 a
  JOIN PUBLIC.test_prod_dim3 b
  ON a.productid = b.productid ) AS q LIMIT 1;
-- end test query 

--Then in a new session

drop table public.test_prod_dim3;

select * from pg_stat_activity
where procpid = 335492

1075919 edw_performance3  335492  342   10gpadmin drop table 
public.test_prod_dim3
  true  2017/09/21 10:51:22 AM  2017/09/21 8:58:55 AM   10.1.3.201  61257   
2017/09/21
10:51:22 AM  false

select * from pg_locks
where pid = 335492

relation1075919 1710089 (null)  (null)  (null)  (null)  
(null)
 (null)  109830156   335492  AccessExclusiveLock false 342  
false -1
transactionid (null)  (null)  (null)  (null)  109830156   
(null) 
(null)  (null)  109830156   335492  ExclusiveLock true  342 
 false -1
relation1075919 1259  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 2608  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1
relation1075919 1247  (null)  (null)  (null)  (null)  
(null) 
(null)  109830156   335492  RowExclusiveLock  true  342   false -1


> Illegally killing a JDBC select query causes locking problems
> -
>
> Key: HAWQ-1530
> URL: https://issues.apache.org/jira/browse/HAWQ-1530
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Transaction
>Reporter: Grant Krieger
>Assignee: Radar Lei
>Priority: Major
>
> Hi,
> When you perform a long running select statement on 2 hawq tables (join) from 
> JDBC and illegally kill the JDBC client (CTRL ALT DEL) before completion of 
> the query the 2 tables remained locked even when the query completes on the 
> server. 
> The lock is visible via PG_locks. One cannot kill the query via SELECT 
> pg_terminate_backend(393937). The only way to get rid of it is to kill -9 
> from linux or restart hawq but this can kill other things as well.
> The JDBC client I am using is Aqua Data Studio.
> I can provide exact steps to reproduce if required
> Thank you
> Grant 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HAWQ-1530) Illegally killing a JDBC select query causes locking problems

2017-11-03 Thread Lin Wen (JIRA)

[ 
https://issues.apache.org/jira/browse/HAWQ-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237193#comment-16237193
 ] 

Lin Wen commented on HAWQ-1530:
---

Hi, 
Do you have a detailed reproduce for this bug?
I want to reproduce it in my environment, is it a must to install Aqua Data 
Studio?
Can we open multiple psql sessions and run some queries, etc, to reproduce it?

Thanks!

> Illegally killing a JDBC select query causes locking problems
> -
>
> Key: HAWQ-1530
> URL: https://issues.apache.org/jira/browse/HAWQ-1530
> Project: Apache HAWQ
>  Issue Type: Bug
>  Components: Transaction
>Reporter: Grant Krieger
>Assignee: Radar Lei
>Priority: Major
>
> Hi,
> When you perform a long running select statement on 2 hawq tables (join) from 
> JDBC and illegally kill the JDBC client (CTRL ALT DEL) before completion of 
> the query the 2 tables remained locked even when the query completes on the 
> server. 
> The lock is visible via PG_locks. One cannot kill the query via SELECT 
> pg_terminate_backend(393937). The only way to get rid of it is to kill -9 
> from linux or restart hawq but this can kill other things as well.
> The JDBC client I am using is Aqua Data Studio.
> I can provide exact steps to reproduce if required
> Thank you
> Grant 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)