Re: error context for vacuum to include block number - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: error context for vacuum to include block number
Date
Msg-id CAA4eK1J4wNO425WjKj2Yd58Ag=LovSkxoHTuBJphFma+9jLAJA@mail.gmail.com
Whole thread Raw
In response to Re: error context for vacuum to include block number  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: error context for vacuum to include block number
List pgsql-hackers
On Tue, Mar 24, 2020 at 9:46 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> On Mon, Mar 23, 2020 at 02:25:14PM +0530, Amit Kapila wrote:
> > > Yea, and it would be misleading if we reported "while scanning block..of
> > > relation" if we actually failed while writing its FSM.
> > >
> > > My previous patches did this:
> > >
> > > +               case VACUUM_ERRCB_PHASE_VACUUM_FSM:
> > > +                       errcontext("while vacuuming free space map of relation \"%s.%s\"",
> > > +                                       cbarg->relnamespace, cbarg->relname);
> > > +                       break;
> > >
> >
> > In what kind of errors will this help?
>
> If there's an I/O error on an _fsm file, for one.
>

If there is a read or write failure, then we give error like below
which already has required information.
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not read block %u in file \"%s\": %m",
blocknum, FilePathName(v->mdfd_vfd))));

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Improve autovacuum logging for aggressive andanti-wraparound ru
Next
From: Amit Kapila
Date:
Subject: Re: improve transparency of bitmap-only heap scans