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 1m6C2X-0005dX-Ch for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jul 2021 13:13:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m6C2W-0007pl-3k for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jul 2021 13:13:32 +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 1m6C2V-0007pd-Mx for pgsql-hackers@lists.postgresql.org; Wed, 21 Jul 2021 13:13:31 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m6C2T-0007Iv-2d for pgsql-hackers@postgresql.org; Wed, 21 Jul 2021 13:13:30 +0000 Received: by mail-io1-xd32.google.com with SMTP id x10so2269730ion.9 for ; Wed, 21 Jul 2021 06:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GAeB+HpLBXGD/r7v0Ntl9yDpIlXS0CkD1agUp3EWllE=; b=eXuwJXHtDjZHmSERbu2aiU3NNuPAIx9h6/uDfLZFvJCzrGY1liZwBHVZnG/pZpn6qB bTb/bUCHwiMZWkZTFbxKCgeYZSC6D/W21sp7HjZHT8ov3z+spmThHOHdlWuwomQyKeZz dKisTF37SYImL3Fa/hsisobRtAGiAYH8szdNGFkHpOps7biOwEcqNg0xHTpjtFvKoSOv wRmxdmzkBFsNMrQI5s6xcQ/+uuexIQH+5BU1dIX36+p6wIi/8PmV5qUj8EvtgefNh5ZC QV+Wg7bf1wh2Uew/BH0P/HRagV/AAw/Ubd797sZbx+REAGNJMp72j2hmkJeB38NhXrRP K0lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GAeB+HpLBXGD/r7v0Ntl9yDpIlXS0CkD1agUp3EWllE=; b=bg4i17lgOyx+wfyHUukegWsl0eLLdNZD+o0enMfzCHMVhDTtHZnASMMZt9wOPJbCTf jV3msvKyPkMkGZMB/Q46xfzORuLiPvoDYp3dhRPjfncNzDrbrewwvyRKevRW1U7EJ9ZW S2LjJTVA9SxQU53f11tzpEKItytGBd5YjSNULUiAQ94kQBKQSeidd5NfqhEifaH4sjkm bYuzUz7mpSl+xhMQTDVNQQDyxXyOzci97gIVKsx/drrXeWJPctrwmMt8anwn+7i6Jgie 3o85P0a3QdycvZMSIRLdZ87ZY0iLj1r0uwgONcM7igMncRrucjSSICW/bb3Vslfyk1RE lasA== X-Gm-Message-State: AOAM531KDNZyTF5AledVfP3hMkrCByN92jvc3v2XSTjiWrCS0qKDHYji 91xleUAz/VMfW1y+O6RxIw8gsg== X-Google-Smtp-Source: ABdhPJyVTw9ORoNY2HHGyAxZ9MKBWdD+GlGO/j01DzI8atG0L1pMely29Jz8r4qIBzsnrrhV+wpacQ== X-Received: by 2002:a05:6638:3291:: with SMTP id f17mr31092704jav.143.1626873207970; Wed, 21 Jul 2021 06:13:27 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id q1sm14756472ioi.42.2021.07.21.06.13.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jul 2021 06:13:27 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 92E39801A44; Wed, 21 Jul 2021 08:13:26 -0500 (CDT) Date: Wed, 21 Jul 2021 08:13:26 -0500 From: Justin Pryzby To: Nitin Jadhav Cc: Bharath Rupireddy , Tom Lane , Robert Haas , Andres Freund , Stephen Frost , Magnus Hagander , Thomas Munro , pgsql-hackers@postgresql.org Subject: Re: when the startup process doesn't (logging startup delays) Message-ID: <20210721131326.GA19620@telsasoft.com> References: <867286.1623073349@sss.pgh.pa.us> <20210609161918.GY16435@telsasoft.com> <20210610100125.GE16435@telsasoft.com> <20210617125254.GB31772@telsasoft.com> 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 I think walkdir() should only call LogStartupProgress(FSYNC_IN_PROGRESS, path); when action == datadir_fsync_fname. ResetUnloggedRelations() is calling ResetUnloggedRelationsInTablespaceDir("base", op); before calling InitStartupProgress(). This shows StartupXLOG() calling ResetUnloggedRelations() twice. Should they both be shown ? If so, maybe they should be distinguished as here: elog(DEBUG1, "resetting unlogged relations: cleanup %d init %d", (op & UNLOGGED_RELATION_CLEANUP) != 0, (op & UNLOGGED_RELATION_INIT) != 0); On Wed, Jul 21, 2021 at 12:52:24PM +0530, Nitin Jadhav wrote: > 2021-07-20 18:47:32.046 IST [102230] LOG: listening on IPv4 address "127.0.0.1", port 5445 > 2021-07-20 18:47:32.048 IST [102230] LOG: listening on Unix socket "/tmp/.s.PGSQL.5445" > 2021-07-20 18:47:32.051 IST [102234] LOG: database system was interrupted; last known up at 2021-07-20 18:46:27 IST > 2021-07-20 18:47:32.060 IST [102234] LOG: data directory sync (fsync) complete after 0.00 s > 2021-07-20 18:47:32.060 IST [102234] LOG: database system was not properly shut down; automatic recovery in progress > 2021-07-20 18:47:32.063 IST [102234] LOG: unlogged relations reset after 0.00 s > 2021-07-20 18:47:32.063 IST [102234] LOG: redo starts at 0/14EF418 > 2021-07-20 18:47:33.063 IST [102234] LOG: redo in progress, elapsed time: 1.00 s, current LSN: 0/5C13D28 > 2021-07-20 18:47:34.063 IST [102234] LOG: redo in progress, elapsed time: 2.00 s, current LSN: 0/A289160 > 2021-07-20 18:47:35.063 IST [102234] LOG: redo in progress, elapsed time: 3.00 s, current LSN: 0/EE2DE10 > 2021-07-20 18:47:35.563 IST [102234] LOG: invalid record length at 0/115C63E0: wanted 24, got 0 > 2021-07-20 18:47:35.563 IST [102234] LOG: redo done at 0/115C63B8 system usage: CPU: user: 3.58 s, system: 0.14 s, elapsed: 3.50 s > 2021-07-20 18:47:35.564 IST [102234] LOG: unlogged relations reset after 0.00 s > 2021-07-20 18:47:35.706 IST [102230] LOG: database system is ready to accept connections -- Justin