Re: refactoring relation extension and BufferAlloc(), faster COPY

From: Andres Freund <andres(at)anarazel(dot)de>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: refactoring relation extension and BufferAlloc(), faster COPY
Date: 2023-04-05 00:39:45
Message-ID: 20230405003945.77fsb4ct47xqoglc@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-03-29 20:02:33 -0700, Andres Freund wrote:
> Attached is v6. Changes:

Attached is v7. Not much in the way of changes:
- polished a lot of the commit messages
- reordered commits to not be blocked as immediately by
https://www.postgresql.org/message-id/20230325025740.wzvchp2kromw4zqz%40awork3.anarazel.de
- Used the new relation extension function in two more places (finding an
independent bug on the way), not sure why I didn't convert those earlier...

I'm planning to push the patches up to the hio.c changes soon, unless somebody
would like me to hold off.

After that I'm planning to wait for a buildfarm cycle, and push the changes
necessary to use bulk extension in hio.c (the main win).

I might split the patch to use ExtendBufferedRelTo() into two, one for
vm_extend() and fsm_extend(), and one for xlogutils.c. The latter is more
complicated and has more of a complicated history (see [1]).

Greetings,

Andres Freund

https://www.postgresql.org/message-id/20230223010147.32oir7sb66slqnjk%40awork3.anarazel.de

Attachment Content-Type Size
v7-0001-Don-t-initialize-page-in-vm-fsm-_extend-not-neede.patch text/x-diff 2.6 KB
v7-0002-Add-smgrzeroextend-FileZero-FileFallocate.patch text/x-diff 12.5 KB
v7-0003-bufmgr-Add-some-more-error-checking-infrastructur.patch text/x-diff 3.7 KB
v7-0004-bufmgr-Add-Pin-UnpinLocalBuffer.patch text/x-diff 5.6 KB
v7-0005-bufmgr-Acquire-and-clean-victim-buffer-separately.patch text/x-diff 28.4 KB
v7-0006-bufmgr-Support-multiple-in-progress-IOs-by-using-.patch text/x-diff 13.3 KB
v7-0007-bufmgr-Introduce-infrastructure-for-faster-relati.patch text/x-diff 47.2 KB
v7-0008-Convert-many-uses-of-ReadBuffer-Extended-P_NEW-wi.patch text/x-diff 14.9 KB
v7-0009-heapam-Pass-number-of-required-pages-to-RelationG.patch text/x-diff 6.9 KB
v7-0010-hio-Relax-rules-for-calling-GetVisibilityMapPins.patch text/x-diff 2.6 KB
v7-0011-hio-Don-t-pin-the-VM-while-holding-buffer-lock-wh.patch text/x-diff 8.3 KB
v7-0012-hio-Use-ExtendBufferedRelBy.patch text/x-diff 14.9 KB
v7-0013-Convert-a-few-places-to-ExtendBufferedRelTo.patch text/x-diff 11.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2023-04-05 00:41:09 Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)
Previous Message Jeff Davis 2023-04-05 00:33:25 Re: Minimal logical decoding on standbys