On Fri, Mar 31, 2017 at 10:24 AM, Pavan Deolasee <pavan.deola...@gmail.com> wrote: > Having worked on it for some time now, I can say that WARM uses pretty much > the same infrastructure that HOT uses for cleanup/pruning tuples from the > heap. So the risk of having a bug which can eat your data from the heap is > very low. Sure, it might mess up with indexes, return duplicate keys, not > return a row when it should have. Not saying they are not bad bugs, but > probably much less severe than someone removing live rows from the heap.
Yes, that's true. If there's nothing wrong with the way pruning works, then any other problem can be fixed by reindexing, I suppose. > And we can make it a table level property, keep it off by default, turn it > off on system tables in this release and change the defaults only when we > get more confidence assuming people use it by explicitly turning it on. Now > may be that's not the right approach and keeping it off by default will mean > it receives much less testing than we would like. So we can keep it on in > the beta cycle and then take a call. I went a good length to make it work on > system tables because during HOT development, Tom told me that it better > work for everything or it doesn't work at all. But with WARM it works for > system tables and I know no known bugs, but if we don't want to risk system > tables, we might want to turn it off (just prior to release may be). I'm not generally a huge fan of on-off switches for things like this, but I know Simon likes them. I think the question is how much they really insulate us from bugs. For the hash index patch, for example, the only way to really get insulation from bugs added in this release would be to ship both the old and the new code in separate index AMs (hash, hash2). The code has been restructured so much in the process of doing all of this that any other form of on-off switch would be pretty hit-or-miss whether it actually provided any protection. Now, I am less sure about this case, but my guess is that you can't really have this be something that can be flipped on and off for a table. Once a table has any WARM updates in it, the code that knows how to cope with that has to be enabled, and it'll work as well or poorly as it does. Now, I understand you to be suggesting a flag at table-creation time that would, maybe, be immutable after that, but even then - are we going to run completely unmodified 9.6 code for tables where that's not enabled, and only go through any of the WARM logic when it is enabled? Doesn't sound likely. The commits already made from this patch series certainly affect everybody, and I can't see us adding switches that bypass ce96ce60ca2293f75f36c3661e4657a3c79ffd61 for example. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers