Page 1 of 1

Error using PgDump - PgDAC 3.0

Posted: Wed 26 Oct 2011 13:15
by abraao895
Hi, i am using PgDAC 3.0 with Delphi 7.0 in the PostgreSQL database server 8.2. When i execute the program i receive:

portal "PORTALST63055282" does not exist.

Using the DBMonitor i can see that the PgDump is running the follow command in the BD:

SELECT a.attname, a.atttypid, a.atttypmod, a.attnotnull, COALESCE(art.typname, t.typname) AS basetype, t.typelem FROM pg_attribute a INNER JOIN pg_type t ON a.atttypid = t.oid LEFT JOIN pg_type art ON art.oid = t.typelem WHERE a.attrelid = :oid AND a.attnum > 0 AND not a.attisdropped ORDER BY a.attnum

Please, someone could give me some tips about this issue? If need more information about the problem let me know. Thanks very much!

Posted: Thu 27 Oct 2011 07:09
by AlexP
Hello,

Thank you for the information.
We have reproduced the problem.
We will notify you as soon as we have any results.

Now you can solve this problem be changing the protocol version to pv20:

Code: Select all

uses ..., PgClasses;
...    
PgConnection1.ProtocolVersion := pv20;

Posted: Thu 27 Oct 2011 12:04
by abraao895
Thanks to the answer. I am doing some tests here and any problem i report to you. Abraão

Posted: Thu 27 Oct 2011 12:41
by abraao895
I am receiving the follow message error now:


madExcept version : 3.0l
callstack crc : $12946ea8, $019fda9e, $019fda9e
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 004B3ADA in module 'TesteDevArtPgDump.exe'. Read of address 014B4013.


I am using the follow procedures in the my test program:

Code: Select all

procedure TForm1.btBackupClick(Sender: TObject);
begin
  Memo1.Lines.Clear;
  Conexao.Connected := True;
  executorDUMP.BackupToFile('C:\ + StringReplace(timetostr(now), ':', '', [rfReplaceAll]) + '.dmp');
  Conexao.Connected := False;
end;

procedure TForm1.executorDUMPBackupProgress(Sender: TObject;ObjectName: String; ObjectNum, ObjectCount, Percent: Integer);
begin
  if (Percent=0) then begin
    Memo1.Lines.Append('- Executando backup da tabela: ' + ObjectName);
    Memo1.Repaint;
    quant_tabela.Caption := IntToStr(ObjectNum) + '/' + IntToStr(ObjectCount);
    quant_tabela.Repaint;
  end;
  progresso.Position := Percent;
  Application.ProcessMessages;
end;
I didn't find any error on it. Please, give me some tips about this issue. Thanks very much.

Posted: Thu 27 Oct 2011 13:53
by AlexP
Hello,

The code you supplied works OK.
Please provide your settings for PgDump, TPgConnection, if they are different from the default ones or please send a small sample that illustrates the issue to the following address: Alexp*devart*com

Posted: Thu 27 Oct 2011 15:55
by abraao895

Code: Select all

[ TPgConnection Configuration ]

Connected               False
ConnectionTimeout       15
Database                teste
Debug                   True
LoginPrompt             True
Name                    Conexao
Options
       ApplicationName         (empty)
       Charset                 (empty)
       EnableBCD               False
       EnableComposites        True
       EnableFMTBCD            False
       EnableGeometrics        True
       EnablePgTimeStamps      False
       UseUnicode              False
Password                ************
Pooling                 False
PoolingOptions
       ConnectionLifetime    0
       MaxPoolSize           100
       MinPoolSize           0
       Validate              False
Port                    5432
ProtocolVersion         pv20
Schema                  (empty)
Server                  127.0.0.1
SSLOptions
       CACert           (empty)
       Cert             (empty)
       CipherList       (empty)
       Key              (empty)
       Mode             smDisable
Tag                     0
Username                teste

[ TPgDump Configuration ]

Connection              conexao
Debug                   True
Mode                    dmAll
Name                    executorDUMP
ObjectNames             (empty)
ObjectTypes
       doDatabase       False
       doDomains        True
       doIndexes        True
       doLanguages      False
       doSchemas        True
       doSequences      False
       doStoredProcs    False
       doTables         True
       doTriggers       False
       doTypes          False
       doViews          False
Options
       AddDrop               True
       CompleteInsert        False
       CreateConstraints     True
       GenerateHeader        True
       QuoteNames            False
SchemaNames             (empty)
SQL                     (TStrings) -> (empty)
TableNames              (empty)
Tag                     0
I am sending the configuration. Please, see if there is some error on it. If not, let me know. Thanks!

Posted: Mon 31 Oct 2011 12:55
by AlexP
Hello,

We cannot reproduce the problem with your settings as well.
Please send your Delphi project and dump of your database to alexp*devart*com and I'll try to reproduce the problem once more.

Posted: Mon 31 Oct 2011 16:43
by abraao895
Hi, all errors happen when this line is executed:

Code: Select all

SELECT a.attname, a.atttypid, a.atttypmod, a.attnotnull,   COALESCE(art.typname, t.typname) AS basetype, t.typelem FROM pg_attribute a   INNER JOIN pg_type t ON a.atttypid = t.oid   LEFT JOIN pg_type art ON art.oid = t.typelem WHERE a.attrelid = :oid AND a.attnum > 0 AND not a.attisdropped ORDER BY a.attnum
There is a mode of disable this SELECT? What Is the function of this SELECT? Thanks.

Posted: Tue 08 Nov 2011 09:42
by AlexP
Hello,

This query is used to receive field types, parameters, etc., and is called for every database object.
This query will not be executed if the Mode property is set to dmData, but in this case only backup/restore of data is performed (without database objects).

Posted: Tue 22 Nov 2011 19:29
by abraao895
Hi!

I am receiving a error of memory when this sql clause is executed:

Code: Select all

SELECT a.attname, a.atttypid, a.atttypmod, a.attnotnull,   COALESCE(art.typname, t.typname) AS basetype, t.typelem FROM pg_attribute a   INNER JOIN pg_type t ON a.atttypid = t.oid   LEFT JOIN pg_type art ON art.oid = t.typelem WHERE a.attrelid = :oid AND a.attnum > 0 AND not a.attisdropped ORDER BY a.attnum
If i execute this clause in the PgAdmin i have error in this part:

Code: Select all

a.attrelid = :oid
This command is OK or there is some problem inside this? When the backup is performed, is there some restriction about the fields in the table about types, how many or whatever property about this?

Thanks very much!

Posted: Wed 23 Nov 2011 19:57
by abraao895
Hi,

I have a database here with error. I talk with the boss and i can to send it to you? Can you send me your e-mail? It has 30 MB. Is the size a problem? Thanks very much!

Posted: Fri 16 Dec 2011 14:48
by AlexP
Hello,

Unfortunately, our mail server will not accept such a large e-mail. Please upload your file to our ftp (ftp.devart.com) and tell me its name.