Konstantin Knizhnik <k.knizh...@postgrespro.ru> writes: > Attached please find patch for "ALTER INDEX ... WHERE ..." clause. > It is now able to handle all three possible situations: > 1. Making index partial (add WHERE condition to the ordinary index) > 2. Extend partial index range (less restricted index predicate) > 3. Arbitrary change of partial index predicate
I've not been following this thread previously, but this proposal scares me quite a lot. I am certain there are places in our code that assume that the properties of an index don't change after it's been created. One area that this almost certainly breaks is HOT updates: adding a previously-unindexed column to an index predicate might break existing HOT chains, and I see nothing in this patch that could deal with that. I seem to recall there are other places that would be broken by changing an index's DDL definition after creation, but can't recall specifics right now. I am also, frankly, not seeing a use-case for this functionality that would justify trying to find and remove those assumptions. There's a lot of things I don't care for about the way the patch is written, in particular its willingness to use SPI (which opens a lot of potential for search-path problems, failure to see uncommitted tuples, etc). But we need not get to that if we don't believe the functionality can work. > This patch includes src/bin/insbench utility for testing insert > performance. It can be easily excluded from the patch to reduce it size. C++ is not likely to get accepted into our tree ... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers