Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdx9d-0005Ht-Ew for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2020 15:07:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kdx9c-00010b-CO for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2020 15:07:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdx9c-00010U-6g for pgsql-bugs@lists.postgresql.org; Sat, 14 Nov 2020 15:07:52 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kdx9Z-0005Kz-Vc for pgsql-bugs@lists.postgresql.org; Sat, 14 Nov 2020 15:07:51 +0000 Received: by mail-lf1-x135.google.com with SMTP id j205so18475227lfj.6 for ; Sat, 14 Nov 2020 07:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i0IDmwnnlWnrM92VBkC/KFptCCP4HlwNdtMDsvp+cPE=; b=NPy3mZPAHkl5K92su/ct2chlaf5rT88uUH/UZJrRCsKSXQrYvcon0YvRXauHeZV3/C 6Xh9o82DDvbw9pMuEIVmdwCgU5iOclDaOrNkXtgx9DfUxd4tL8s157VEUMD01/964R8w I9YJsGkfRnPhISoeKIG5GMseWrcxLDkpyAT5+xpYn5vBoukwhDuNB/IH2lgxsz5Etcx7 f8NPr2InJc6s5WBNX0t5MbKMEwYdKiFOow8sqs91NFZyCFc8MaWoY7aHuDNunMWgXL+U UUPuoeYeBOQKWkWAvgT8VPbCQAcB2HEVJbfF4QUGGDOTCMJQDbi/K7BFlt2orZkdiFuJ TQZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i0IDmwnnlWnrM92VBkC/KFptCCP4HlwNdtMDsvp+cPE=; b=raVYlYOad7z8psWX9b+Lrp1bfGJXoIoK9N2yr1xwnOa+TY+dFWmKUaVardSFlcTDpc hrulbu4gZugfXE6IhJ/GHeb7iYH+96sGLkSAcqOV86su0w7f2IxFBoS54G5ZQmk5XTHO lHEO/DYgtIOli0aTf0kXaRjgbLjEB0BH2iMyobDZSqEsRo8dgg2NopSWF3BPp6E+fl/U jfqicRQ/yAXqpManGadq6NpyT4ar2R6wANJxv4HMniM/EmMlyRDw0INY3d6f3jtQ206z +B68jcdqsVsbIRsi9eP3mN8biypBxdKHxJcCGemMGY/Kg+PeUn24e3vrvk1r0bWRMiea 42dg== X-Gm-Message-State: AOAM532PMH0J31+lsTGECWa5UIa/o3gruEB641MquFeDoyhGIac8XVlm /YATbbpkk4xdg4pPF72HWlLZuIfjy9dmxrw8mqHZoHzlGz0= X-Google-Smtp-Source: ABdhPJwJzVnBz+WQxgr0hlamMIojobV12chIMzK1kucWvQiltFgqCvYpdnpGy9TEZv8HIcYoL7U9H8kMqE/uiOmkhVQ= X-Received: by 2002:a19:8087:: with SMTP id b129mr2537270lfd.155.1605366468327; Sat, 14 Nov 2020 07:07:48 -0800 (PST) MIME-Version: 1.0 References: <9bd869ddbddc71721de1d9d6a2710a1cfec5e98b.camel@gmail.com> <9da8208c61333d155a7328b107f75b85a0bf832e.camel@gmail.com> In-Reply-To: <9da8208c61333d155a7328b107f75b85a0bf832e.camel@gmail.com> From: Magnus Hagander Date: Sat, 14 Nov 2020 16:07:36 +0100 Message-ID: Subject: Re: PG 9.6.20 -- query misbehaves in replica To: =?UTF-8?Q?Ernesto_Hern=C3=A1ndez=2DNovich?= Cc: PostgreSQL mailing lists Content-Type: multipart/alternative; boundary="00000000000014559c05b412823c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000014559c05b412823c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Nov 14, 2020 at 1:10 AM Ernesto Hern=C3=A1ndez-Novich wrote: > On Sat, 2020-11-14 at 00:59 +0100, Magnus Hagander wrote: > > On Sat, Nov 14, 2020 at 12:17 AM Ernesto Hern=C3=A1ndez-Novich < > > emhnemhn@gmail.com> wrote: > [...] > > > After updating from 9.6.19 to 9.6.20, we noticed the query was not > > > working on D. > [...] > > > Looks like a the 9.6.20 over Debian 10 is the culprit, but I have > > > nothing else to work on. > > > > These issues are almost certainly because of the glibc locale changes > > between Debian 9 and Debian 10, and not because of the PostgreSQL > > upgrade. > > > > If you have master and standby on different glibc versions (so debian > > 9 vs 10), all text based indexes can behave differently. All the > > nodes must run the same version for this to work. So in this > > scenario, you need to reinstall B and D with debian 9, or you need to > > upgrade your other nodes to debian 10 (and if you do that, then you > > have to reindex the master node once it has been upgraded). > > I agree on the locale matching and will try your suggestion. > > I must say the Debian 10 machines were working just fine with PG 9.6.19 > for over two months or so. We noticed the issue *just* this week after > upgrading from 9.6.19 onto 9.6.20. > Most likely they weren't, but they looked like they were. It could be that the problem wasn't triggered until now, but it could also be that it "sometimes worked and sometimes didn't", and you just didn't notice -- I've come across several installations that had exactly that problem. --=20 Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ --00000000000014559c05b412823c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Nov 14, 2020 at 1:10 AM Ernes= to Hern=C3=A1ndez-Novich <emhnemhn= @gmail.com> wrote:
On Sat, 2020-11-14 at 00:59 +0100, Magnus Hagander wrote:
> On Sat, Nov 14, 2020 at 12:17 AM Ernesto Hern=C3=A1ndez-Novich < > emhnemhn@gmail= .com> wrote:
[...]
> > After updating from 9.6.19 to 9.6.20, we noticed the query was no= t
> > working on D.
[...]
> > Looks like a the 9.6.20 over Debian 10 is the culprit, but I have=
> > nothing else to work on.
>
> These issues are almost certainly because of the glibc locale changes<= br> > between Debian 9 and Debian 10, and not because of the PostgreSQL
> upgrade.
>
> If you have master and standby on different glibc versions (so debian<= br> > 9 vs 10), all text based indexes can behave differently. All the
> nodes must run the same version for this to work. So in this
> scenario, you need to reinstall B and D with debian 9, or you need to<= br> > upgrade your other nodes to debian 10 (and if you do that, then you > have to reindex the master node once it has been upgraded).

I agree on the locale matching and will try your suggestion.

I must say the Debian 10 machines were working just fine with PG 9.6.19
for over two months or so. We noticed the issue *just* this week after
upgrading from 9.6.19 onto 9.6.20.

Most= likely they weren't, but they looked like they were. It could be that = the problem wasn't triggered until now, but it could also be that it &q= uot;sometimes worked and sometimes didn't", and you just didn'= t notice -- I've come across several installations that had exactly tha= t problem.
=C2=A0
--
=C2=A0Magnus Hagander
=C2=A0Me: https://www.hagander.net= /
=C2=A0Work: https://www.redpill-linpro.com/
--00000000000014559c05b412823c--