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 1hw8w8-0007HI-Ap for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Aug 2019 17:44:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hw8w6-0003BQ-7W for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Aug 2019 17:44:18 +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 1hw8w5-000383-SQ for pgsql-bugs@lists.postgresql.org; Fri, 09 Aug 2019 17:44:17 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hw8w2-0008Dm-LU for pgsql-bugs@lists.postgresql.org; Fri, 09 Aug 2019 17:44:17 +0000 Received: by mail-wr1-x442.google.com with SMTP id r3so5241800wrt.3 for ; Fri, 09 Aug 2019 10:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BeKKzDFJcL0Hf6FWX16LBDTXBJi+ZgtZlUIjOuPqrus=; b=BzQowfEO6VpmRsOV+q3f1Nb+7l/R1T5lwswnlKLsFv4pPxqYPrm+snHg4aft/8LAwv G8EncAqUG/iex6Uvzfff5gB+me08HuVNbwI44k9kzw/1o4yGwNec6tmE4qqi9vO/OxRo s8IGv8JIlu1ODy2opD5ATBi+XOUW17ZOy4IEMpiX8+b8quwf/Ily8mYwBVryHIvBiV9W 8NCjZ30h36+Efh4z5H1nyibBVz2VT6HMWYF7okOoTE7lDCCZ5gabi+dn/hpvZmWueOoS InzlSxd6eHl5G52DXDUXqRnDc9j7mg1tUBFb9SK/sdQcBCV+Ox545WufmHXYPcjteS55 RCdA== 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=BeKKzDFJcL0Hf6FWX16LBDTXBJi+ZgtZlUIjOuPqrus=; b=ePt6ynXbRnjMrvf9VYp4oMRByvJt5d1WbvUjY0n2ragcdIPGPbjBBxpJkUn6NeX2HL rWNMGanRVtKIbL8TTenrRkAH+8kUT6/NRGOK7mH0/Bc/c8CW8ZX5UivYJJsxrrAH7g93 DbFCKqwgIhd9zNWPN+bQRQpVcxcYBjXJRbVA4kYgcxVaM2fSA4cVpGLvn2moe5OUs/pQ 6On6LY/mszHtfj2/JWmH0gjL09mCMhnmki/hp5A7K6KqUXnUqH8ywb5rlwHO7MsIbnSK NPAkbODKZSvBrJvM9ZMaurZ4blUWMSk7aYKGFKNxxg9sFAwhjmPAio2TyOn8N2z8L/h0 xP6A== X-Gm-Message-State: APjAAAXQSZGWeiLrlDDgpBc6KMNGbUqk3IVM8+cg1OdKuKb1KAbhePYM T69+zcSiXaJgR/QT5St4+WS9QktXXsw5xBczgB8= X-Google-Smtp-Source: APXvYqz43Y5VCIBHoek1/MnAEkoouLBxcAkqLMBdaOjYrJ5eMfj55wvZflBn4mJg4fXlAAKkBaE5Yt8Rjs6sJNCrum4= X-Received: by 2002:a5d:490a:: with SMTP id x10mr21383019wrq.152.1565372652161; Fri, 09 Aug 2019 10:44:12 -0700 (PDT) MIME-Version: 1.0 References: <9726.1565369142@sss.pgh.pa.us> <7929.1565371313@sss.pgh.pa.us> In-Reply-To: From: =?UTF-8?Q?Piotr_W=C5=82odarczyk?= Date: Fri, 9 Aug 2019 19:44:00 +0200 Message-ID: Subject: Re: Recovery mode with partitioned tables and ANY(NULL) in WHERE clause To: Tom Lane Cc: pgsql-bugs@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000df9340058fb2b815" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000df9340058fb2b815 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I've checked your commit and let me ensue it's fulfill all cases. For example what with query like that: select * from coercepart where a =3D any(null); ? there is no casting to array of specified type. I'm not master in C but looking in source I believe that "if (array->const snull)" is enough. But for better check you can add that query (and similar) to tests/regress On Fri, Aug 9, 2019 at 7:23 PM Piotr W=C5=82odarczyk wrote: > Cool, thanks! > > pt., 9 sie 2019, 19:21 u=C5=BCytkownik Tom Lane napis= a=C5=82: > >> =3D?UTF-8?Q?Piotr_W=3DC5=3D82odarczyk?=3D = writes: >> > Can you tell me in which versions it'll be fixed? For me it's critical >> > situation because we can have some potentially dangerous places in >> > application. >> >> Unfortunately this just missed this week's releases, so it'll be the >> next quarterly releases in November. >> >> If you're sufficiently worried about it you could apply the patch locall= y. >> It's pretty trivial: >> >> >> https://git.postgresql.org/pg/commitdiff/2f729d83226705d1149419a2aef7c16= 78fe641ec >> >> regards, tom lane >> > --=20 Pozdrawiam Piotr W=C5=82odarczyk --000000000000df9340058fb2b815 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I've checked your commit and le= t me ensue it's fulfill all cases. For=C2=A0example what with query lik= e that:=C2=A0select * from coercepart where a =3D any(null); ? there is no = casting to array of specified type. I'm not master in C but looking in = source I believe that "if (array->const snull)" is enough. But= for better check you can add that query (and similar) to tests/regress



On Fri, Aug 9, 2019 at 7:23 PM Piotr W=C5= =82odarczyk <piotrwlodarc= zyk89@gmail.com> wrote:
Cool, thanks!=C2=A0

pt., 9 sie 2019, 19:21 u=C5=BCytkownik Tom L= ane <tgl@sss.pgh.= pa.us> napisa=C5=82:
=3D?UTF-8?Q?Piotr_W=3DC5=3D82odarczyk?=3D <piotrwlo= darczyk89@gmail.com> writes:
> Can you tell me in which versions it'll be fixed? For me it's = critical
> situation because we can have some potentially dangerous places in
> application.

Unfortunately this just missed this week's releases, so it'll be th= e
next quarterly releases in November.

If you're sufficiently worried about it you could apply the patch local= ly.
It's pretty trivial:

https://= git.postgresql.org/pg/commitdiff/2f729d83226705d1149419a2aef7c1678fe641ec

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane


--

Pozdrawiam
Piotr W=C5=82odarc= zyk
--000000000000df9340058fb2b815--