Re: [HACKERS] infinite loop in _bt_getstackbuf

2015-01-16 Thread Robert Haas
On Thu, Jan 15, 2015 at 5:46 PM, Peter Geoghegan p...@heroku.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

Re: [HACKERS] infinite loop in _bt_getstackbuf

2015-01-15 Thread Peter Geoghegan
On Thu, Oct 30, 2014 at 10:46 AM, Robert Haas robertmh...@gmail.com wrote: (9.3.5 problem report) I think I saw a similar issue, by a 9.3.5 instance that was affected by the in pg_upgrade, remove pg_multixact files left behind by initdb issue (I ran the remediation recommended in the 9.3.5

Re: [HACKERS] infinite loop in _bt_getstackbuf

2014-10-31 Thread Robert Haas
On Thu, Oct 30, 2014 at 11:45 PM, Noah Misch n...@leadboat.com wrote: Given the lack of prior complaints about this loop, I'm not sure I see the need to work harder than that; corruption of this sort must be quite rare. Looks like _bt_getstackbuf() is always called with some buffer lock held,

Re: [HACKERS] infinite loop in _bt_getstackbuf

2014-10-31 Thread Noah Misch
On Fri, Oct 31, 2014 at 10:29:53AM -0400, Robert Haas wrote: On Thu, Oct 30, 2014 at 11:45 PM, Noah Misch n...@leadboat.com wrote: Given the lack of prior complaints about this loop, I'm not sure I see the need to work harder than that; corruption of this sort must be quite rare. Looks

[HACKERS] infinite loop in _bt_getstackbuf

2014-10-30 Thread Robert Haas
A colleague at EnterpriseDB today ran into a situation on PostgreSQL 9.3.5 where the server went into an infinite loop while attempting a VACUUM FREEZE; it couldn't escape _bt_getstackbuf(), and it couldn't be killed with ^C. I think we should add a check for interrupts into that loop somewhere;

Re: [HACKERS] infinite loop in _bt_getstackbuf

2014-10-30 Thread Alvaro Herrera
Robert Haas wrote: A colleague at EnterpriseDB today ran into a situation on PostgreSQL 9.3.5 where the server went into an infinite loop while attempting a VACUUM FREEZE; it couldn't escape _bt_getstackbuf(), and it couldn't be killed with ^C. I think we should add a check for interrupts

Re: [HACKERS] infinite loop in _bt_getstackbuf

2014-10-30 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Robert Haas wrote: A colleague at EnterpriseDB today ran into a situation on PostgreSQL 9.3.5 where the server went into an infinite loop while attempting a VACUUM FREEZE; it couldn't escape _bt_getstackbuf(), and it couldn't be killed with ^C.

Re: [HACKERS] infinite loop in _bt_getstackbuf

2014-10-30 Thread Noah Misch
On Thu, Oct 30, 2014 at 03:52:01PM -0400, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Robert Haas wrote: A colleague at EnterpriseDB today ran into a situation on PostgreSQL 9.3.5 where the server went into an infinite loop while attempting a VACUUM FREEZE; it couldn't

Re: [HACKERS] infinite loop in _bt_getstackbuf

2014-10-30 Thread Tom Lane
Noah Misch n...@leadboat.com writes: Looks like _bt_getstackbuf() is always called with some buffer lock held, so CHECK_FOR_INTERRUPTS() alone would not help: http://www.postgresql.org/message-id/flat/16519.1401395...@sss.pgh.pa.us Oooh, good point. I never followed up on that idea, but we