From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, David Steele <david(at)pgmasters(dot)net>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Subject: | Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction |
Date: | 2020-03-11 19:32:38 |
Message-ID: | 21724.1583955158@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Justin Pryzby <pryzby(at)telsasoft(dot)com> writes:
>>> On Sun, Mar 08, 2020 at 02:37:49PM -0400, Tom Lane wrote:
>>>> I guess we ought to change that function to use returns-a-tuplestore
>>>> protocol instead of thinking it can hold a directory open across calls.
> I patched this one to see what it looks like and to allow /hopefully/ moving
> forward one way or another with the pg_ls_tmpfile() patch set (or at least
> avoid trying to do anything there which is too inconsistent with this fix).
I reviewed this, added some test cases, and pushed it, so that we can see
if the buildfarm finds anything wrong. (I'm not expecting that, because
this should all be pretty portable, but you never know.) Assuming not,
we need to fix the other functions similarly, and then do something about
revising the documentation to warn against this coding style. Do you
want to have a go at that?
> Also, at first glance, these seem to be passing constant "randomAccess=true"
> rather than (bool) (rsinfo->allowedModes&SFRM_Materialize_Random)
Hm. Not a bug, but possibly a performance issue, if the tuplestore
gets big enough for that to matter. (I think it doesn't matter until
we start spilling to temp files.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2020-03-11 19:34:34 | Re: Improve handling of parameter differences in physical replication |
Previous Message | Justin Pryzby | 2020-03-11 18:53:54 | Re: backend type in log_line_prefix? |