increase size of pg_commit_ts buffers

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: increase size of pg_commit_ts buffers
Date: 2021-01-15 22:07:44
Message-ID: 20210115220744.GA24457@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote this patch last year in response to a customer issue and I
thought I had submitted it here, but evidently I didn't. So here it is.

The short story is: in commit 5364b357fb11 we increased the size of
pg_commit (née pg_clog) but we didn't increase the size of pg_commit_ts
to match. When commit_ts is in use, this can lead to significant buffer
thrashing and thus poor performance.

Since commit_ts entries are larger than pg_commit, my proposed patch uses
twice as many buffers.

Suffice it to say once we did this the customer problem went away.

(Andrey Borodin already has a patch to change the behavior for
multixact, which is something we should perhaps also do. I now notice
that they're also reporting a bug in that thread ... sigh)

--
Álvaro Herrera 39°49'30"S 73°17'W
"The problem with the future is that it keeps turning into the present"
(Hobbes)

Attachment Content-Type Size
commit-ts-mem.patch text/x-diff 421 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-01-15 22:26:41 Re: Rename of triggers for partitioned tables
Previous Message Bruce Momjian 2021-01-15 22:07:04 Re: Key management with tests