Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)
Дата
Msg-id CABOikdM3ARC0msOjJJJW10r_epFWPat=vn1gh_KpnOz8SDmcYw@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers


On Thu, Apr 6, 2017 at 12:20 AM, Peter Geoghegan <pg@bowt.ie> wrote:
On Wed, Apr 5, 2017 at 11:27 AM, Andres Freund <andres@anarazel.de> wrote:
> I propose we move this patch to the next CF.

I agree. I think it's too late to be working out fine details around
TOAST like this. This is a patch that touches the storage format in a
fairly fundamental way.

The idea of turning WARM on or off reminds me a little bit of the way
it was at one time suggested that HOT not be used against catalog
tables, a position that Tom pushed against.

I agree. I am grateful that Tom put his put down and helped me find answers to all hard problems, including catalog tables and create index concurrently. So I was very clear in my mind from the very beginning that WARM must support all these things too. Obviously it still doesn't support everything like other index methods and expression indexes, but IMHO that's a much smaller problem. Also, making sure that WARM works on system tables helped me find any corner bugs which would have otherwise skipped via regular regression testing.

 
I'm not saying that it's
necessarily a bad idea, but we should exhaust alternatives, and have a
clear rationale for it.

One reason why it's probably a good idea is because we know WARM will not effective for all use cases and it might actually cause performance regression for some of them. Even worse and as Robert fears, it might cause data loss issues. Though TBH I haven't yet seen any concrete example where it breaks so badly that it causes data loss, but that may be because the patch still hasn't received enough eye balls or outside tests. Having table level option would allow us to incrementally improve things instead of making the initial patch so large that reviewing it is a complete nightmare. May be it's already a nightmare.

It's not as if HOT would not have caused regression for some specific use cases. But I think the general benefit was so strong that we never invested time in finding and tuning for those specific cases, thus avoided some more complexity to the code. WARM's benefits are probably not the same as HOT or our standards may have changed or we probably have resources to do much more elaborate tests, which were missing 10 years back. But now that we are aware of some regressions, the choice is between spending considerable amount of time trying to handle every case vs doing it incrementally and start delivering to majority of the users, yet keeping the patch at a manageable level.

Even if we were to provide table level option, my preference would be keep it ON by default.

Thanks,
Pavan

-- 
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: [HACKERS] Faster methods for getting SPI results (460%improvement)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] src/interfaces/libpq shipping nmake-related Makefiles