Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i84S9-0006mR-VA for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Sep 2019 15:22:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i84S8-0003bL-Bq for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Sep 2019 15:22:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i84S7-0003Sf-Sq for pgsql-bugs@lists.postgresql.org; Wed, 11 Sep 2019 15:22:40 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i84S3-0001o7-0C for pgsql-bugs@lists.postgresql.org; Wed, 11 Sep 2019 15:22:39 +0000 Received: by mail-qk1-x742.google.com with SMTP id 201so21141697qkd.13 for ; Wed, 11 Sep 2019 08:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=QTR5GgnNZah/azE/YFJg1GPUJxVqmb7OCo6qdca7seY=; b=Pwqgwa367R3rU8TlNLgiyJLYNpL5SCLql2CppquFYPc4uDlctb+QaGAa+uanxlEuLd 7snW3XxzyOmNTIMvVo3xwTorOYAoinaVIDh0vYzpynBOhdvOUy8t6c+XzLt1M573q8PI O/vGbYmMC5cQTksCTgV3wmU0pelXG+AzH+IjyqOddghDd9xe1EyeN0nvA6JTEYA9Npl+ 2C8P9Y+cN0TKkHklCIOBONeTuRJUCWZ8ugSmegilNdVNY8BC5G2xezyq82ea5K0AEsx4 VZ7Q2VLPk/X4L33gOmPSf2Qh8nN21GZwzZ/JbL7jzV66z9PdzUknwCG1JQe+YHM89uPf uWUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=QTR5GgnNZah/azE/YFJg1GPUJxVqmb7OCo6qdca7seY=; b=nemJENonGIs7JQyhVuXn2fH4ZF+wHno8jJxBX7rV1yz/yKCBM+2vF6Uyd1NJcz5KA8 4Pi+0ARQjDLQ4rWg4jJh9i1gdcbt3JH7FgnSwI8zvA8fe98chp6t49Mee2G3kCO2e8ai 4zN4hxh3M6erPaqZTMkZn90hrU8eQX2EKpEhMPRtxTdieoH8m/bNoWSTNVEOy3WhMkAY bA3+yktXTxAeZqnW5c1T2337PXizlSZurdTuKD7q40RHvf8Xoa/I7kvsE1QYb/ATl5XK ZcaFY1MFcmzlR25kAYtxeZTZPZXrR557JyOat/JGe/QkPkuK3ZYY2gItusFcckFDlm/k y1SQ== X-Gm-Message-State: APjAAAXEzDnPcRyWX1fpcRv8GWIksBpJWbRh4w/yqzhdNsJ92TbYk1jO TfiJyLRzQIDUP/3QfR3Oh/vjTkREeP4= X-Google-Smtp-Source: APXvYqyEwJJOVW2hz2VUB/DNREFo3F8VOWIcPF5M6lEuXu0Vox1qsZdV6xs7I2JbbHiOnvNR8GndvA== X-Received: by 2002:a37:f61e:: with SMTP id y30mr35697595qkj.208.1568215353073; Wed, 11 Sep 2019 08:22:33 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id t40sm12969388qta.36.2019.09.11.08.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2019 08:22:32 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id C9AB312099C; Wed, 11 Sep 2019 12:22:29 -0300 (-03) Date: Wed, 11 Sep 2019 12:22:29 -0300 From: Alvaro Herrera To: Vincent Van Driessche Cc: Tom Lane , pgsql-bugs@lists.postgresql.org Subject: Re: Default collation changes leave indexes in invalid state Message-ID: <20190911152229.GA24006@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Sep-11, Vincent Van Driessche wrote: > If I understand it correctly you are saying: “If you run queries like this, you’d better know what you are doing”? > Is there a more supported way to change the default collation on PostgreSQL? I don't think there's a supported way to change the default collation on an existing database. You would have to dump and restore in order to achieve that cleanly. That would be my advice. Part of the reason that there isn't a way to do this is that it isn't a trivial change such as a single catalog update. If you want to use this hack, fine -- it's your database. However, as you noticed, you will also have to reindex many indexes (which? it's up to you to find out), and there likely are other changes that you need to do. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services