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 1qC0ev-00059k-Cr for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jun 2023 16:26:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qC0et-0006Xm-Om for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jun 2023 16:26:15 +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 1qC0et-0006WW-DN for pgsql-hackers@lists.postgresql.org; Wed, 21 Jun 2023 16:26:15 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qC0eq-003SgL-Ro for pgsql-hackers@postgresql.org; Wed, 21 Jun 2023 16:26:13 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6685421cdb3so2950511b3a.1 for ; Wed, 21 Jun 2023 09:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20221208.gappssmtp.com; s=20221208; t=1687364772; x=1689956772; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=WgfU/d9rsmQXNRL0Xi0cb4mmry9Fi/crh4rGOpgJmOU=; b=XS9OP0sDPS6PXtTrmPV+xOHKRM0fZx2rh6fSmB6Jg6iJCfsKC5MXQfXi8W/l7Yck1n SEfKRIvkRzBDB241IxL+8uLBJj3p12HWYvuTT5mo2JuCizQsdDi9T3gMOos+9O5xKl7e BIGzXNOoXwDFFZE261bEZDtYv214atr/DRI2UOZmAnMsMpJc5SyA4qTbmVHDtSa1DHQW OsvwMccJZJSL0uwUDXn2qlZ5kGy3Q+3mDPXoGB5xWwMq4I7lmz6CRb8pFBVGb0VNkKmM 17dXnqo/3Z6AcY2jZ8Uxlxz0cqLZZfgbL96YWuNQntiMlvm5RKJ/4DIuRUo+7/HaXMF3 Lm0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687364772; x=1689956772; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WgfU/d9rsmQXNRL0Xi0cb4mmry9Fi/crh4rGOpgJmOU=; b=YtuoAveQApHlmq0lsdSGAPcPkXpSO5I68uwMbIicKs/3UeyHKPu6T4yE6TF4Ke97K/ 6iFzmJ9EFaz98KTaqh5Zh//yDt82xwAw+ovqg6hyQfAQ0UAiOvqW21zJjMtlRAzox8+h d/iQf3bw1Fodyt26sVvHcOqRO4nbsnF0Rc9/64ekn5SjcaPepyLfirspIrNcq+0OBW0h KlLa3GTiaZGRv/wFsCIB4wB3b1Ue/Gu9su57ng3RqkcMhTM3E+DAb42rE6GiPmiuz7Eo 7feIubsQey96jNvRlPjn4nVJBeL28L1oQl7hlQLXtMULYDXElAWlZrf6AVquhA4Z+eXF 8muA== X-Gm-Message-State: AC+VfDweEa8Vh4vgHZ6gV4CVSRt/k/hWfcisqdiGWx1ZA0soURkmRJkO lRn0dLh02mEZ09NbxkOCRcezqg== X-Google-Smtp-Source: ACHHUZ6xJMxmmkRvHuXPza5Q88HcvTt7QWip3AmEwNQAt8ezQj/E226ehRZf+GuGm72s39a5gE5JmA== X-Received: by 2002:a05:6a20:7d8b:b0:122:570f:db1b with SMTP id v11-20020a056a207d8b00b00122570fdb1bmr10016660pzj.17.1687364771826; Wed, 21 Jun 2023 09:26:11 -0700 (PDT) Received: from jeff-laptop.lan (c-73-170-46-202.hsd1.ca.comcast.net. [73.170.46.202]) by smtp.gmail.com with ESMTPSA id k10-20020aa790ca000000b006661562429fsm3212008pfk.97.2023.06.21.09.26.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 09:26:11 -0700 (PDT) Message-ID: Subject: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX From: Jeff Davis To: Michael Paquier Cc: Nathan Bossart , Ted Yu , Pavel Luzanov , Justin Pryzby , pgsql-hackers@postgresql.org Date: Wed, 21 Jun 2023 09:26:09 -0700 In-Reply-To: References: <20230613211246.GA219055@nathanxps13> <20230613235442.GA222795@nathanxps13> <20230614181711.GA488295@nathanxps13> <20230615041044.GA736001@nathanxps13> <20230615235700.GA877311@nathanxps13> <20230616052025.GA1026700@nathanxps13> <20230619215534.GA442477@nathanxps13> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2023-06-21 at 07:53 +0900, Michael Paquier wrote: > I am not sure to understand this last sentence.=C2=A0 REINDEX on a > partitioned table builds a list of the indexes to work on in the > first > transaction processing the command in ReindexPartitions(), and there > is no need to process partitioned indexes as these have no storage, > so > your suggestion is a no-op? What I meant is that if you do: CREATE TABLE p(i INT, j INT) PARTITION BY RANGE (i); CREATE TABLE p0 PARTITION OF p FOR VALUES FROM (00) TO (10); CREATE TABLE p1 PARTITION OF p FOR VALUES FROM (10) TO (20); CREATE INDEX p_idx ON p (i); CREATE INDEX special_idx ON p0 (j); GRANT MAINTAIN ON p TO foo; \c - foo REINDEX TABLE p; That would reindex p0_i_idx and p1_i_idx, but skip special_idx. That might be too confusing, but feels a bit more consistent permissions- wise. Regards, Jeff Davis