|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Nathan Bossart <nathandbossart(at)gmail(dot)com>|
|Cc:||Greg Stark <stark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org|
|Subject:||Re: identifying the backend that owns a temporary schema|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> Thanks for the suggestion. I used it in v4 of the patch.
I reviewed this and made some changes, some cosmetic some less so.
Notably, I was bemused that of the four calls of
pgstat_fetch_stat_local_beentry, three tested for a NULL result even
though they cannot get one, while the fourth (pg_stat_get_backend_idset)
*is* at hazard of a NULL result but lacked a check. I changed
pg_stat_get_backend_idset so that it too cannot get a NULL, and deleted
the dead code from the other callers.
A point that still bothers me a bit about pg_stat_get_backend_idset is
that it could miss or duplicate some backend IDs if the user calls
pg_stat_clear_snapshot() partway through the SRF's run, and we reload
a different set of backend entries than we had before. I added a comment
about that, with an argument why it's not worth working harder, but
is the argument convincing? If not, what should we do?
Also, I realized that the functions we're changing here are mostly
not exercised in the current regression tests :-(. So I added a
small test case.
I think this is probably committable if you agree with my changes.
regards, tom lane
|Next Message||David Rowley||2022-09-28 22:58:17||Re: A potential memory leak on Merge Join when Sort node is not below Materialize node|
|Previous Message||Thomas Munro||2022-09-28 22:53:02||Re: making relfilenodes 56 bits|