Re: [PATCH] pg_dump: lock tables in batches
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Aleksander Alekseev <aleksander@timescale.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-12-07T17:28:03Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
During pg_dump startup, acquire table locks in batches.
- 5f53b42cfd05 16.0 landed
Andres Freund <andres@anarazel.de> writes: > On 2022-12-07 10:44:33 -0500, Tom Lane wrote: >> I have a strong sense of deja vu here. I'm pretty sure I experimented >> with this idea last year and gave up on it. I don't recall exactly >> why, but either it didn't show any meaningful performance improvement >> for me or there was some actual downside (that I'm not remembering >> right now). > IIRC the case we were looking at around 989596152 were CPU bound workloads, > rather than latency bound workloads. It'd not be surprising to have cases > where batching LOCKs helps latency, but not CPU bound. Yeah, perhaps. Anyway my main point is that I don't want to just assume this is a win; I want to see some actual performance tests. > I wonder if "manual" batching is the best answer. Alexander, have you > considered using libpq level pipelining? I'd be a bit nervous about how well that works with older servers. regards, tom lane