From: | Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: [Patch] Optimize dropping of relation buffers using dlist |
Date: | 2020-07-29 07:54:45 |
Message-ID: | 265e17fa-f21d-6896-7b93-86374148dc74@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 17.06.2020 09:14, k(dot)jamison(at)fujitsu(dot)com wrote:
> Hi,
>
> Since the last posted version of the patch fails, attached is a rebased version.
> Written upthread were performance results and some benefits and challenges.
> I'd appreciate your feedback/comments.
>
> Regards,
> Kirk Jamison
As far as i understand this patch can provide significant improvement of
performance only in case of
recovery of truncates of large number of tables. You have added shared
hash of relation buffers and certainly if adds some
extra overhead. According to your latest results this overhead is quite
small. But it will be hard to prove that there will be no noticeable
regression
at some workloads.
I wonder if you have considered case of local hash (maintained only
during recovery)?
If there is after-crash recovery, then there will be no concurrent
access to shared buffers and this hash will be up-to-date.
in case of hot-standby replica we can use some simple invalidation (just
one flag or counter which indicates that buffer cache was updated).
This hash also can be constructed on demand when DropRelFileNodeBuffers
is called first time (so w have to scan all buffers once, but subsequent
drop operation will be fast.
i have not thought much about it, but it seems to me that as far as this
problem only affects recovery, we do not need shared hash for it.
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2020-07-29 08:03:02 | Re: [POC] Fast COPY FROM command for the table with foreign partitions |
Previous Message | Thomas Munro | 2020-07-29 07:22:38 | Re: recovering from "found xmin ... from before relfrozenxid ..." |