Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vtO9R-003i3s-0v for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Feb 2026 10:54:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vtO9P-007b65-1r for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Feb 2026 10:54:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vtO9P-007b5w-0Z for pgsql-bugs@lists.postgresql.org; Fri, 20 Feb 2026 10:54:23 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vtO9L-00000000LvL-0Ssb for pgsql-bugs@lists.postgresql.org; Fri, 20 Feb 2026 10:54:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1771584856; bh=LHYhNGeXkG0Tu9VqiNhTcfEm8BggT7NIkwc89WQFgPk=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=affhpUG/StHzJ0+cjtcKLcnJFcS3z/aoT59AEPPKADMOMVzJRW1SenxfoYzXwe7rZ 2SD1aL3eO/7Ped+gGsEwYmWGHYOMGUBlYlY1MHet5TUcAvnZ8AlOmOaJbPvq1jvYtO qWqS2wtHLdpQrPcYpssbBnDM4K1tVovdxqd9pArvKrGGKCXI45MNL6w4sGBPd/VvuZ 6nmBUCzWp65JOyN3NhIYcQ88SvL3X6dyvzW1IDa5KPOEgiQ0l2J7xbUyJsu+FZwWbr yUxeRhXFlD43uiDiRZ+uvL1II9X6P2rcDgJ3UBJJb2Vo1k+zrNIcNsATcbde0hU+Ho ynpNT8Hntmz0Q== Received: from [172.30.49.190] (debian11-template.l.postgrespro.ru [192.168.2.254]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: s.shinderuk@postgrespro.ru) by mail.postgrespro.ru (Postfix/465) with ESMTPSA id 8219860D33; Fri, 20 Feb 2026 13:54:16 +0300 (MSK) Message-ID: <96b4135a-1b32-4c05-91f5-61c5e2559f73@postgrespro.ru> Date: Fri, 20 Feb 2026 13:54:10 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BUG #19412: Wrong query result with not null constraint To: Richard Guo Cc: pgsql-bugs@lists.postgresql.org, David Rowley , Tom Lane References: <19412-1d0318089b86859e@postgresql.org> <60be6cb1-10de-4e24-82ce-b02650442d97@postgrespro.ru> <2663915.1771525548@sss.pgh.pa.us> Content-Language: en-US From: Sergey Shinderuk In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-KSMG-AntiPhishing: NotDetected, bases: 2026/02/20 10:17:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2026/02/20 10:11:00 #28207657 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/20/26 12:57, Richard Guo wrote: > ... and then pushed and back-patched to v16. Thank you! > Thank you, Sergey, for the report and the excellent self-contained > repro query. This is a great catch. (I'm curious how you found this > bug -- was it from a production query or a fuzzing tool?) The bug was encountered by our customer upgrading to v17 and my colleague passed this repro to me. -- Sergey Shinderuk https://postgrespro.com/