1

I'm using pg_dump to backup and recreate a database's structure. To that end I'm calling pg_dump -scf backup.sql for the backup. But it fails with the following error:

pg_dump: [archiver (db)] query failed: ERROR:  Cannot support lock statement yet
pg_dump: [archiver (db)] query was: LOCK TABLE my_schema.my_table IN ACCESS SHARE MODE

I couldn't find reference this particular error anywhere. Is it possible to get around this?

edit: for a little more context, I ran it in verbose mode, and this is what is displayed before the errors:

pg_dump: last built-in OID is 16383
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
Mike S
  • 1,451
  • 1
  • 16
  • 34
  • Doesn't sound like this is a Postgres database; the only search result for this error message is in the [Apache HAWQ source code](https://github.com/apache/incubator-hawq/blob/c21534a8800f1e0ba64868d3423c567efeb6b64c/src/backend/tcop/utility.c#L1677) (and it looks like they don't support `LOCK` yet). – Nick Barnes Jun 27 '18 at 15:36
  • @NickBarnes Here's what `SELECT version();` returns: "PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.3.0.2 build 6675)" – Mike S Jun 27 '18 at 15:45
  • @NickBarnes If the database does not support `LOCK` how could they be there in the database? – Mike S Jun 27 '18 at 15:48
  • Added Greenplum tag, as this is greenplum related. Greenplum is **based** on Postgres. – Kamil Gosciminski Jun 27 '18 at 15:48
  • As a side note: I remember having troubles with Greenplum and posting on greenplum user group on google. You might want to look there as well, it get's answered really fast. – Kamil Gosciminski Jun 27 '18 at 15:53
  • What does `pg_dump --version` say? Sounds like you might be using a standard Postgres version of `pg_dump`. HAWQ appears to have [its own fork](https://github.com/apache/incubator-hawq/tree/master/src/bin/pg_dump). – Nick Barnes Jun 27 '18 at 16:15
  • HAWQ is a fork of Greenplum which is a fork of PostgreSQL. The tag for Greenplum should be removed. – Jon Roberts Jun 27 '18 at 18:10

0 Answers0