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 1o7lFg-0002xU-7B for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Jul 2022 22:06:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o7lFd-00033i-9V for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Jul 2022 22:06:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7lFc-00033Z-Qf for pgsql-hackers@lists.postgresql.org; Sat, 02 Jul 2022 22:06:04 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o7lFY-00060F-Ew for pgsql-hackers@postgresql.org; Sat, 02 Jul 2022 22:06:04 +0000 Received: by mail-pl1-x62d.google.com with SMTP id n10so5453194plp.0 for ; Sat, 02 Jul 2022 15:06:00 -0700 (PDT) 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=VF/X5X8pAPcnn0npeQ493gk107pzk3u6p4Hyv8myZtI=; b=gTQuD/bDarmpEGycDZVDSKiUA40hw1ZBvvU4OsMsvdcf0/zhcSweeLLMNQr9BtzzLD lBkyUa81voD8dwB67CWakAILneE8V6L8l8D0T/4RzyRlgiQHMZdmdwEfygg3O2+6klxg izRNSxXy5gRDa472NT2ZzPc/HS5CBItLnwS0G4SOuK8t353f2yxqFdT5wfpCJU7e2WYN 4AhzDbH+my2DX81fntlcNH+AI4imB7ZkQP6HpG1aF8w0EX1he/Z2sY0bNqEa/cQfAFGD MG91D1PU8MJSIwjEDbH6uhfOSBYpIeuFcWo41uDtpF2/LhjiXk2XFXIRy52kKPJx5MMi dgBQ== 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=VF/X5X8pAPcnn0npeQ493gk107pzk3u6p4Hyv8myZtI=; b=78FeDrbYyIj1wHzwrZrZO9P0v/URKyqPyiLKSV5mS9LbsinFSbMIrdvX3AoYDxs0YT oaqQRqgfSZClUbcsWkEX4R6wN8ay8EcURzXmPM5hIgMNSeOM+JqSqYLI7FEihblcmW0j HUYAjTNrVKAt3xcnqvTPL/9v9dvTJv3qRXbyj94Z8Soqbaybx4E+LaIDcTuIWBeJ0EYY 2prxNRkE+K6AfWvkM1JlNhtQcDeyNVsT97LbmU8uC0otNiuIEVPhrwYHkjsFsuQlzyEh Z9IP7RDwL0sQlP3RjaZTaq6fCMl05bISpzF772ML3tdhyPKKV5abID4Vl/zEhpWjRugb j/QA== X-Gm-Message-State: AJIora8wmB9oKAWuQc/DrZNiBqcqHwAwgMsSKp+GSgBd0i1YgyhjA1Mc pyPep69H1bg3xWiXZmfCq/s= X-Google-Smtp-Source: AGRyM1vt/f5n4BBx/7P9yPKcJ++KUFQOS4f2pzZNUOhZrCLwzNqiQqY4M4pMEI1daYcghE+cxH2GFw== X-Received: by 2002:a17:902:f710:b0:15f:165f:b50b with SMTP id h16-20020a170902f71000b0015f165fb50bmr26999720plo.158.1656799557913; Sat, 02 Jul 2022 15:05:57 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id a8-20020a656408000000b003fd1111d73csm17821333pgv.4.2022.07.02.15.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Jul 2022 15:05:56 -0700 (PDT) Date: Sat, 2 Jul 2022 15:05:54 -0700 From: Nathan Bossart To: Simon Riggs Cc: Robert Haas , Andres Freund , "Bossart, Nathan" , Bharath Rupireddy , Maxim Orlov , Amul Sul , Bruce Momjian , "pgsql-hackers@postgresql.org" Subject: Re: O(n) tasks cause lengthy startups and checkpoints Message-ID: <20220702220554.GA1044460@nathanxps13> References: <20220217210022.GA3248793@nathanxps13> <20220217222829.lndzwq72fh4v34c2@alap3.anarazel.de> <20220217225838.GA3292179@nathanxps13> <20220217231247.llfqjvvuk6rkawel@alap3.anarazel.de> <20220218164454.GA3403811@nathanxps13> <20220218205111.GA3447220@nathanxps13> <20220623171552.GA96638@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="liOOAslEiF7prFVr" 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 --liOOAslEiF7prFVr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Jun 24, 2022 at 11:45:22AM +0100, Simon Riggs wrote: > On Thu, 23 Jun 2022 at 18:15, Nathan Bossart wrote: >> I'm grateful for the discussion in this thread so far, but I'm not seeing a >> clear path forward. > > +1 to add the new auxiliary process. I went ahead and put together a new patch set for this in which I've attempted to address most of the feedback from upthread. Notably, I've abandoned 0007 and 0008, added a way for processes to request specific tasks for the custodian, and removed all the checks for ShutdownRequestPending. I haven't addressed the existing transaction ID wraparound risk with the logical replication files. My instinct is that this deserveѕ its own thread, and it might need to be considered a prerequisite to this change based on the prior discussion here. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com --liOOAslEiF7prFVr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v6-0001-Introduce-custodian.patch"