pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix deadlock in heap_compute_xid_horizon_for_tuples().
Date: Mon, 01 Apr 2019 20:31:53 +0000
Message-ID: <E1hB3az-0007aE-6O@gemulon.postgresql.org> (raw)

Fix deadlock in heap_compute_xid_horizon_for_tuples().

We can't call code that uses syscache while we hold buffer locks
on a catalog relation.  If passed such a relation, just fall back
to the general effective_io_concurrency GUC rather than trying to
look up the containing tablespace's IO concurrency setting.

We might find a better way to control prefetching in follow-up
work, but for now this is enough to avoid the deadlock introduced
by commit 558a9165e0.

Reviewed-by: Andres Freund
Diagnosed-by: Peter Geoghegan
Discussion: https://postgr.es/m/CA%2BhUKGLCwPF0S4Mk7S8qw%2BDK0Bq65LueN9rofAA3HHSYikW-Zw%40mail.gmail.com
Discussion: https://postgr.es/m/962831d8-c18d-180d-75fb-8b842e3a2742%40chrullrich.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4fd05bb55b40a3c9dde2b19942f275fc31b5225a

Modified Files
--------------
src/backend/access/heap/heapam.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)



Message-ID: <E1hB3az-0007aE-6O@gemulon.postgresql.org>
Permalink:  ../E1hB3az-0007aE-6O@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hB3az-0007aE-6O@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Fix deadlock in heap_compute_xid_horizon_for_tuples().
  In-Reply-To: <E1hB3az-0007aE-6O@gemulon.postgresql.org>
  References: <E1hB3az-0007aE-6O@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox