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 1k1rt5-0008PB-No for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Aug 2020 13:49:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k1rt3-0005lA-0N for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Aug 2020 13:49:21 +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 1k1rt2-0005l3-Bw for pgsql-hackers@lists.postgresql.org; Sat, 01 Aug 2020 13:49:20 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k1rsv-0007zv-8h for pgsql-hackers@postgresql.org; Sat, 01 Aug 2020 13:49:18 +0000 Received: by mail-il1-x132.google.com with SMTP id j9so24218710ilc.11 for ; Sat, 01 Aug 2020 06:49:13 -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=iJBNTAbAR3Nhj19ZkmTWaU2L+VaGEPRE3ZMoaXYFxa0=; b=IbBpRWLGuv4NNXB4F4HMh0AWX7TSRlh1Bl6kTY0SWQMWKWTB9Q5hgWH8PRiCmWMsNI zvHSTR0wSt30aD5XP7c2boygdi9isJjJZ+/Jfrm4nmzr1VlAATMmMyFj7l1OOOKzOnWQ /yMa2pU7a+ekTqO3cAkETG/3jo8v/vMOBjpV5FbAf+spGQp52l4ERHjgOnYCkE4ikYyM FiPhXv7/WDyRIuwO0TJ0C7gvwz17/s/TKKVWS0A947RqFLY/sJVh7yb1NAtCdMkyF6zF zylezUYLRtWHEOUAzU2WeynCjLoNQFA/lJuA6gb+CxDPDuhk43cup7aOM6eqkvQhlowX GqGg== 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=iJBNTAbAR3Nhj19ZkmTWaU2L+VaGEPRE3ZMoaXYFxa0=; b=ZSFNvLS5+vb0TNlBE1uKdcT/lsx/zfScPo5IGYwMd3prxfrIE8J7UB+2TKvsgbVYqu 6/zVUFkvnIRLsO0y72iw5qKGDnkaigm+NphlUM7CZxuUrVCrJWOH3pfZ+vFq05ypJGbJ XdGFhgYzZDp2C29jyWCBGugrLeuzwI7M/lPpxispmzFa/GdLUdF20mfvE/uZUuzoIFAb OLRF/cG+g+6M/M//jVC8H4szyZONRIXrmt/O49AguZ6RTmr+jeq2HOwr7RKYfSAchX4Y utfU3Y5OA4v5dsVJTWOP+Jqqhq9/cG6PQl8baA+zVilqOgCkohupJzGhyaDIz/AumpfM VbbA== X-Gm-Message-State: AOAM5314AOTvgHt5oD1tz+zy9Uug67fwNfVqZ+E6GCU9zN6SifinjJFY e+RojLOpXWyST0dDoN3KDRyycw== X-Google-Smtp-Source: ABdhPJyBButyH5GrLGb5HrBg+VasBuO3Yd/gPYRWmWuoVob9e4sApjwJ0/iFQyfE8fenYdpEyJ5iNA== X-Received: by 2002:a92:d782:: with SMTP id d2mr7993199iln.65.1596289752398; Sat, 01 Aug 2020 06:49:12 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id f84sm2802564ilh.72.2020.08.01.06.49.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Aug 2020 06:49:11 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 3793F800176; Sat, 1 Aug 2020 08:49:10 -0500 (CDT) Date: Sat, 1 Aug 2020 08:49:10 -0500 From: Justin Pryzby To: Mahendra Singh Thalor Cc: pgsql-hackers@postgresql.org, Masahiko Sawada Subject: Re: display offset along with block number in vacuum errors Message-ID: <20200801134909.GG20393@telsasoft.com> References: <20200727111352.GN4286@telsasoft.com> <20200731215514.GC20393@telsasoft.com> <20200801061721.GF20393@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Aug 01, 2020 at 12:31:53PM +0530, Mahendra Singh Thalor wrote: > Actually I was waiting for review comments from committer and other > people also and was planning to send a patch after that. I already > fixed your comments in my offline patch and was waiting for more > comments. Anyway, thanks for delta patch. > > Here, attaching v3 patch for review. I wasn't being impatient but I spent enough time thinking about this that it made sense to put it in patch form. Your patch has a couple extaneous changes: case VACUUM_ERRCB_PHASE_VACUUM_HEAP: if (BlockNumberIsValid(errinfo->blkno)) + { errcontext("while vacuuming block %u of relation \"%s.%s\"", errinfo->blkno, errinfo->relnamespace, errinfo->relname); + } break; case VACUUM_ERRCB_PHASE_VACUUM_INDEX: @@ -3589,6 +3618,7 @@ vacuum_error_callback(void *arg) errinfo->indname, errinfo->relnamespace, errinfo->relname); break; + case VACUUM_ERRCB_PHASE_INDEX_CLEANUP: errcontext("while cleaning up index \"%s\" of relation \"%s.%s\"", I would get rid of these by doing like: git reset -p HEAD~1 (say "n" to most hunks and "y" to reset just the two, above), then git commit --amend (without -a and without pathnames), then git diff will show local changes (including those no-longer-committed hunks), which you can git checkout -p (or similar). I'd be interested to hear if there's a better way. -- Justin