| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com> |
| Cc: | andrew(at)dunslane(dot)net, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Residual cleanups for tied objects in PL/Perl |
| Date: | 2026-08-18 15:17:33 |
| Message-ID: | 1382171.1787066253@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Sabino Mullane | 2026-08-18 15:18:41 | Re: MPTCP - multiplexing many TCP connections through one socket to get better bandwidth |
| Previous Message | Aleksander Alekseev | 2026-08-18 15:10:45 | [PATCH] Several refactorings for pg_dump |