pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] PR #3905: remove old comment about finalize, guard closed flag with a reentrant lock to protect against concurrent close.
6+ messages / 2 participants
[nested] [flat]

* [pgjdbc/pgjdbc] PR #3905: remove old comment about finalize, guard closed flag with a reentrant lock to protect against concurrent close.
@ 2026-01-06 13:35  "davecramer (@davecramer)" <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: davecramer (@davecramer) @ 2026-01-06 13:35 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Fixes #3904 


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3905: remove old comment about finalize, guard closed flag with a reentrant lock to protect against concurrent close.
@ 2026-01-08 09:49  "vlsi (@vlsi)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: vlsi (@vlsi) @ 2026-01-08 09:49 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/largeobject/LargeObject.java)

Having a lock in a single place only does not sound right to me.
If we add a lock, we should probably cover the other methods like `read`, `write`, `truncate` for consistency.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3905: remove old comment about finalize, guard closed flag with a reentrant lock to protect against concurrent close.
@ 2026-01-08 09:49  "vlsi (@vlsi)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: vlsi (@vlsi) @ 2026-01-08 09:49 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/largeobject/LargeObject.java)

WDYT of the following?
```suggestion
      if (closed) {
        return;
      }
      closed = true;
```

It would reduce the nesting level

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3905: remove old comment about finalize, guard closed flag with a reentrant lock to protect against concurrent close.
@ 2026-01-08 10:59  "davecramer (@davecramer)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: davecramer (@davecramer) @ 2026-01-08 10:59 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/largeobject/LargeObject.java)

Strange, we don't check for closed anywhere else in the code... 

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3905: remove old comment about finalize, guard closed flag with a reentrant lock to protect against concurrent close.
@ 2026-01-08 11:27  "vlsi (@vlsi)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: vlsi (@vlsi) @ 2026-01-08 11:27 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/largeobject/LargeObject.java)

Yeah, we could probably check it provided the spec permits

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] PR #3905: remove old comment about finalize, guard closed flag with a reentrant lock to protect against concurrent close.
@ 2026-01-08 11:43  "davecramer (@davecramer)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: davecramer (@davecramer) @ 2026-01-08 11:43 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/largeobject/LargeObject.java)

Done, and added checks for isClosed

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2026-01-08 11:43 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-01-06 13:35 [pgjdbc/pgjdbc] PR #3905: remove old comment about finalize, guard closed flag with a reentrant lock to protect against concurrent close. "davecramer (@davecramer)" <[email protected]>
2026-01-08 09:49 ` "vlsi (@vlsi)" <[email protected]>
2026-01-08 09:49 ` "vlsi (@vlsi)" <[email protected]>
2026-01-08 10:59 ` "davecramer (@davecramer)" <[email protected]>
2026-01-08 11:27 ` "vlsi (@vlsi)" <[email protected]>
2026-01-08 11:43 ` "davecramer (@davecramer)" <[email protected]>

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