# Unable to preview data from a table in postgresql datasource

**URL:** <https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523>\
**Category:** Uncategorized\
**Created:** [December 5, 2017, 11:55am UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523 "2017-12-05T11:55:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![forestlzj](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/forestlzj/32/320_2.png) [@forestlzj](https://community.dremio.com/u/forestlzj)\
**Post date:** [December 5, 2017, 11:55am UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523/1 "2017-12-05T11:55:15Z")

</div>

Hi all,

I have setup a connection to postgresql9.5, when double clicking a table to view the data it showed below error:

_DATA\_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query. sql SELECT \*_  
\_ FROM “public”.“t1”\_  
\_ OFFSET 0 ROWS\_  
\_ FETCH NEXT 2000 ROWS ONLY plugin dw-psql-216 SqlOperatorImpl JDBC\_SUB\_SCAN Location 0:0:6 SqlOperatorImpl JDBC\_SUB\_SCAN Location 0:0:6 Fragment 0:0 [Error Id: 126067f2-ace6-4e17-bcf2-0cd344dee285 on [LHQ0363.Dev.com:31010](http://LHQ0363.Dev.com:31010)] (org.postgresql.util.PSQLException) ERROR: relation “public.t1” does not exist ：16 org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2476 org.postgresql.core.v3.QueryExecutorImpl.processResults():2189 org.postgresql.core.v3.QueryExecutorImpl.execute():300 org.postgresql.jdbc.PgStatement.executeInternal():428 org.postgresql.jdbc.PgStatement.execute():354 org.postgresql.jdbc.PgStatement.executeWithFlags():301 org.postgresql.jdbc.PgStatement.executeCachedSql():287 org.postgresql.jdbc.PgStatement.executeWithFlags():264 org.postgresql.jdbc.PgStatement.executeQuery():231 org.apache.commons.dbcp.DelegatingStatement.executeQuery():208 org.apache.commons.dbcp.DelegatingStatement.executeQuery():208 com.dremio.exec.store.jdbc.JdbcRecordReader.setup():171 com.dremio.exec.store.CoercionReader.setup():109 com.dremio.sabot.op.scan.ScanOperator$1.run():178 com.dremio.sabot.op.scan.ScanOperator$1.run():174 java.security.AccessController.doPrivileged():-2 javax.security.auth.Subject.doAs():-1 org.apache.hadoop.security.UserGroupInformation.doAs():1807 com.dremio.sabot.op.scan.ScanOperator.setupReaderAsCorrectUser():174 com.dremio.sabot.op.scan.ScanOperator.setupReader():166 com.dremio.sabot.op.scan.ScanOperator.setup():147 com.dremio.sabot.driver.SmartOp$SmartProducer.setup():552 com.dremio.sabot.driver.Pipe$SetupVisitor.visitProducer():79 com.dremio.sabot.driver.Pipe$SetupVisitor.visitProducer():63 com.dremio.sabot.driver.SmartOp$SmartProducer.accept():522 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.Pipeline.setup():58 com.dremio.sabot.exec.fragment.FragmentExecutor.setupExecution():331 com.dremio.sabot.exec.fragment.FragmentExecutor.run():227 com.dremio.sabot.exec.fragment.FragmentExecutor.access$800():83 com.dremio.sabot.exec.fragment.FragmentExecutor$AsyncTaskImpl.run():577 com.dremio.sabot.task.AsyncTaskWrapper.run():92 com.dremio.sabot.task.slicing.Slici\_ngThread.run():71

Any ideas?

---

<div class="post-metadata">

**Author:** ![forestlzj](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/forestlzj/32/320_2.png) [@forestlzj](https://community.dremio.com/u/forestlzj)\
**Post date:** [December 5, 2017, 3:30pm UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523/2 "2017-12-05T15:30:52Z")

</div>

it works on the first time querying the table data. but shows above error afterwards…

---

<div class="post-metadata">

**Author:** ![forestlzj](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/forestlzj/32/320_2.png) [@forestlzj](https://community.dremio.com/u/forestlzj)\
**Post date:** [December 5, 2017, 3:41pm UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523/3 "2017-12-05T15:41:49Z")

</div>

It showed below error in another dremio installed on an hdp edgenode, the proflie running dremio is confirmed to having permission to create file like /opt/dremio-community-1.3/data/pdfs/results/.25xx, no idea why mkdirs failed

_SYSTEM ERROR: IOException: Mkdirs failed to create /opt/dremio-community-1.3/data/pdfs/results/.25d94308-f932-ddb1-6517-76f7038cd100-1512488182289_

_SqlOperatorImpl ARROW\_WRITER_  
_Location 0:0:3_  
_SqlOperatorImpl ARROW\_WRITER_  
_Location 0:0:3_  
_Fragment 0:0_

_[Error Id: 7da77050-757b-46ef-ba7f-c01a2ba7505c on [dn1-dev1-tbdp.dev.com](http://dn1-dev1-tbdp.dev.com):-1]_

\_ (java.io.IOException) Mkdirs failed to create /opt/dremio-community-1.3/data/pdfs/results/.25d94308-f932-ddb1-6517-76f7038cd100-1512488182289\_  
\_ org.apache.hadoop.fs.RawLocalFileSystem.create():305\_  
\_ org.apache.hadoop.fs.RawLocalFileSystem.create():339\_  
\_ com.dremio.exec.store.dfs.PseudoDistributedFileSystem.create():372\_

---

<div class="post-metadata">

**Author:** ![forestlzj](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/forestlzj/32/320_2.png) [@forestlzj](https://community.dremio.com/u/forestlzj)\
**Post date:** [December 5, 2017, 4:05pm UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523/4 "2017-12-05T16:05:51Z")

</div>

it was caused by the installation paths are not aligned in two executors. fixed after move them to same paths in different server.

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [December 5, 2017, 5:54pm UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523/5 "2017-12-05T17:54:40Z")

</div>

Thanks for the update @forestlzj and glad it worked

Kindly let us know if you have any further questions

Thanks,  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![aalamir3](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@aalamir3](https://community.dremio.com/u/aalamir3)\
**Post date:** [March 12, 2019, 10:46am UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523/6 "2019-03-12T10:46:06Z")

</div>

having the same issue on one of our environments. suddenly all queries fail to plan or execute with the same error. I can’t see why since it has full access to said filesystem.

SYSTEM ERROR: IOException: Mkdirs failed to create /var/lib/dremio/share\_stage/results/23787313-b355-82ec-916a-13775240b400 (exists=false, cwd=file:///) SqlOperatorImpl ARROW\_WRITER Location 1:6:1 SqlOperatorImpl ARROW\_WRITER Location 1:6:1 Fragment 1:6 [Error Id: c91cf759-b057-4011-b856-98be91c80324 on 10.244.22.246:-1] (java.io.IOException) Mkdirs failed to create /var/lib/dremio/share\_stage/results/23787313-b355-82ec-916a-13775240b400 (exists=false, cwd=file:///) org.apache.hadoop.fs.ChecksumFileSystem.create():449 org.apache.hadoop.fs.ChecksumFileSystem.create():435 org.apache.hadoop.fs.FileSystem.create():945 org.apache.hadoop.fs.FileSystem.create():926 org.apache.hadoop.fs.FileSystem.create():823 org.apache.hadoop.fs.FileSystem.create():812 com.dremio.exec.store.dfs.FileSystemWrapper.create():208 com.dremio.exec.store.easy.arrow.ArrowRecordWriter.setup():98 com.dremio.sabot.op.writer.WriterOperator.setup():104 com.dremio.sabot.driver.SmartOp$SmartSingleInput.setup():252 com.dremio.sabot.driver.Pipe$SetupVisitor.visitSingleInput():73 com.dremio.sabot.driver.Pipe$SetupVisitor.visitSingleInput():63 com.dremio.sabot.driver.SmartOp$SmartSingleInput.accept():197 com.dremio.sabot.driver.StraightPipe.setup():103 com.dremio.sabot.driver.StraightPipe.setup():102 com.dremio.sabot.driver.Pipeline.setup():58 com.dremio.sabot.exec.fragment.FragmentExecutor.setupExecution():353 com.dremio.sabot.exec.fragment.FragmentExecutor.run():243 com.dremio.sabot.exec.fragment.FragmentExecutor.access$800():91 com.dremio.sabot.exec.fragment.FragmentExecutor$AsyncTaskImpl.run():600

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [March 12, 2019, 2:46pm UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523/7 "2019-03-12T14:46:31Z")

</div>

@aalamir3, what are the permissions on `/var/lib/dremio/share_stage/results`?

---

<div class="post-metadata">

**Author:** ![aalamir3](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@aalamir3](https://community.dremio.com/u/aalamir3)\
**Post date:** [March 15, 2019, 1:15pm UTC](https://community.dremio.com/t/unable-to-preview-data-from-a-table-in-postgresql-datasource/523/8 "2019-03-15T13:15:15Z")

</div>

permissions are set to 775 on the parent volume mount, /var/lib/dremio with group sticky bit

we see similar errors on the local path with spilling errors, unable to create spilling directory. but it can and it does create it… it’s hit and miss
