public inbox for [email protected]  
help / color / mirror / Atom feed
From: Vladimir Sitnikov <[email protected]>
To: [email protected]
To: [email protected]
Subject: [pgjdbc/pgjdbc] c40855: fix: reduce memory overhead of .finalize() methods...
Date: Sun, 19 Feb 2023 03:07:14 -0800
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/[email protected]> (raw)

  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: c40855f14b1601c85222084d949856efbce9bbcc
      https://github.com/pgjdbc/pgjdbc/commit/c40855f14b1601c85222084d949856efbce9bbcc
  Author: Vladimir Sitnikov <[email protected]>
  Date:   2023-02-19 (Sun, 19 Feb 2023)

  Changed paths:
    M pgjdbc/src/main/java/org/postgresql/core/QueryExecutor.java
    M pgjdbc/src/main/java/org/postgresql/core/QueryExecutorBase.java
    A pgjdbc/src/main/java/org/postgresql/core/QueryExecutorCloseAction.java
    M pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java
    M pgjdbc/src/main/java/org/postgresql/core/v3/SimpleParameterList.java
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java
    A pgjdbc/src/main/java/org/postgresql/jdbc/PgConnectionFinalizeAction.java
    M pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java
    A pgjdbc/src/main/java/org/postgresql/util/StreamWrapperFinalizeAction.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc2/CopyTest.java

  Log Message:
  -----------
  fix: reduce memory overhead of .finalize() methods in PgConnection and StreamWrapper (#2817)

Previously, an abandoned PgConnection could retain a significant amount of heap.
Now the bare minimum is moved to a separate class, so the abandoned connections
can be removed from the heap earlier.

This does not remove the use of `.finalize()`, and it only reduces the amount of retained heap memory.

Fixes https://github.com/pgjdbc/pgjdbc/issues/1431
Fixes https://github.com/pgjdbc/pgjdbc/issues/1360







reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] c40855: fix: reduce memory overhead of .finalize() methods...
  In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox