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 1oXXj0-0004n8-83 for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Sep 2022 00:54:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oXXiy-00019k-Cf for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Sep 2022 00:54:56 +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 1oXXix-00019b-WF for pgsql-hackers@lists.postgresql.org; Mon, 12 Sep 2022 00:54:56 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oXXir-0001rg-64 for pgsql-hackers@lists.postgresql.org; Mon, 12 Sep 2022 00:54:55 +0000 Received: by mail-io1-xd2e.google.com with SMTP id z191so5836466iof.10 for ; Sun, 11 Sep 2022 17:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date; bh=0Mxct/yt+ktFHyuBUYkU8HXtL7rEHBA0TRtH07rOpJw=; b=B/Zajvyh+Ks7IUj0/fYvK4hDS8HU9/CWiX+4Le9GwAJmp5npKlv61Pbu3ehANloZ37 BpQDFVapl3x3s6gQWGffPMmBovPZIFYzVJaSuE69FW7X7xYtqgEdmAw8xRVqQVQWsqic kypegGk1ahMWETSa4CvFVr+DCZ0z9aQ7XNeIMUlqXYXdTlLOXSrAms+zfZuBiG3rwpW+ LV4gcQudQlw19T+0jonpy4mBuF9M3mVizvxa+xGfgOH2759FxbtUjJqEnCwVnCyqINm3 TkEhi70lWA+HFNLms2gzYAFjC80HYGTJlQnKdenUPa40mZoOa9JW94+RDuV+Fmb3oHZh JZAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=0Mxct/yt+ktFHyuBUYkU8HXtL7rEHBA0TRtH07rOpJw=; b=Fd1oWNsv9Hf+90ZRMscPQsikmhlUNDykPbiZqI0IsZhoqDV7tK3S9QgnUy6z6W0XOl F++yK5TBqPcB9SRdW60WKGHM2z4CXAOdCtJWwEBoaitQn47UYx0WzuajL3E/Lrl+FLue 8qpMPprYFWwMFUKuCVce7yVP89zyK5ztJsgsPRN4P0Mq5otfGeC0uKwt8nMhLEnYPt5q AZnIy+PrdmGQJqXdD4T7gBulzaEIhMWknNNn5yqTEKjKe0T1W7bcftT0VlGF5ZellsUi IRAJWRECRliAHvFZdPvMVf9wwf3eZLPGucwR/Fqyv6BNMv8bfyTO164RWhBRAq3MO0OU Xpsw== X-Gm-Message-State: ACgBeo0pka8etH/D2kiBEVzbVS/TQmPXufyuPAoUPp0dKBHP5xy2Bv7E vR7fgHi80DIoLuxXJiOf7vVAKQ== X-Google-Smtp-Source: AA6agR4w+jd8VbQ8eGqfp4PafemtnoZsOIJBt7cGUbvuQzfUNj+pxwPMDdZi89rBSL1KiHq56g0ifA== X-Received: by 2002:a05:6638:130e:b0:346:8a34:377a with SMTP id r14-20020a056638130e00b003468a34377amr12634746jad.302.1662944085088; Sun, 11 Sep 2022 17:54:45 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id a1-20020a92c701000000b002e988fe84d1sm2757348ilp.58.2022.09.11.17.54.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Sep 2022 17:54:44 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id D683A8010D1; Sun, 11 Sep 2022 19:54:43 -0500 (CDT) Date: Sun, 11 Sep 2022 19:54:43 -0500 From: Justin Pryzby To: Thomas Munro Cc: Robert Haas , Aleksander Alekseev , pgsql-hackers@lists.postgresql.org, Michael Paquier Subject: Re: Background writer and checkpointer in crash recovery Message-ID: <20220912005443.GB31833@telsasoft.com> References: <162763450191.31964.15384962987091520173.pgcf@coridan.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Aug 03, 2021 at 02:19:22PM +1200, Thomas Munro wrote: > On Tue, Aug 3, 2021 at 9:52 AM Thomas Munro wrote: > > On Tue, Aug 3, 2021 at 1:17 AM Robert Haas wrote: > > > That's great. I just realized that this leaves us with identical > > > RequestCheckpoint() calls in two nearby places. Is there any reason > > > not to further simplify as in the attached? > > > > LGTM. > > And pushed. Gripe: this made the "ps" display worse than before. 7ff23c6d2 Run checkpointer and bgwriter in crash recovery. A couple years ago, I complained that during the end-of-recovery checkpoint, the "ps" display still said "recovering NNNNN", which made it look like it was stuck on a particular WAL file. That led to commit df9274adf, which updated the startup process's "ps" to say "end-of-recovery checkpoint". But since the start process no longer does the checkpoint, it still says: postgres 19738 11433 5 19:33 ? 00:00:01 postgres: startup recovering 000000010000000C000000FB postgres 19739 11433 3 19:33 ? 00:00:00 postgres: checkpointer performing end-of-recovery checkpoint That looks inconsistent. It'd be better if the startup process's "ps" were cleared. -- Justin