pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrey Rachitskiy <pl0h0yp1@gmail.com>
Cc: andrew@dunslane.net
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Residual cleanups for tied objects in PL/Perl
Date: Tue, 18 Aug 2026 11:17:33 -0400
Message-ID: <1382171.1787066253@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB8bMivHNm5ySE_krD7KfKsCzA_7FpDppwypf0bz5oeQ+VKz7Q@mail.gmail.com>
References: <569769.1786901901@sss.pgh.pa.us>
	<CAB8bMivzt9CGJWM--i3V5MUSXL2FSK2b1DPiJYow2rd9y6pu9A@mail.gmail.com>
	<579928.1786912017@sss.pgh.pa.us>
	<CAB8bMisdLJVgRt5nvUfU=ivCG6V778x225m93fwKXcq2zFvA-w@mail.gmail.com>
	<CAB8bMisM-qSPw2qVnyjTp862LVAKpfX33_y-H1MBGzjAfwAQcg@mail.gmail.com>
	<CAB8bMivZFmWh9vvkF5HBT+Cy9y=nA2NbGhxQapGPUaZ-mNerSA@mail.gmail.com>
	<756684.1786981296@sss.pgh.pa.us>
	<1132241.1786999322@sss.pgh.pa.us>
	<CAB8bMivTgGQrLzvRTf3q7FdyZQk_onxL9sBbmhpGvMGaGFEDBw@mail.gmail.com>
	<CAB8bMivHNm5ySE_krD7KfKsCzA_7FpDppwypf0bz5oeQ+VKz7Q@mail.gmail.com>

Andrey Rachitskiy <pl0h0yp1@gmail.com> writes:
> Tom, I've put together a SvGETMAGIC version on top of your last patch.
> Thoughts?

I've not read the whole thing, but I noticed

 /*
  * Convert a HE (hash entry) key to a cstr in the current database encoding.
  * The result is palloc'd.
+ *
+ * Uses FREETMPS, so call this before hv_iterval() if both are needed.
  */
 static inline char *
 hek2cstr(HE *he)

and you had a similar comment in your earlier draft.  I think this is
nonsense though.  hek2cstr does the full ENTER; SAVETMPS; FREETMPS;
LEAVE; dance, so unless I totally misunderstand that API, it's
destroying only its own temps not any pre-existing ones.  Also,
if there actually is an ordering dependency there, how is the existing
coding working (where the two callers of hek2cstr do so in randomly
different orders?)  I changed that ordering in my patch only for
cosmetic reasons, not because I expect it to make a difference.

			regards, tom lane






view thread (29+ messages)  latest in thread

Message-ID: <1382171.1787066253@sss.pgh.pa.us>
Permalink:  ../1382171.1787066253@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1382171.1787066253@sss.pgh.pa.us

 · 

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: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pl0h0yp1@gmail.com, andrew@dunslane.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: Residual cleanups for tied objects in PL/Perl
  In-Reply-To: <1382171.1787066253@sss.pgh.pa.us>

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

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