Re: display offset along with block number in vacuum errors

From: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: display offset along with block number in vacuum errors
Date: 2020-07-27 07:45:09
Message-ID: CAKYtNAoUO8rFpCdw7733UhfdtAp72QgdR+O861623Z52-Oc6VA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks Michael for looking into this.

On Sat, 25 Jul 2020 at 15:02, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Fri, Jul 24, 2020 at 11:18:43PM +0530, Mahendra Singh Thalor wrote:
> > In commit b61d161(Introduce vacuum errcontext to display additional
> > information), we added vacuum errcontext to display additional
> > information(block number) so that in case of vacuum error, we can identify
> > which block we are getting error. Addition to block number, if we can
> > display offset, then it will be more helpful for users. So to display
> > offset, here proposing two different methods(Thanks Robert for suggesting
> > these 2 methods):
>
> new_rel_pages = count_nondeletable_pages(onerel, vacrelstats);
> vacrelstats->blkno = new_rel_pages;
> + vacrelstats->offnum = InvalidOffsetNumber;
>
> Adding more context would be interesting for some cases, but not all
> contrary to what your patch does in some code paths like
> lazy_truncate_heap() as you would show up an offset of 0 for an
> invalid value. This could confuse some users. Note that we are
> careful enough to not print a context message if the block number is
> invalid.

Okay. I agree with you. In case of inavlid offset, we can skip offset
printing. I will do this change in the next patch.

Thanks and Regards
Mahendra Singh Thalor
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2020-07-27 08:00:46 Re: shared tempfile was not removed on statement_timeout
Previous Message Drouvot, Bertrand 2020-07-27 07:36:59 Display individual query in pg_stat_activity