postgresql/src/backend
David Rowley c2a4078eba Enable BUFFERS with EXPLAIN ANALYZE by default
The topic of turning EXPLAIN's BUFFERS option on with the ANALYZE option
has come up a few times over the past few years.  In many ways, doing this
seems like a good idea as it may be more obvious to users why a given
query is running more slowly than they might expect.  Also, from my own
(David's) personal experience, I've seen users posting to the mailing
lists with two identical plans, one slow and one fast asking why their
query is sometimes slow.  In many cases, this is due to additional reads.
Having BUFFERS on by default may help reduce some of these questions, and
if not, make it more obvious to the user before they post, or save a
round-trip to the mailing list when additional I/O effort is the cause of
the slowness.

The general consensus is that we want BUFFERS on by default with
ANALYZE.  However, there were more than zero concerns raised with doing
so.  The primary reason against is the additional verbosity, making it
harder to read large plans.  Another concern was that buffer information
isn't always useful so may not make sense to have it on by default.

It's currently December, so let's commit this to see if anyone comes
forward with a strong objection against making this change.  We have over
half a year remaining in the v18 cycle where we could still easily consider
reverting this if someone were to come forward with a convincing enough
reason as to why doing this is a bad idea.

There were two patches independently submitted to achieve this goal, one
by me and the other by Guillaume.  This commit is a mix of both of these
patches with some additional work done by me to adjust various
additional places in the documentation which include EXPLAIN ANALYZE
output.

Author: Guillaume Lelarge, David Rowley
Reviewed-by: Robert Haas, Greg Sabino Mullane, Michael Christofides
Discussion: https://postgr.es/m/CANNMO++W7MM8T0KyXN3ZheXXt-uLVM3aEtZd+WNfZ=obxffUiA@mail.gmail.com
2024-12-11 22:35:11 +13:00
..
access Remove remants of "snapshot too old" 2024-12-09 18:13:03 +02:00
archive Apply more quoting to GUC names in messages 2024-09-04 13:50:44 +09:00
backup Clean up newlines following left parentheses 2024-11-26 17:10:07 +01:00
bootstrap Provide a better error message for misplaced dispatch options. 2024-12-04 15:04:15 -06:00
catalog Make getObjectDescription robust against dangling amproc type links. 2024-12-07 14:28:16 -05:00
commands Enable BUFFERS with EXPLAIN ANALYZE by default 2024-12-11 22:35:11 +13:00
executor Use ExprStates for hashing in GROUP BY and SubPlans 2024-12-11 13:47:16 +13:00
foreign Improve style of two code paths 2024-10-08 10:51:20 +09:00
jit Require sizeof(bool) == 1. 2024-11-28 12:01:14 +13:00
lib Revert pg_wal_replay_wait() stored procedure 2024-11-04 22:47:57 +02:00
libpq Deprecate MD5 passwords. 2024-12-02 13:30:07 -06:00
main Fix elog(FATAL) before PostmasterMain() or just after fork(). 2024-12-10 13:51:59 -08:00
nodes Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
optimizer Avoid unnecessary wrapping for Vars and PHVs 2024-12-09 20:38:22 +09:00
parser Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
partitioning Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
po Translation updates 2024-06-24 13:11:27 +02:00
port Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
postmaster Fix elog(FATAL) before PostmasterMain() or just after fork(). 2024-12-10 13:51:59 -08:00
regex Remove pg_regex_collation 2024-12-05 07:19:37 +01:00
replication Make the conditions in IsIndexUsableForReplicaIdentityFull() more explicit 2024-12-10 13:11:34 +01:00
rewrite Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
snowball Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
statistics Use in-place updates for pg_restore_relation_stats(). 2024-12-10 16:30:37 -08:00
storage Remove remants of "snapshot too old" 2024-12-09 18:13:03 +02:00
tcop Simplify executor's determination of whether to use parallelism. 2024-12-09 14:38:19 -05:00
tsearch Remove useless casts to (void *) 2024-11-28 08:27:20 +01:00
utils Fix various overflow hazards in date and timestamp functions. 2024-12-09 13:47:23 -06:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Fix make build on MinGW 2024-06-21 08:17:23 +02:00
meson.build meson: Fix import library name in Windows 2024-06-20 09:08:36 +02:00
nls.mk Add missing gettext triggers 2024-05-14 12:57:22 +02:00