Re: Some belated patch review for "Buffers" explain analyze patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some belated patch review for "Buffers" explain analyze patch
Date
Msg-id 24620.1265753028@sss.pgh.pa.us
Whole thread Raw
In response to Some belated patch review for "Buffers" explain analyze patch  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> I already have a patch to do this but it's a bit grotty -- do we want
> to have a generic format string in snprintf in case we need it
> somewhere else other than explain.c?

No.  Custom format specifiers that take arguments will confuse the heck
out of gcc's format-checking warnings.  There is no way that saving
a bit of ugliness is worth that.  Just do format_memory_amount(foo)
and print it with %s.

> Secondly, I think it's printing the total buffer usage for that node
> across the whole query -- not the average per iteration. I agree that
> the average is probably more confusing but it's what we do for every
> other stat. Do we want to be consistent?

Probably yes.  But it strikes me that the additional numbers printed for
Sort nodes might be bogus in multiple-loop cases too; what about that?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Some belated patch review for "Buffers" explain analyze patch
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: [GENERAL] ERROR: could not load library "...": Exec format error