Jason Madden <jason(dot)madden(at)nextthought(dot)com> writes:
> I hope that at least begins to answer your question. Thanks for thinking about this!
FYI, we're now thinking that the problem here is unrelated to partitions
but instead is a bug in EPQ, which is a subsystem that's entered only when
a row to be locked/updated is found to have just been updated by some
concurrent transaction. See
https://www.postgresql.org/message-id/flat/15900-bc482754fe8d7415%40postgresql.org
If you're in a position to build a custom version of Postgres, you
might try whether the patch proposed in that thread resolves your
problem.
regards, tom lane