TPGDump generate error on Postgresql 10.2

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
LeonardU
Posts: 3
Joined: Tue 11 Dec 2018 07:52

TPGDump generate error on Postgresql 10.2

Post by LeonardU » Tue 11 Dec 2018 07:57

I called the method PGDump.BackupToFile.
When it tries to save the sequences it gives the following error:
"Column increment_by does not exists!"

The postgresql version of the database is 10.2.

I have the last version by this time of this set of components: PgDac 5.3.8.

How should I save correctly the entire database (including sequences), using this component?

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TPGDump generate error on Postgresql 10.2

Post by azyk » Wed 12 Dec 2018 11:27

You can see the sample of using TPgDump in PgDacDemo project, which is located in the folder '\Demos\PgDacDemo' relatively the path where PgDAC demos were installed.

More details about TPgDump in our online documentation: https://www.devart.com/pgdac/docs/pgdump.htm

If the error persists, create a dump of the test database using the standard utility pg_dump. Then use the contact form at our site: https://www.devart.com/company/contactform.html and send this dump.

LeonardU
Posts: 3
Joined: Tue 11 Dec 2018 07:52

Re: TPGDump generate error on Postgresql 10.2

Post by LeonardU » Thu 13 Dec 2018 09:48

Thanks for answering. In the PgDacDemo project, tPgDump is used only for tables (and not for SEQUENCES). So this demo is not helping me at all.

Maybe it's a bug, because sequences are saved correctly in a Postresql 9 database. The error is generated on a Postgresql 10 database.

Until this error is resolved, I'm back at using the classic pg_dump command for saving the entire database.

Best regards,
Leonard

PS: I cannot send the dump in the contact form because it's very large database.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TPGDump generate error on Postgresql 10.2

Post by azyk » Thu 13 Dec 2018 12:59

Please provide us with CREATE table script (PostgreSQL 10.2) to reproduce the 'Column increment_by does not exists!' error using TPgDump.

LeonardU
Posts: 3
Joined: Tue 11 Dec 2018 07:52

Re: TPGDump generate error on Postgresql 10.2

Post by LeonardU » Wed 09 Jan 2019 14:22

Currently i don't have access to the postgresql 10.2 database, but there is no need to send you this script. Just create a sequence in any postgresql 10.2 database, and then try to dump the entire database (including sequences).
Here is an example of a create sequence script:

Code: Select all

CREATE SEQUENCE test_serial;
Thanks.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TPGDump generate error on Postgresql 10.2

Post by azyk » Fri 11 Jan 2019 09:17

In order for TPgDump to back up SEQUENCE in the database, set the doSequences property to True. For example:

Code: Select all

PgDump.ObjectTypes := PgDump.ObjectTypes + [doSequences];
More about TPgDump.ObjectTypes: https://www.devart.com/pgdac/docs/devar ... types.htm

damos
Posts: 13
Joined: Tue 07 Jun 2011 17:04

Re: TPGDump generate error on Postgresql 10.2

Post by damos » Tue 05 Feb 2019 19:09

I have the same error by my database is running on 64bit windows Postgresql version 11
if options sequences is disabled then entire schema seems to finalize work, also the on error event is not working...
i have not test the restore option yet

with this command my backup is working
@echo off
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)
set datestr=%month%_%day%_%year%
echo datestr is %datestr%

set BACKUP_FILE=D:\Lis.backup_%datestr%.backup
echo backup file name is %BACKUP_FILE%
SET PGPASSWORD=*****
echo on
bin\pg_dump -h localhost -p 5432 -U postgres -F c -b -v -f %BACKUP_FILE% postgres

MaximG
Devart Team
Posts: 1357
Joined: Mon 06 Jul 2015 11:34

Re: TPGDump generate error on Postgresql 10.2

Post by MaximG » Tue 12 Feb 2019 18:49

We reproduced the issue and fixed this error. The fix will be included in the next PgDAC build.

Post Reply