Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix description of I/O timing info for shared buffers in EXPLAIN (BUFFERS)
authorMichael Paquier <michael@paquier.xyz>
Thu, 14 Dec 2023 08:59:52 +0000 (09:59 +0100)
committerMichael Paquier <michael@paquier.xyz>
Thu, 14 Dec 2023 08:59:52 +0000 (09:59 +0100)
This fixes an error introduced by efb0ef909f60, that changed the
description of this field to "shared/local" while these I/O timings
relate to shared buffers.  This information is available when
track_io_timing is enabled.  Note that HEAD has added new counters for
local buffers in 295c36c0c1fa, so there is no need to touch it.  The
description is updated to "shared" to be compatible with HEAD.

Per discussion with Nazir Bilal Yavuz and Hubert Depesz Lubaczewski,
whose EXPLAIN analyzer tool was not actually able to parse the previous
term because of the slash character.

Discussion: https://postgr.es/m/ZTCTiUqm_H3iBihl@paquier.xyz
Backpatch-through: 15

src/backend/commands/explain.c

index 060c6186dddac74ea5ab4d810c60f7a7d114f2a5..fa0b79d544969c2c310d87a8b18abe81284416f7 100644 (file)
@@ -3597,7 +3597,7 @@ show_buffer_usage(ExplainState *es, const BufferUsage *usage, bool planning)
 
            if (has_timing)
            {
-               appendStringInfoString(es->str, " shared/local");
+               appendStringInfoString(es->str, " shared");
                if (!INSTR_TIME_IS_ZERO(usage->blk_read_time))
                    appendStringInfo(es->str, " read=%0.3f",
                                     INSTR_TIME_GET_MILLISEC(usage->blk_read_time));