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 1nDS5J-0002j0-Rg for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Jan 2022 14:18:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nDS5I-0002Tp-Li for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Jan 2022 14:18:40 +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 1nDS5I-0002Tg-DC for pgsql-hackers@lists.postgresql.org; Fri, 28 Jan 2022 14:18:40 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nDS5C-0006vY-Up for pgsql-hackers@lists.postgresql.org; Fri, 28 Jan 2022 14:18:39 +0000 Received: by mail-pj1-x102d.google.com with SMTP id b1-20020a17090a990100b001b14bd47532so6583380pjp.0 for ; Fri, 28 Jan 2022 06:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=7axEN33EOB1K2ypulJPkZGdCzEQAYKORVTgldLIXgFM=; b=Ilel9Xu9kE5LSI3U36ZL1sMjkUDpAEtZ+GR+WPvGHmKAWVk4ax7CtQYPPn5tjttOhD I9F8zw3A+KANXB5WOzzUbn+dZ5eynsQTC3dfZlk4SmnhhxeVmc0xpdHWj037pbqL0/sA QpIEDK1JTHq+crwYHSXoWKTxXaJXgWedJfvVFo2aufN7rVYX9DHysw90D6dQG40UqsvJ t1AUoTAovcHhzlCAp+3CR0PFKnfHxQC2uqpy9nmttqaOOqZQlIejCYxDQS1Ig2UlleDt RJVABxTwFOEJZr0uFxrvyMRAYMfiyUG/QdPShIg/BEy52LWMwCqDM8Pn+UWZqk82r+81 Ku4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=7axEN33EOB1K2ypulJPkZGdCzEQAYKORVTgldLIXgFM=; b=vy3iW6EHNf5ahDkSKl7/ZRFWz7+mr5XHlCVD90oO15/DFcm1ZNrMJBBhJqnHpHdWFk DG2wBIAGyetsW+Uc0oPcx/pCx39+t2Xmz4NNDEX4YsRwnvjZad8zTY+EHviE5x0y5WEG QZp1AgDmAzZFDlAxTy4/aWccxcPQ+MuSoFAmXPVeoZ2VUcT70lwJS0pF8o1k5mIMRgk9 +Y+6NLzC7NU0M/YM7CAY+D7wu61+z7VdeChXUHwV6HUxUA+e3kQPbnbEO6E1nyrEmwtT 0f7Ky5Mzl94w9nfsQtzR6XY2JbuNzCi3c5l3AzLrpWV38a+36cxmZVLiBgwf9axRJi4z 48BA== X-Gm-Message-State: AOAM5307bB2cMoA2KikErmPEhOlfeWKTUURgkhCcsD3Hljx9C4vqXm2L kXE6dhOFT9TbROyb4eJt+Hg= X-Google-Smtp-Source: ABdhPJyP6xj/DTHatpM86ixBhu0ZiTUjUUvAWBgieotGc4iDyNoJKXK2Biy1qSmvGgQY+gdo78sJMA== X-Received: by 2002:a17:902:9a02:: with SMTP id v2mr8963772plp.138.1643379513978; Fri, 28 Jan 2022 06:18:33 -0800 (PST) Received: from jrouhaud (2001-b011-1005-557a-942d-0024-7821-6548.dynamic-ip6.hinet.net. [2001:b011:1005:557a:942d:24:7821:6548]) by smtp.gmail.com with ESMTPSA id s8sm8928618pfw.158.2022.01.28.06.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 06:18:33 -0800 (PST) Date: Fri, 28 Jan 2022 22:18:28 +0800 From: Julien Rouhaud To: Denis Laxalde Cc: Andres Freund , pgsql-hackers@lists.postgresql.org, Jehan-Guillaume de Rorthais Subject: Re: [PATCH] Disable bgworkers during servers start in pg_upgrade* Message-ID: <20220128141828.sl7alufb2odg26c3@jrouhaud> References: <20210121152357.s6eflhqyh4g5e6dv@dalibo.com> <20210124003611.lkyxhd2mpdmv5xzh@alap3.anarazel.de> <20210127102511.tvhu2wmrxoz3tle4@dalibo.com> <20210127144132.215fe4bb@firost> <20210312082325.weltivlokfpc3gt2@nol> <54f0d813-a38a-6b72-269a-7d6dd02bcc5b@dalibo.com> <20220128135636.ls2zjbajirbdmrzb@jrouhaud> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jan 28, 2022 at 03:06:57PM +0100, Denis Laxalde wrote: > Julien Rouhaud a écrit : > > I think having a new option for vacuumdb is the right move. > > > > It seems unlikely that any cron or similar on the host will try to run some > > concurrent vacuumdb, but we still have to enforce that only the one executed by > > pg_upgrade can succeed. > > > > I guess it could be an undocumented option, similar to postgres' -b, which > > would only be allowed iff --all and --freeze is also passed to be extra safe. > > The help text in pg_dump's man page states: > > --binary-upgrade > This option is for use by in-place upgrade > utilities. Its use for other purposes is not > recommended or supported. The behavior of > the option may change in future releases > without notice. > > Is it enough? Or do we actually want to hide it for vacuumdb? I think it should be hidden, with a comment about it like postmaster.c getopt call: case 'b': /* Undocumented flag used for binary upgrades */ > > > vacuumdb: error: processing of database "postgres" failed: PANIC: cannot > > > make new WAL entries during recovery > > > > Should we tweak that message when IsBinaryUpgrade is true? > > Yes, indeed, I had in mind to simply make the message more generic as: > "cannot insert new WAL entries". -1, it's good to have a clear reason why the error happened, especially since it's supposed to be "should not happen" situation.