Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jE3GJ-0003PP-SU for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2020 03:51:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jE3GI-000868-Mv for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2020 03:51:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jE3GI-000861-Af for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2020 03:51:26 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jE3GF-00076j-GS for pgsql-hackers@postgresql.org; Tue, 17 Mar 2020 03:51:24 +0000 Received: by mail-qt1-x830.google.com with SMTP id t13so16279953qtn.13 for ; Mon, 16 Mar 2020 20:51: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:mime-version:content-disposition :in-reply-to:user-agent; bh=kpTIzfk9pnpPyxbfUZ1Rmr6EmXpUUsGOfj4pZ0cVi18=; b=oyk9sKdFCM0GlA6B+MzCDDKBKtfYXQxegIKm1SmsI55CGRG3acDjtzyfh4jH3kZxQt k6hYhaWuzL9rl1c1oXQW62xDbBO7ue30guZd7tQ21CzpyKQJXNkpOK0FTzKpDTc3pMcR r0nTTDaLM2KMDqrVWqFPQVFkQcdsnJevtmN1BTryTxKC4OjK4NCkzWJ6q0TNK3dYQ3oO 7i6XIYuderVQQfbAtRPOw5Dfa3I68SfCWJzF0rtQ6O5RLWVYOI0CUJvWvTIpFysGxdaE iy5jUIA43P2lPpJuPRBeqAdyxV8w67EoUDO3yGXpBUOeN8ciqocHlhKCNFZ44lv+Y+kp /h0g== 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:mime-version :content-disposition:in-reply-to:user-agent; bh=kpTIzfk9pnpPyxbfUZ1Rmr6EmXpUUsGOfj4pZ0cVi18=; b=mTk4xHa897dOBNHNnopkDhKunLjg28VUMCQfdh47QZqbVD79UdJsGW/Ycx48jSTh86 OB1g66ghQBR2zP9qku5LJjTsSjc1iF17UmnEjuN/6N6oHmFb4w8D8xsdHh2q1cQXpnQs WZwmAekcwGveQ2F3Icd7a3wXMr7SPr8xmsJYB2/VlBInQs/FLnAZ9bshCmstO3G5ZKRM t4pSMqx3gsQrAd219doQo1NwMqC1XVNSZqDwDt31q8bsND6ybqgsYYyzRlUJfsCkuUDH teLuCgdFf/olMuGkNUsNySTVe1ikdaCy/MHn0qBDVUCX7PL0oOvsrBY0fUJ7X/Zx7Pmf 9efw== X-Gm-Message-State: ANhLgQ1pNmLc6XpmtrnQmra0k7EQyjTz/3qKA0kGKnZC2cuQ9lxToKMH AkOX6ZCmvzDXostPa6DUBL/Yrw== X-Google-Smtp-Source: ADFU+vvaodKiKcFBzI+omCbwxh3QCm9okcOFfntIqdk33B2SG/ppAhE6BEEjIuAieQJB1s/GBFDwfw== X-Received: by 2002:ac8:7585:: with SMTP id s5mr3432576qtq.339.1584417081915; Mon, 16 Mar 2020 20:51:21 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id u51sm1449003qth.46.2020.03.16.20.51.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Mar 2020 20:51:21 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id B25EF800C55; Mon, 16 Mar 2020 22:51:19 -0500 (CDT) Date: Mon, 16 Mar 2020 22:51:19 -0500 From: Justin Pryzby To: Masahiko Sawada , Alvaro Herrera , Amit Kapila Cc: Andres Freund , Michael Paquier , pgsql-hackers@postgresql.org Subject: Re: error context for vacuum to include block number Message-ID: <20200317035119.GV26184@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200303194900.GA17197@alvherre.pgsql> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Mar 03, 2020 at 10:05:42PM +0900, Masahiko Sawada wrote: > I was concerned about fsm vacuum; vacuum error context might show heap > scan while actually doing fsm vacuum. But perhaps we can update > callback args for that. That would be helpful for user to distinguish > that the problem seems to be either in heap vacuum or in fsm vacuum. On Tue, Mar 03, 2020 at 04:49:00PM -0300, Alvaro Herrera wrote: > Your use of the progress-report enum now has two warts -- the "-1" > value, and this one, > > > +#define PROGRESS_VACUUM_PHASE_VACUUM_FSM 7 /* For error reporting only */ > > I'd rather you define a new enum, in lazyvacuum.c. On Mon, Mar 16, 2020 at 11:44:25AM +0530, Amit Kapila wrote: > > On Wed, Mar 04, 2020 at 04:21:06PM +0900, Masahiko Sawada wrote: > > > Thank you for updating the patch. But we have two more places where we > > > do fsm vacuum. > > > > Oops, thanks. ... > it is not clear whether it is a good idea to keep a phase like > VACUUM_ERRCB_PHASE_VACUUM_FSM as it has added additional updates in > multiple places in the code. I think you're suggesting to rip out VACUUM_ERRCB_PHASE_VACUUM_FSM, and allow reporting any errors there with an error context like "while scanning heap". An alternative in the three places using VACUUM_ERRCB_PHASE_VACUUM_FSM is to set: |phase = VACUUM_ERRCB_PHASE_UNKNOWN; to avoid reporting any error context until another phase is set. -- Justin