Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1snjtC-005k2v-Qt for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Sep 2024 19:17:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1snjtA-00HHgt-Nn for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Sep 2024 19:17:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1snjtA-00HHgP-Df for pgsql-hackers@lists.postgresql.org; Mon, 09 Sep 2024 19:17:28 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1snjt2-000LpZ-NQ for pgsql-hackers@postgresql.org; Mon, 09 Sep 2024 19:17:27 +0000 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-82aac438539so116280839f.1 for ; Mon, 09 Sep 2024 12:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725909440; x=1726514240; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=79597dmxTVE/sVsg2vFYM1/f9Dk1a2z1iY5d8MZZCW4=; b=VfH4lXO/YpDy/ahVxEEqJ01fXrnpwg9GPoRhkKOJBz2QkBOcTtTgjlpqzqUMKa1mzB CyfOnuGG8Vj7x4XLmGa41InFL++76yhlJkLfGkSOuXCsDoHSp5EHw8jlqJHdSJfXs6Md 1vZHfnxgkb/jgVzOdhXya1fUnbPznTDWILKbsPElQ30zrEhLjOST2HHYu5dyfpO1WOFe 9wT1nJwJFo4xouHQaRIIi5JgDJRv5IgvPrdegpu9pBYGIZ7mAZG6ke890dqGkFhZf5G3 HLVGjhQf2OmjAL+KdDWN26XCRxTik/AJ1smXMrzQUwPCcwqLMek88qHzWSuzwrTrfBg/ obsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725909440; x=1726514240; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=79597dmxTVE/sVsg2vFYM1/f9Dk1a2z1iY5d8MZZCW4=; b=R8Z07WtotWRr36o+JKtRtQb00i+P7iodygZNXYt/5e8TUnnKfzTylJKsTWJ1S1jqJ8 PoyEeX2e9hQEw2Q67CoIT97xIkpYx9f3HBBaJBflqssx6eG4Jqh/T33rjCyHiC/YGr3F 5yJzhg1eff2gsZggIPyJ8wdAhIoWRmJ4oQvNCbavsuK+Al/zSC4OBZ9lmJ6cOEuzaY9x 4SsT/puVSYlJ29jy+Z4Nr/U8AMCZd5DEXp3i4KL5YPAgfe0otZFBDUVEc3PPKp5KQe9x uJCsluBj4/LG4dBP90+2jxAsEjy3SkI34aSkG8fXvOypO2kiTSZghrrqsbStqHETDagq zhvw== X-Forwarded-Encrypted: i=1; AJvYcCURQJJuUA963tctV8ULk42z5hfHbT09jgrJjQWZtZlx23yS+llIpLB7+79/xRivCrarr2suWGGQ2U4Ys/JS@postgresql.org X-Gm-Message-State: AOJu0Yy9pfh2e6h8rKGvq212jOAZisGfdf0F/HgWTAUcsyZ+jrilEOhm 4ys35hEuDvfcIFOq6OG88UH9FVJ61Hy8b1CI8KazB7SFd0hVdKlK X-Google-Smtp-Source: AGHT+IGPyqSGsGsSQbpsbVExiAkQLva+XAbofC+S+EDLKme4Z3pn+W+y+UL8X2URcWSfe0zXx6PJzg== X-Received: by 2002:a05:6602:2c10:b0:82a:221d:51e8 with SMTP id ca18e2360f4ac-82a9622fc38mr1870489739f.13.1725909439754; Mon, 09 Sep 2024 12:17:19 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4d094561c8csm1223953173.62.2024.09.09.12.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 12:17:19 -0700 (PDT) Date: Mon, 9 Sep 2024 14:17:17 -0500 From: Nathan Bossart To: Daniel Gustafsson Cc: Ilya Gladyshev , Corey Huinker , Robert Haas , Jeff Davis , PostgreSQL Hackers Subject: Re: optimizing pg_upgrade's once-in-each-database steps Message-ID: References: <3A3553B1-123D-4F11-9426-277F2E920AD7@gmail.com> <0fe740dd-cd23-45a6-b116-c777349acbf1@gmail.com> <3A4280AB-D57E-4F9E-B1DB-63C80C7E891F@yesql.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3A4280AB-D57E-4F9E-B1DB-63C80C7E891F@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Sep 05, 2024 at 01:32:34PM +0200, Daniel Gustafsson wrote: > I've read and tested through the latest version of this patchset and I think > it's ready to go in. Thanks for reviewing. I'm aiming to commit it later this week. > The one concern I have is that tasks can exit(1) on libpq > errors tearing down perfectly functional connections without graceful shutdown. > Longer term I think it would make sense to add similar exit handler callbacks > to the ones in pg_dump for graceful cleanup of connections. However, in order > to keep goalposts in clear view I don't think this patch need to have it, but > it would be good to consider once in. This did cross my mind. I haven't noticed any problems in my testing, and it looks like there are several existing places in pg_upgrade that call pg_fatal() with open connections, so I'm inclined to agree that this is a nice follow-up task that needn't hold up this patch set. > Spotted a small typo in the comments: > > + * nothing to process. This is primarily intended for the inital step in > s/inital/initial/ Will fix. -- nathan