[HACKERS] pageinspect option to forgo buffer locking? - Mailing list pgsql-hackers

From Andres Freund
Subject [HACKERS] pageinspect option to forgo buffer locking?
Date
Msg-id 20171109174911.m6nfe3gmb3ugk53x@alap3.anarazel.de
Whole thread Raw
Responses Re: [HACKERS] pageinspect option to forgo buffer locking?  (Peter Geoghegan <pg@bowt.ie>)
Re: [HACKERS] pageinspect option to forgo buffer locking?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

Occasionally, when debugging issues, I find it quite useful to be able
to do a heap_page_items() on a page that's actually locked exclusively
concurrently. E.g. investigating the recent multixact vacuuming issues,
it was very useful to attach a debugger to one backend to step through
freezing, and display the page in another session.

Currently the locking in get_raw_page_internal() prevents that.  If it's
an option defaulting to off, I don't see why we couldn't allow that to
skip locking the page's contents. Obviously you can get corrupted
contents that way, but we already allow to pass arbitrary stuff to
heap_page_items().  Since pinning wouldn't be changed, there's no danger
of the page being moved out from under us.

Greetings,

Andres Freund


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: [HACKERS] [PATCH] A hook for session start
Next
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] pageinspect option to forgo buffer locking?