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.94.2) (envelope-from ) id 1rcGMc-001qlp-4t for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Feb 2024 03:00:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rcGMa-000Zv3-Kg for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Feb 2024 03:00:08 +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.94.2) (envelope-from ) id 1rcGMa-000ZuP-C4 for pgsql-bugs@lists.postgresql.org; Tue, 20 Feb 2024 03:00:08 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rcGMX-007cRM-JC for pgsql-bugs@lists.postgresql.org; Tue, 20 Feb 2024 03:00:07 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5120ecfd75cso7560654e87.0 for ; Mon, 19 Feb 2024 19:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708398003; x=1709002803; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wMf0EoIKkrxLZyikiTVQYVS+hdQUcE7gtMSaRe78LHk=; b=gWNR3wo6zySY7KmiycxNf0JM0aQV5pXrcCQr72YS9PuZUL290G8tbhA7HkKXikxE2k hrlJtZQEC+V3FapqvUmiN3QqrzAYWMQoZh5igvIn9vh/2v+tb0w9hmnUmwB3p/Qco9ja je5VppLPIhMy/afRVoPglkIyO0hOorS9+Zdhvvr+YqFzBokXyLvHVt0ANBbCUoddgY7B SsnYvuwPF+crLhxt9uSEO01Pg4jHwh4Qzm3BzJy+h7lcWXVVjIJwdIKQOWwccHgD5AjG kM3FFw6SFTl4FPj7AsxA0Uc0/g48yOGatoiaffDny9yz5FpJ1vlar+t2n6prCWhixYfp y2cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708398003; x=1709002803; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wMf0EoIKkrxLZyikiTVQYVS+hdQUcE7gtMSaRe78LHk=; b=Kbc8Ftthh3XdVIXiBAb6p1NOUyB8apP5crvRm0svr/GAkJj41L42DjToIpoeKdanxj 7SVVRHw9IIbSiZCoAVyv7LtTIgftVN3MuVaZLH5Vs41Q1lECgIIMxUcdg8yxSO8dUxdL Dxli0t7IIojA2nTyXPIFst7hr5E6TBR6b1P7Ik6iTKfMxePMUZ4slORND844tiZZwxXo aOahaXvd0eHlh5iN6eZh/vpd58Ak3ysRIilPcV9gRPhDKNX5wnMUasjv4pvsry7DLMy2 gjqP3G2Qoq+MLhpeEhvq9AJZHZlFKt2dGkQYUDipO+T1mRWlraRrMo7kNASFNlbBoarj QMpA== X-Forwarded-Encrypted: i=1; AJvYcCWMyBHOd3xkvvWDaZc+B8HzAR7CYfieG3sSzBaPesNC2kWXfG+T6ynSyZAklLARScV9g7VxquCME9qG6lE6QyrBF6Xr4SxDajG7glbAY1rK X-Gm-Message-State: AOJu0YwQlygXtKTMVOrXzMLj0+ly0rH6ITaJZgWAtrv8WHGp8ONylEIT guqb/LOJiCgxMhVOItnBMsW1WFTMeYb+wpl7HER/65mpjktLk4lBUsAYS7ubKNo= X-Google-Smtp-Source: AGHT+IHxLj44jp+Zixcp8xp2A2p+Occ5Gc/o+lIPZhTf4BLxLxiKf933dBB5OnBJbZGZMUCXwot1CA== X-Received: by 2002:a19:2d04:0:b0:512:a77d:21b2 with SMTP id k4-20020a192d04000000b00512a77d21b2mr4533872lfj.62.1708398002840; Mon, 19 Feb 2024 19:00:02 -0800 (PST) Received: from [1.0.0.7] ([91.185.78.44]) by smtp.gmail.com with ESMTPSA id o6-20020ac24e86000000b00511a803d6easm1126911lfr.138.2024.02.19.19.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Feb 2024 19:00:02 -0800 (PST) Message-ID: <312fb507-9b5e-cf83-d8ed-cd0da72a902c@gmail.com> Date: Tue, 20 Feb 2024 06:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG #18344: Pruning tables partitioned by bool range fails with invalid strategy Content-Language: en-US To: David Rowley , Tom Lane Cc: Amit Langote , Alvaro Herrera , pgsql-bugs@lists.postgresql.org References: <18344-8d3f00bada6d09c6@postgresql.org> <3263261.1708014503@sss.pgh.pa.us> <3873394.1708273499@sss.pgh.pa.us> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello David, 19.02.2024 02:49, David Rowley wrote: > > Here's a more complete patch for this. I included some tests for LIST > and RANGE partitioned tables. I did manual testing for HASH, and was > on the fence about covering that too. > Thank you for the fix! Beside that, I'm a bit confused by the opstrategy description for get_matching_range_bounds(). Above that function we have:  * 'opstrategy' if non-zero must be a btree strategy number. But as we could see, zero opstrategy is not valid for the function (so "if non-zero" is meaningless here?), unlike opstrategy for get_matching_list_bounds(), which has the same description, but the latter function contains:     /* Special case handling of values coming from a <> operator clause. */     if (opstrategy == InvalidStrategy) ... Best regards, Alexander