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 1srkjB-004E5u-Ej for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Sep 2024 20:59:46 +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 1srkj7-00Ca6W-LO for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Sep 2024 20:59:42 +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 1srkj7-00Ca6J-AQ for pgsql-bugs@lists.postgresql.org; Fri, 20 Sep 2024 20:59:42 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1srkj1-000EXJ-MP for pgsql-bugs@lists.postgresql.org; Fri, 20 Sep 2024 20:59:41 +0000 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-82aa93774ceso111095539f.0 for ; Fri, 20 Sep 2024 13:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726865975; x=1727470775; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sXBsVPwlKmwm065vdynx2spvj+TScv5eK8tzaLXGY/k=; b=O/1u1Y8vBDF2+TAnNU7rK4qJP0B2rg2hAU+ZS0DTuiwSBJWRSxhuoPzn/REh8QxFEC 0+gfCIUxiq2yTtuCg+t9fupOZIhFgS2UZPrYa4ds57dtAcQOBi1Jhz0UC4hlmtraEXWv 8QwcCMYGam5CNd5edWZT9K9qMpMXZsqcLmK4crDB4ddY+gWB3GFG3XDt2+TMJfJAsiLh dThKNGUlRHfPeh8qlE1cZBPsbj2GcKlbBFcx3vZ4ovDps2p55HJHeDcXn0HBzIxAsiVS +JSq/ioFWrZBiJr1V1/Fy711yUd/38zqeNh8eSUCsIDEsShctlRuUNTT/GsraQUpdcGK JsbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726865975; x=1727470775; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sXBsVPwlKmwm065vdynx2spvj+TScv5eK8tzaLXGY/k=; b=m0LmZXZOj7RGX06+6xXd/4yg/gj+LObfqwmcDK5kHx3sR6YMZCT25yLOiCteQijwM6 ulEUcwSTYH2f8pHqhC69UJhEoqMD2Bt9OsO2oliSYoB6Mq5Dr29F3aHte0tLeXWG1qD/ DiipBbp8Ppe+qmFskilHg4J0HDPCNPC0MzRsBnqalKENsGfUv55At5PQUbklWuCAq5Dl GM8iw191Cl2byK0edoSSUwQ3xT6GDv9nzyRM1sgTQnSI9eQ3C11/MJftoJZkqctJbLz0 RJ5ETofssEMm1r+/v3dQXZq0TwFBtzNMtPbTH2m3PKfOo07m7L2AK6vq3rzrgKuW9gFi H8JA== X-Forwarded-Encrypted: i=1; AJvYcCUmQtuCDFQfGMwDK4brkETVi5zAxDNLcniXtNCG4UbWs4EF7+lNem5SopG5Zw+wLJgLxyJwQt0QjFhs@lists.postgresql.org X-Gm-Message-State: AOJu0Yxpjznat5UUQKIAx3rv6p4tZdw9oQsEyl7+IvOMdhPFdbHoaRbu 7GalD78+dq9OdOP2YG++yeVZvPPbeJ96FROLv6gT+Qhfib201tcM X-Google-Smtp-Source: AGHT+IGuiPw3uNYBUPSC53fGJtNTkscWF21A3KXuVWxbUjU6gEpeYBUZ+6bq1ijvsAAEkzzecTOcEw== X-Received: by 2002:a05:6e02:1543:b0:3a0:b5d4:1fb7 with SMTP id e9e14a558f8ab-3a0c9d1a85emr36833355ab.11.1726865974662; Fri, 20 Sep 2024 13:59:34 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3a092e719basm44276985ab.63.2024.09.20.13.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 13:59:33 -0700 (PDT) Date: Fri, 20 Sep 2024 15:59:32 -0500 From: Nathan Bossart To: Noah Misch Cc: vaibhave postgres , pgsql-bugs@lists.postgresql.org, vsekar@microsoft.com Subject: Re: vacuumdb: permission denied for schema "pg_temp_7" Message-ID: References: <20240920190731.37.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240920190731.37.nmisch@google.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Sep 20, 2024 at 12:07:31PM -0700, Noah Misch wrote: > v12 introduced this regression. I suspect it started when commit e0c2933 "Use > catalog query to discover tables to process in vacuumdb" switched vacuumdb > from a simple "VACUUM;" command to per-table commands. Non-superuser vacuumdb > must be rare indeed for this to go unnoticed long enough to leave all > supported branches affected. I think the bug actually predates that commit, but it was only broken when --jobs > 1. Commit e0c2933 just broke the --jobs == 1 case, too. > That helps, but we'd probably want to do something more general about vacuumdb > and schema USAGE permission. Hm. I think filtering out schemas for which you lack USAGE makes sense when neither --schema nor --table are specified, but if the user lists an object they can't vacuum, we should probably fail. My current thinking is that we could still filter when --exclude-schema is used, but I'm curious what others think. You might also be interested in this thread about VACUUM and USAGE [0]. > Thanks for the report. +1 [0] https://postgr.es/m/flat/56596b81-088f-4c0c-9a88-b5f27a7a62e9%40oss.nttdata.com -- nathan