pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Introduce vacuum errcontext to display additional information.
Date: Mon, 30 Mar 2020 02:12:28 +0000
Message-ID: <E1jIjue-0005HM-45@gemulon.postgresql.org> (raw)

Introduce vacuum errcontext to display additional information.

The additional information displayed will be block number for error
occurring while processing heap and index name for error occurring
while processing the index.

This will help us in diagnosing the problems that occur during a vacuum.
For ex. due to corruption (either caused by bad hardware or by some bug)
if we get some error while vacuuming, it can help us identify the block
in heap and or additional index information.

It sets up an error context callback to display additional information
with the error.  During different phases of vacuum (heap scan, heap
vacuum, index vacuum, index clean up, heap truncate), we update the error
context callback to display appropriate information.  We can extend it to
a bit more granular level like adding the phases for FSM operations or for
prefetching the blocks while truncating. However, I felt that it requires
adding many more error callback function calls and can make the code a bit
complex, so left those for now.

Author: Justin Pryzby, with few changes by Amit Kapila
Reviewed-by: Alvaro Herrera, Amit Kapila, Andres Freund, Michael Paquier
and Sawada Masahiko
Discussion: https://www.postgresql.org/message-id/20191120210600.GC30362@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b61d161c146328ae6ba9ed937862d66e5c8b035a

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 240 +++++++++++++++++++++++++++++++----
src/tools/pgindent/typedefs.list     |   1 +
2 files changed, 216 insertions(+), 25 deletions(-)



Message-ID: <E1jIjue-0005HM-45@gemulon.postgresql.org>
Permalink:  ../E1jIjue-0005HM-45@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jIjue-0005HM-45@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org
  Subject: Re: pgsql: Introduce vacuum errcontext to display additional information.
  In-Reply-To: <E1jIjue-0005HM-45@gemulon.postgresql.org>
  References: <E1jIjue-0005HM-45@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox