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 1o7GSb-0003Di-Mz for pgsql-performance@arkaria.postgresql.org; Fri, 01 Jul 2022 13:13:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o7GSZ-0006Q7-T8 for pgsql-performance@arkaria.postgresql.org; Fri, 01 Jul 2022 13:13:23 +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 1o7GSZ-0006Px-G4 for pgsql-performance@lists.postgresql.org; Fri, 01 Jul 2022 13:13:23 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o7GSR-0004AS-98 for pgsql-performance@lists.postgresql.org; Fri, 01 Jul 2022 13:13:22 +0000 Received: by mail-qt1-x832.google.com with SMTP id z13so355997qts.12 for ; Fri, 01 Jul 2022 06:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qo8iN5zRDgenapCB9f/P1juaj+jcmnswUQMkJrXmyfg=; b=sn9z2NQ/nEB5gSXc2f6xgDzFiPntxX4le2OmX3mq3pNZIz6zenlSGaUVMtu4UQGe99 cyUfmxJCnV8aqdnQEP2U3t97j72evhnGuG60GubWWQqCaYCHHWZz+IMwYqUYbPtb3FDo +ED6jym0Sw/yJn7g5QluCfLMSzlqlHyMktWQo3/ojTeKpIRLhYtHY9z8ByAaG6Y+Fgzk XhL30iAInWQkdljxhhbXDn7lCfxTvwcxXzkBvnWed+duppcFeiGxre6bUP2bsF+LLlM0 9Ribh5Zv8a4ikyr55k52m9Ha8kMqDbFsf3YABojqpAG4oMdp4IcklAl0SOLQDG8nnL68 HEIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qo8iN5zRDgenapCB9f/P1juaj+jcmnswUQMkJrXmyfg=; b=KuG4DiemerJH0FWo8mdP+mXa7BagTV5bOPqYYXmOgC3oWc2yLgOP3owe9/0qXZjMWn 861lSXt71FTEe+l1bGm02lXgsWLLM3OWE57J+NYHdAKWnSMf0+FQPgRDnKsAZoR/19yZ 2sdiIEwNP0CmE4Q7b50zH3DjlkqRB5Ej/Qw+oIwmsYC6Mvua4tpV8N/5KtnNFB7CLAru Iux3VK+59uJ95CqD9l5MMucr3lWxdbFpGcloYm3IMgGNAc3L7RcFrRva8PhwWVqTZTGu sMI9wMCGyh8XAVN0xpXuyj0IhIT8EsyY2R8kaBqrjC/ugIa3YuzwrMTBSz+45VMs4TSE IRUA== X-Gm-Message-State: AJIora+VW02SGHrfMuEPC/kFQwGszgWJAgRVuz1SmGH5ONaxCoixroNR l0bIjp2wEXdws2A5706qLM7zkw== X-Google-Smtp-Source: AGRyM1vbs2qQmClLhF73L+o5phkkv0TlPatF7sNbS/jMmJMKvjh6wQtCsnEgJORYI2J//JMru2pUcA== X-Received: by 2002:ac8:57c9:0:b0:31d:2a1d:d149 with SMTP id w9-20020ac857c9000000b0031d2a1dd149mr9184588qta.573.1656681193367; Fri, 01 Jul 2022 06:13:13 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id y7-20020a37f607000000b006a75e8d920bsm3394420qkj.88.2022.07.01.06.13.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jul 2022 06:13:12 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id A6936801493; Fri, 1 Jul 2022 08:13:11 -0500 (CDT) Date: Fri, 1 Jul 2022 08:13:11 -0500 From: Justin Pryzby To: "James Pang (chaolpan)" Cc: Tom Lane , pgsql-performance@lists.postgresql.org Subject: Re: partition pruning only works for select but update Message-ID: <20220701131311.GC13040@telsasoft.com> References: <2391513.1656423000@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jul 01, 2022 at 08:30:40AM +0000, James Pang (chaolpan) wrote: > We have other application depend on V13, possible to backport code changes to V13 as https://git.postgresql.org/gitweb/?p=postgresql.git;a=patch;h=86dc90056dfdbd9d1b891718d2e5614e3e432f35 Do you mean that the other application needs to be updated to work with v14? Or that you haven't checked yet if they work with v14? In any case, I'm sure the feature won't be backpatched to v13 - it's an improvement but not a bugfix. -- Justin > -----Original Message----- > From: Tom Lane > Sent: Tuesday, June 28, 2022 9:30 PM > To: James Pang (chaolpan) > Cc: pgsql-performance@lists.postgresql.org > Subject: Re: partition pruning only works for select but update > > "James Pang (chaolpan)" writes: > > But when > > Explain update table set .. where partitionkey between to_timestamp() and to_timestamp(); > > It still show all of partitions with update ... > > In releases before v14, partition pruning is far stupider for UPDATE (and DELETE) than it is for SELECT.