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 1pZHQu-0004zV-QF for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Mar 2023 20:27:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZHQs-0001zE-FQ for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Mar 2023 20:27:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZHQs-0001z5-2m for pgsql-hackers@lists.postgresql.org; Mon, 06 Mar 2023 20:27:42 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZHQp-0004OO-I8 for pgsql-hackers@postgresql.org; Mon, 06 Mar 2023 20:27:41 +0000 Received: by mail-pl1-x634.google.com with SMTP id i3so11794461plg.6 for ; Mon, 06 Mar 2023 12:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678134456; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SiyCrCDO0YM0LVI+NAcsFu+/fK00ZzMHEhLh6Punitk=; b=bZTJf37kc1JJO6zo1zBt1YXe1YUzH2/W2uunIZz8sG/oIFuezIivtZhn91z5G1PO37 t7nJoUcYksJl0bTbYQ8hZnRAqt4MFRRLrwjyM+Gebj9Xn1DhI+dGWuW8PfhqA6k4KOuP 7XEN8l3+BSRAXLXgyIkL+L/I3IAp7WhgG8CLJUAj1PzLelqUYaAuWrJSl1R2yIrh0bTx mnvuXWomdrvxesYZtZTgmrKMmAPartpeT9MUycC3dglY2xAVuRu9RXUGx1dIv5RIkEn4 L8MjrSJp2DgPESaYJgMUXepkTkCZU7gx2ZA3a/rflpVh5GB0RcY5tSKDWfYRQliqunSk jLjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678134456; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SiyCrCDO0YM0LVI+NAcsFu+/fK00ZzMHEhLh6Punitk=; b=eXThPt21rhUhxMTm6sZrrTZ4eGzUjhyFUDEKakXftpM5/Z1ZdGAXaWDNXf3HUDEnab sgDF8RTF+8nQOqbBbWLxyA6g4rhBstjHJ7JmMYEMBG1XBoQXsMpHfNiDfUFyi6alQaim M3Qn3QVNO5wzcrMrE05DPLAstRFt4rq1GL103M+31Fk8pkJpiK4I91RmAIU2zyRDefHG JZbnkatTqzUtCZ3TlBkFUfsz0/8umi6aOOmjfx1RGKXE3syaUqlIOvDmlE01xg7uLIp/ C++Br1pZPYb4Vup0EQCUlIpqQLUwZXs+voTYWnqZ4yyIWVPxTi7yGGpzosRNLS2T7nt7 1aCA== X-Gm-Message-State: AO0yUKVqRN0HGefVn3WKOrmEOGNJoIs2Dxor7QJxK5c+lTsre/YeLLCY 57IS4N9LlOLgB5aJ2ZTEiac= X-Google-Smtp-Source: AK7set8Ft6ZdsxYhj0H9vl8v+JNiklR8vAjcOO3w684RfV0fECU/RSTVkFJ1TGJOPmcrqDxzSx2Mww== X-Received: by 2002:a05:6a20:8f0c:b0:cd:1ccf:2485 with SMTP id b12-20020a056a208f0c00b000cd1ccf2485mr17480754pzk.16.1678134456617; Mon, 06 Mar 2023 12:27:36 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id m22-20020a63ed56000000b005036bbe6812sm6487019pgk.65.2023.03.06.12.27.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 12:27:36 -0800 (PST) Date: Mon, 6 Mar 2023 12:27:34 -0800 From: Nathan Bossart To: Michael Paquier , vignesh C , pgsql-hackers@postgresql.org Subject: Re: add PROCESS_MAIN to VACUUM Message-ID: <20230306202734.GA3033389@nathanxps13> References: <20230107050724.GA914213@nathanxps13> <20230119190807.GA4062411@nathanxps13> <20230301172637.GA1456203@nathanxps13> <20230302065359.GA2140777@nathanxps13> <20230306173723.GA2934573@nathanxps13> <20230306194009.5cn6sp3wjotd36nu@liskov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230306194009.5cn6sp3wjotd36nu@liskov> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 06, 2023 at 02:40:09PM -0500, Melanie Plageman wrote: > I noticed in vacuum_rel() in vacuum.c where table_relation_vacuum() is > called, 4211fbd84 changes the else into an else if [1]. I understand > after reading the commit and re-reading the code why that is now, but I > was initially confused. I was thinking it might be nice to have a > comment mentioning why there is no else case here (i.e. that the main > table relation will be vacuumed on the else if branch). This was a hack to avoid another level of indentation for that whole block of code, but based on your comment, it might be better to just surround this entire section with an "if (params->options & VACOPT_PROCESS_MAIN)" check. WDYT? -- Nathan Bossart Amazon Web Services: https://aws.amazon.com