Re: infinite loop in _bt_getstackbuf

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: infinite loop in _bt_getstackbuf
Date: 2015-01-16 18:26:13
Message-ID: CA+TgmoaMGuZjNPuQ9d7bYGQaWNwV=oMeDaAv2Kw1rf5SrVFKGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 15, 2015 at 5:46 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> I think that it might be a good idea to have circular _bt_moveright()
> moves (the direct offender in Merlin's case, which has very similar
> logic to your _bt_getstackbuf() problem case) detected. I'm pretty
> sure that it's exceptional for there to be more than 2 or 3 retries in
> _bt_moveright(). It would probably be fine to consider the possibility
> that we'll never finish once we get past 5 retries or something like
> that. We'd then start keeping track of blocks visited, and raise an
> error when a page was visited a second time.

Yeah, I could go for that. Possibly somebody might object that it's a
lot of code that will never get tested in normal operation, but as
this problem doesn't seem to be strictly theoretical I'm not sure I
subscribe to that objection.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-01-16 18:30:08 Re: proposal: lock_time for pg_stat_database
Previous Message Pavel Stehule 2015-01-16 18:24:48 Re: proposal: lock_time for pg_stat_database