> > > I've had this idea before, and even wrote a quick POC at one point, but I > > > had it simply throw a warning rather than an > > > error. That avoids the need for any GUC, which I agree is not a good > > > idea. And it still allows people to create a > > > duplicate index if they really want to. > > > > > > > I also appreciate your suggestion regarding the GUC parameter. You've > > convinced me that a warning might be a more appropriate approach. A warning > > would still alert users to the potential issue of creating a redundant > > index, > > while allowing them to proceed if they have a specific reason to do so.
> +1 to a warning. If I had a dollar for every time I asked a user to check for duplicate indexes :) So I think it's a good idea to provide some way to detect these ( besides a query in the Wiki ), but I don't think we should prevent it. While a WARNING will be a good to have, it could easily go unnoticed, but it's still good to have. I also think we should either provide a psql shortcut to detect these indexes or to add annotation to an index in the \d <table> command, or perhaps both of these things. -- Sami Imseih Amazon Web Services (AWS)