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 1jHbK7-0003Xl-43 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2020 22:50:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jHbK5-0005tK-UR for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2020 22:50:01 +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 1jHbK5-0005tA-IQ for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2020 22:50:01 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jHbJz-0007ED-2r for pgsql-hackers@postgresql.org; Thu, 26 Mar 2020 22:50:00 +0000 Received: by mail-qk1-x741.google.com with SMTP id k13so8971119qki.2 for ; Thu, 26 Mar 2020 15:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=+JZwDcfW2MsyHrqh4zIaVLDVuqtK7Yk5ykmrrLqexgo=; b=o/RBQovWydL9AhGmrLq7GlM93ixtJHtVCN9dgwGYPxAaP8AAzs31E+XRXeRnRhdRAB OQfQGpgTU84Ds0DpgHdhrVnuOsShLwBqCMCOLr2ksGTrnpzeTxWjbma52uzmTXmeFfHe YS/GA4bE1T2LLN+6PgKPtGWgWVZfSfkcjG9BlqpBfy2po3jlDl/VLXJBqUnpktAs0CnF UQ5jgGXLV9NLTRSpgS6oL6dVOTeJly1LbBkUVtP0+zw/0MngSYbgBtDm0BvEpNWfwbpR k8nOx44EnwHb4yYX/0t4jjSqA33tdNJpXxKA/rf6XWxciYIz+TgDTdj9ephLUfBJz9Qi RVlA== 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:content-transfer-encoding:in-reply-to :user-agent; bh=+JZwDcfW2MsyHrqh4zIaVLDVuqtK7Yk5ykmrrLqexgo=; b=NzGUwaME6ZvYEoVvhHx98hxBuRKkYRCjepOUtmzTM8hVVzVKqkUDxOVWMhnf1coHMm kgNjZsPRoQURlijALeNE/lODzUzgXvCpI0PmMdIKhgGRkF+ZbZD6K5ctEN9NJBO3m2yI YYNQybktuJ8I73HiK9spZINoZAv9skHCNxM4kbdUNtXB0vXk3vicXs7NtziKrdRtfrB2 xJGdYSG/mmgVzpYWwhxi2dERHBkKNRDu/ya6IKcbtIa6WQV6iwJAW7Z0qMAGD8Zl1NN+ ftIDcqzuvFzxzsSlAd6xy0Nexc8bJDk1LgcR1xXFUrg2wiwez/K3K2ms9O86JT5hfAPj OnpA== X-Gm-Message-State: ANhLgQ3UD2lnrJBVvOwwp7kj0vypvqLo5GhznhCMlDAZVP1mE4oc6vFx NWeKYJ8/RL8KfCyd3VV7qrJG4g== X-Google-Smtp-Source: ADFU+vvp/4tkRUz/MYHO9ADAQkZXVI8NKjWeLIb+Ki7KoPdTP0kS4faFXixu7rRR0dkOkdnKefAx7Q== X-Received: by 2002:a37:a90a:: with SMTP id s10mr11271675qke.90.1585262993943; Thu, 26 Mar 2020 15:49:53 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id v75sm2388926qkb.22.2020.03.26.15.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 15:49:53 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 78EE130081F; Thu, 26 Mar 2020 19:49:51 -0300 (-03) Date: Thu, 26 Mar 2020 19:49:51 -0300 From: Alvaro Herrera To: Justin Pryzby Cc: Masahiko Sawada , Amit Kapila , Andres Freund , Michael Paquier , pgsql-hackers@postgresql.org Subject: Re: error context for vacuum to include block number Message-ID: <20200326224951.GA20085@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200326221752.GR17431@telsasoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Mar-26, Justin Pryzby wrote: > On Thu, Mar 26, 2020 at 10:04:57AM -0500, Justin Pryzby wrote: > > And I think you're right: we only save state when the calling function has a > > indname=NULL, so we never "put back" a non-NULL indname. We go from having a > > indname=NULL at lazy_scan_heap to not not-NULL at lazy_vacuum_index, and never > > the other way around. > > I removed the free_oldindname argument. Hah, I was wondering about that free_oldindname business this morning as well. > > ... So once we've "reverted back", 1) the pointer is null; and, 2) > > the callback function doesn't access it for the previous/reverted > > phase anyway. BTW I'm pretty sure this "revert back" phrasing is not good English -- you should just use "revert". Maybe get some native speaker's opinion on it. And speaking of language, I find the particle "cbarg" rather very ugly, and it's *everywhere* -- function name, function argument, local variable, enum values, enum name. It even spread to the typedefs.list file! Is this a new virus??? Put some soap in it! Can't we use "info" or "state" or something similar, less infectious, instead? Thanks -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services