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 1k5jJN-0006Y1-EP for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2020 05:28:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5jJL-0002nA-0G for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2020 05:28:27 +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 1k5jJK-0002n3-LB for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2020 05:28:26 +0000 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k5jJH-0007Ao-So for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2020 05:28:25 +0000 Received: by mail-io1-xd41.google.com with SMTP id g19so1303389ioh.8 for ; Tue, 11 Aug 2020 22:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JHjw2HpVr/5+oPXgC5bAf0Y/bDPtx8py8Dx+fnaLju4=; b=GOh/9A/ohoMHMaYBH1694nNsZq4kftgzHjSXdo3k8wfiLLqojXPPmsuCmz2przTDNj 34Z9r/pIrsXJnFtq/rMw+Da0OMCCFaO85mStrgD0mT+OWXyPohvTiT57ovGEDXMjnh3F GHtzzJaTA4ZGH19ba8hLCLy9/DG7y4Lhugo3XJ/A4C1NJbJJcpt0tKbBnICJnNJ6A70P 37/ofh6ib67nPZrQ7WhzdUB+mKGHoM9a1l5nl0aYABrPIsmpUcdbyqf5/JXuN0pfbzxh wLooTFkAzFEzPLOdaVALXcObJ/2cyiYf00Riv2qPFQTFGFSqlW2P+0iSkDXtutj8mFun lCww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JHjw2HpVr/5+oPXgC5bAf0Y/bDPtx8py8Dx+fnaLju4=; b=dm6iw/DPPj81THCMQWFkLhVnb0ICeJwfq0xmOgW3pX3ZiBmNnJKDk9rrP0tz2VZQSg A7H/b4edpF1K9S/CFn0u2mlk4JvuDXw+eMZqvz2OjbvrxLL/4XJrmDZci5ZJNkMC8XW4 vG/pz/ZeHmhVmVJCjkFPMIdmb8xOYcks5RrMPfkRInrLQIXuSM9T5jysTWrPS2O07Q1W CCorQheLWuLMcIaZKqupk70Ff4b8vL3oZvoslijoOLVV6tk+fYZ0jjRDog9rkFb1VGd4 xZfBO1zVoeJdpkUo5BBFXu8+imLhBg5RY3MkJqx4gCGMvrCu+Bu97d/XAeZqzCG1TqRc z6zw== X-Gm-Message-State: AOAM53261V+XvNDlnJdLekK5Tqfm5rlltQIPN6SKjOPqtOsHcI5Og0Zk P5mHd/nQStXQ7AU4fUeQpqYcEw== X-Google-Smtp-Source: ABdhPJzM1dgm84rtgoSbnBu0wk/tfZIcYAOdz0+wgINM05kQ2bCb6LFDthAnH7B0jOu6JrdYixGEeA== X-Received: by 2002:a5d:9755:: with SMTP id c21mr26271264ioo.69.1597210102810; Tue, 11 Aug 2020 22:28:22 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id t9sm324728ilo.20.2020.08.11.22.28.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2020 22:28:22 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 10E3480090D; Wed, 12 Aug 2020 00:28:21 -0500 (CDT) Date: Wed, 12 Aug 2020 00:28:20 -0500 From: Justin Pryzby To: Michael Paquier Cc: =?utf-8?B?5p2O5p2wKOaFjui/vSk=?= , pgsql-hackers , =?utf-8?B?5pu+5paH5peMKOS5ieS7jik=?= , Alvaro Herrera Subject: Re: =?utf-8?B?5Zue5aSN77yaaG8=?= =?utf-8?Q?w?= to create index concurrently on partitioned table Message-ID: <20200812052820.GW20473@telsasoft.com> References: <20200618024114.GF118592@paquier.xyz> <20200616010221.GA2353@paquier.xyz> <20200615123742.GL52676@paquier.xyz> <20200808063744.GG20473@telsasoft.com> <20200809050009.GA17986@paquier.xyz> <20200809234423.GH20473@telsasoft.com> <20200812045438.GA11663@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200812045438.GA11663@paquier.xyz> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thanks for helping with this. On Wed, Aug 12, 2020 at 01:54:38PM +0900, Michael Paquier wrote: > +++ b/src/backend/catalog/index.c > @@ -3661,20 +3662,12 @@ reindex_relation(Oid relid, int flags, int options) > + elog(ERROR, "unsupported relation kind for relation \"%s\"", > + RelationGetRelationName(rel)); I guess it should show the relkind(%c) in the message, like these: src/backend/commands/tablecmds.c: elog(ERROR, "unexpected relkind: %d", (int) relkind); src/backend/tcop/utility.c: elog(ERROR, "unexpected relkind \"%c\" on partition \"%s\"", ISTM reindex_index is missing that, too: 8b08f7d4820fd7a8ef6152a9dd8c6e3cb01e5f99 + if (iRel->rd_rel->relkind == RELKIND_PARTITIONED_INDEX) + elog(ERROR, "unsupported relation kind for index \"%s\"", + RelationGetRelationName(iRel)); > diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml > @@ -259,8 +263,12 @@ REINDEX [ ( option [, ...] ) ] { IN > > > > - Reindexing partitioned tables or partitioned indexes is not supported. > - Each individual partition can be reindexed separately instead. > + Reindexing partitioned indexes or partitioned tables is supported > + with respectively REINDEX INDEX or > + REINDEX TABLE. Should say "..with REINDEX INDEX or REINDEX TABLE, respectively". > + Each partition of the partitioned > + relation defined is rebuilt in its own transaction. => Each partition of the specified partitioned relation is reindexed in a separate transaction. -- Justin