Re: Speed up transaction completion faster after many relations are accessed in a transaction
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>,
"pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2019-02-19T11:57:32Z
Lists: pgsql-hackers
On 2/12/19 7:33 AM, Tsunakawa, Takayuki wrote: > ... > > This problem was uncovered while evaluating partitioning performance. > When the application PREPAREs a statement once and then > EXECUTE-COMMIT repeatedly, the server creates a generic plan on the > 6th EXECUTE. Unfortunately, creation of the generic plan of > UPDATE/DELETE currently accesses all partitions of the target table > (this itself needs improvement), expanding the LOCALLOCK hash table. > As a result, 7th and later EXECUTEs get slower. > > Imai-san confirmed performance improvement with this patch: > > https://commitfest.postgresql.org/22/1993/ > Can you quantify the effects? That is, how much slower/faster does it get? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Reorder LOCALLOCK structure members to compact the size
- 28988a84cf19 12.0 landed
-
Be more careful to not lose sync in the FE/BE protocol.
- 2b3a8b20c2da 9.5.0 cited