Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem
От | Claudio Freire |
---|---|
Тема | Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem |
Дата | |
Msg-id | CAGTBQpaw6YJF052ZhmRhw21M7vzi2VG3dA6078jjM_oWZW4Eiw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem
|
Список | pgsql-hackers |
On Fri, Feb 9, 2018 at 10:32 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > Claudio Freire wrote: >> On Thu, Feb 8, 2018 at 8:39 PM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > >> During the process of developing the patch, I got seriously broken >> code that passed the tests nonetheless. The test as it was was very >> ineffective at actually detecting issues. >> >> This new test may be slow, but it's effective. That's a very good >> reason to make it slower, if you ask me. > > OK, I don't disagree with improving the test, but if we can make it fast > *and* effective, that's better than slow and effective. I'd love to have a test that uses multiple segments of dead tuples, but for that, it needs to use more than 64MB of mwm. That amounts to, basically, ~12M rows. Is there a "slow test suite" where such a test could be added that won't bother regular "make check"? That, or we turn the initial segment size into a GUC, but I don't think it's a useful GUC outside of the test suite. >> > 3. Figure out the minimum size for the table that triggers the behavior >> > you want. Right now you use 400k tuples -- maybe 100k are sufficient? >> > Don't know. >> >> For that test, I need enough *dead* tuples to cause several passes. >> Even small mwm settings require tons of tuples for this. In fact, I'm >> thinking that number might be too low for its purpose, even. I'll >> re-check, but I doubt it's too high. If anything, it's too low. > > OK. Turns out that it was a tad oversized. 300k tuples seems enough. Attached is a new patch version that: - Uses an unlogged table to make the large mwm test faster - Uses a wait_barrier helper that waits for concurrent transactions to finish before vacuuming tables, to make sure deleted tuples actually are vacuumable - Tweaks the size of the large mwm test to be as small as possible - Optimizes the delete to avoid expensive operations yet attain the same end result
Вложения
В списке pgsql-hackers по дате отправления: