work with PostgreSQL memleak on server after 3936

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
alexs75
Junior Boarder
Junior Boarder
Posts: 28
Joined: 04.03.2014, 12:37

work with PostgreSQL memleak on server after 3936

Post by alexs75 »

if TransactIsolationLevel:=tiNone;
mem leak on server
in this code:

Code: Select all

procedure TZPostgreSQLConnection.StartTransactionSupport;
..
  if Assigned(FUnpreparableStmts) then begin
    for x := FUnpreparableStmts.Count - 1 downto 0 do begin
      SQL := 'DEALLOCATE "' + {$IFDEF UNICODE}UnicodeStringToASCII7{$ENDIF}(FUnpreparableStmts.Strings[x]) + '";';;
      QueryHandle := GetPlainDriver.ExecuteQuery(FHandle, Pointer(SQL));
      CheckPostgreSQLError(nil, GetPlainDriver, FHandle, lcExecute, SQL,QueryHandle);
      GetPlainDriver.PQclear(QueryHandle);
      DriverManager.LogMessage(lcExecute, ConSettings^.Protocol, SQL);
      FUnpreparableStmts.Delete(x);
    end;
  end;
...
procedure StartTransactionSupport never called - server recourses not deallocated
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1935
Joined: 17.01.2011, 14:17

Re: work with PostgreSQL memleak on server after 3936

Post by marsupilami »

Hello alexs75,

thank you for reporting that. Duh - the problem here is - does PostgreSQL even support tiNone? Or will it silently apply some kind of transaction control of its own? Something like tiReadCommitted with Autocommit on or something similar?
Currently I lean towards raising an exception if somebody cooses tiNone with PostgreSQL because I can't imagine for PostgreSQL to support something like this...

With best regards,

Jan
alexs75
Junior Boarder
Junior Boarder
Posts: 28
Joined: 04.03.2014, 12:37

Re: work with PostgreSQL memleak on server after 3936

Post by alexs75 »

Zeos not true works ReadCommited mode. See http://zeoslib.sourceforge.net/viewtopi ... 041#p77041
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1935
Joined: 17.01.2011, 14:17

Re: work with PostgreSQL memleak on server after 3936

Post by marsupilami »

It does, but I will answer that in the other thread ;)
Post Reply