Re: Performance under contention - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Performance under contention
Date
Msg-id 4CECD0E50200002500037DE2@gw.wicourts.gov
Whole thread Raw
In response to Re: Performance under contention  (Vitalii Tymchyshyn <tivv00@gmail.com>)
List pgsql-performance
Vitalii Tymchyshyn <tivv00@gmail.com> wrote:

> the simplest option that will make most people happy would be to
> have a limit (waitable semaphore) on backends actively executing
> the query.

That's very similar to the admission control policy I proposed,
except that I suggested a limit on the number of active database
transactions rather than the number of queries.  The reason is that
you could still get into a lot of lock contention with a query-based
limit -- a query could acquire locks (perhaps by writing rows to the
database) and then be blocked waiting its turn, leading to conflicts
with other transactions.  Such problems would be less common with a
transaction limit, since most common locks don't persist past the
end of the transaction.

-Kevin

pgsql-performance by date:

Previous
From: Vitalii Tymchyshyn
Date:
Subject: Re: Performance under contention
Next
From: pasman pasmański
Date:
Subject: Optimizing query