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 1r8OjP-009fjL-34 for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Nov 2023 17:52:15 +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 1r8OjN-00CFwy-GD for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Nov 2023 17:52:13 +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 1r8OjN-00CFvl-6I for pgsql-hackers@lists.postgresql.org; Wed, 29 Nov 2023 17:52:13 +0000 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r8OjG-009CxK-4q for pgsql-hackers@postgresql.org; Wed, 29 Nov 2023 17:52:12 +0000 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7b350130c3fso194919039f.3 for ; Wed, 29 Nov 2023 09:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701280324; x=1701885124; 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=fW/TxovFEn1WCB5cPFEapc2d4gQHeblDH69U+rUEmPU=; b=f8USX+45U1/XABLX32bkuylBWp3JXtRIuYDqVnh8D2U/O5TObYoOf+vravk0R5Tw5n P8LbAQ1ej63MbSQHNMUGIHc/CFvOqKWwGrf39zNw3YHh+hxhGo5AWVxZkP0g8Lz/RxXM RLfBUChVZeersVUDNjSzsY+XR/LfbvxoiztK2a/syOfQsu8jI+2ABl1rOlBKnlEKd4/y p7mJGcxLgE3U5IZNJV+dZweJunHfZLDrsVfL1F+w+7zA4+lJHeV8BCeRR0tMWmV7Nt81 dPeZWQpYN91cGyu8wBQgDcbNMlPnnC9C6LQClLLRwERSHZenj3NcihjI48MsTsG3TBoX hrcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701280324; x=1701885124; 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=fW/TxovFEn1WCB5cPFEapc2d4gQHeblDH69U+rUEmPU=; b=N5xoAb6PVneKSq1xufbIxLQJvgvaAhyq6VA6iZZDDQkwDkCsUjmxhcQipEyPOpUuSn eOvW70tJ061wT+LrKHZQ+0Hovrbc1emM5ANtlRmTLEN4PLELyccQggq6MOT1a/Gih5Pf /2ZjM4kXihELu1pc7hE9DUOyVVILwF0/BBBcIN5uk6tEQSlHT1X4MMUXsJPf2lwLgyWS AngYAp0TPFFQjPM+ntCmqY3IzoR/VY5Kxm2RjmGcn3I/5BuAcnWFzuDsuF8RB1M8o4Zt GGoAjNcuOhlJsBYEfwWxi112cOZKLkBqmKzjun4KVPwZCxITCuwNv+hNjqbRBOlaxBTs hi/g== X-Gm-Message-State: AOJu0Yz5DtuIQxvagDt4jGZGP3Fojq0nHDQ2JbOSrkYXF3Vmtw1MBsTQ YgoZJTMvIrIBbQK/7WRCR9g= X-Google-Smtp-Source: AGHT+IEa+zGWxAkdgPfZ4O/jPS7TW/rupYqshqCOK3g1kP51CK3/fvqC086Qywg7JdeszDqfW5nNCw== X-Received: by 2002:a05:6602:2c46:b0:7b3:4e7d:f16d with SMTP id x6-20020a0566022c4600b007b34e7df16dmr23975258iov.19.1701280324094; Wed, 29 Nov 2023 09:52:04 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id z25-20020a5ec919000000b007b34b18c31esm50966iol.50.2023.11.29.09.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 09:52:03 -0800 (PST) Date: Wed, 29 Nov 2023 11:52:01 -0600 From: Nathan Bossart To: Andres Freund Cc: David Geier , PostgreSQL-development Subject: Re: Fix assertion in autovacuum worker Message-ID: <20231129175201.GA902323@nathanxps13> References: <20231128220516.GA475168@nathanxps13> <20231129000349.pcfvrewvqk4he6i2@awork3.anarazel.de> <20231129024247.GA479372@nathanxps13> <20231129024859.kajlgqg33dksonbi@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129024859.kajlgqg33dksonbi@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Nov 28, 2023 at 06:48:59PM -0800, Andres Freund wrote: > On 2023-11-28 20:42:47 -0600, Nathan Bossart wrote: >> Right. Perhaps we could add a LWLockReleaseAll() to >> pgstat_shutdown_hook() instead of the autovacuum code, but I'm afraid that >> is still just a hack. > > Yea, we'd need that in just about all before_shmem_exit() callbacks. I could > see an argument for doing it in proc_exit_prepare(). While that'd be a fairly > gross layering violation, we already do reset a number a bunch of stuff in > there: Gross layering violations aside, that at least seems more future-proof against other sigsetjmp() blocks that proc_exit() without doing any preliminary cleanup. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com