RE: Fix resource leak in FindConflictTuple() retry path - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Fix resource leak in FindConflictTuple() retry path
Date
Msg-id OS9PR01MB1214939B188DA99C9C35235B5F5B52@OS9PR01MB12149.jpnprd01.prod.outlook.com
Whole thread
In response to Re: Fix resource leak in FindConflictTuple() retry path  (shveta malik <shveta.malik@gmail.com>)
Responses Re: [(known) BUG] DELETE/UPDATE more than one row in partitioned foreign table
List pgsql-hackers
Dear Nisha, Shveta,

> > IMO, ExecClearTuple() can resolve the problem of pinned buffers but it
> > still leaves the other trivial problem behind that we keep allocating
> > slots while one is enough, which when resued will release buffer pin
> > in ExecStorePinnedBufferHeapTuple() -> tts_buffer_heap_store_tuple()
> > implicitly.
>
> +1

Sorry for missing words, my intention was to additionally modify atop a Nisha's fix.
Had no objections for proposed patch.

> > Therefore, this alone might not be a better fix. But if we want to
> > club it with the fix already provided by Nisha, that will help us
> > releasing the pin a little earlier without relying on next
> > table_tuple_lock() on same slot to do that implictly.  That said, I
> > don't see ExecClearTuple() called explicitly in the two similar
> > functions in this file, RelationFindReplTupleByIndex() and
> > RelationFindReplTupleSeq(); both of which reuse a single
> > caller-provided slot across retries and rely purely on the implicit
> > release-on-restore behavior.

Okay, I have not seen that. Then either fixing or retain all is OK for me.

Best regards,
Hayato Kuroda
FUJITSU LIMITED




Attachment

pgsql-hackers by date:

Previous
From: Henri GASC
Date:
Subject: Re: [SQL/PGQ] Native executor for Graph query
Next
From: solai v
Date:
Subject: Re: Introducing find_all_inheritors_ordered()