aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2024-05-16 12:50:16 +1200
committerDavid Rowley <drowley@postgresql.org>2024-05-16 12:50:16 +1200
commit0de37b51065bc5b5848d65a9bb6f932ef392374f (patch)
treea6b96980b70b6da393d3971cc6d57959567fce48 /src/backend/parser/parse_utilcmd.c
parentf01e3ba56fd125ccba65b23a1829fc25b6f3fc65 (diff)
downloadpostgresql-0de37b51065bc5b5848d65a9bb6f932ef392374f.tar.gz
postgresql-0de37b51065bc5b5848d65a9bb6f932ef392374f.zip
Fix some inconsistencies in EXPLAIN output
06286709e added a SERIALIZE option to EXPLAIN which included showing the amount of kilobytes serialized. The calculation to convert bytes into kilobytes wasn't consistent with how that's done in the rest of EXPLAIN. Traditionally we round up to the nearest kB, but the new code rounded to the nearest kB. To fix this, invent a macro that does the conversion and use that macro everywhere that requires this conversion. Additionally, 5de890e36 added EXPLAIN (MEMORY) but included the memory sizes in bytes. Convert these values to kilobytes to align with the other memory related outputs. In passing, swap out a "long" type in show_hash_info() and use a uint64 instead. We do support platforms where sizeof(Size) == 8 and sizeof(long) == 4, so using a long there is questionable. Reported-by: jian he Reviewed-by: jian he Discussion: https://www.postgresql.org/message-id/CACJufxE4Sp7xvgOwhqtFx5hS85AxMKobPWDo-xZHZVTpK3EBjA@mail.gmail.com
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
0 files changed, 0 insertions, 0 deletions