On Fri, Dec 17, 2010 at 10:27 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Robert Haas <robertmh...@gmail.com> writes: >> I think the attached might be a little tidier. Thoughts? > > I'm not really thrilled at the idea of calling > IsPostmasterChildWalSender for every child whether or not it will have > any impact on the decision. That involves touching shared memory which > can be rather expensive (see previous discussions about shared cache > lines and so forth).
The existing code already does that, unless I'm missing something. We could improve on my proposed patch a bit by doing the is_autovacuum test first and the walsender test second. I'm not sure how to improve on it beyond that. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers