On 2019-Dec-10, Jens-Wolfhard Schicke-Uffmann wrote: > More troubling (to me) is that I already know of another table in the > system which should be next-in-line for the same problem, but only on > some rows: It represents accounting entities, of which a very (nearly > static) few are payment processors and all others are customers. From > the application's perspective there's not too much difference between > those, but any customer row will typically only be share locked once, > whereas share locks on payment processor rows will be held by most of > the transactions currently active.
Well, you could partition that table. This probably means you'll need to improve Postgres implementation of PKs on partitioned tables, though. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services