Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jInbA-0000dh-QQ for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2020 06:08:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jInb8-0003lt-SS for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2020 06:08:34 +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 1jInb8-0003lm-KU for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2020 06:08:34 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jInb6-00025e-5b for pgsql-hackers@postgresql.org; Mon, 30 Mar 2020 06:08:33 +0000 Received: by mail-pl1-x643.google.com with SMTP id a23so6325489plm.1 for ; Sun, 29 Mar 2020 23:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hIeRbfXaLd5HodeV5sV3DcFR2CYsIfdvdfVJICj2BJk=; b=fGSu4x3VJ4Dj/G2PslrU/E3fUFjOf8YPWcs4P5OmZkHiqqy/0GwBWJY2dcRo561sNV 5UWI+bQchhTMDkqZbxHfC7TEoNYK6xVJWZMdOmAVLe5G3FGhjsO+S4EGS1ffPLwP3DYk /2z67omH5IIcbFINvNL0zgt51BmmbV8TK5FDs= 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=hIeRbfXaLd5HodeV5sV3DcFR2CYsIfdvdfVJICj2BJk=; b=IIFkt93fodIO+kdRJLdp3iGTja2m0glYAqvmpv9+83lE/CqdH5eKHjlQ8BqR0Kq2Ux OHsvZwxS87M79OiSdUO1f8k0NnspIc9vxntFA8++e6cK3u+k1ZkjqGAwzWa2kDGdZbWz hCTO7/VX5RKeT5lIMB9d2Ko3LeleXI9Ro95MBqSBy2N/5XbU0plzA5PPToluo9BGyq5G phQPK3yk5pHKTS+J6PC2leP2Ab9hIN4paOblj5ZDZxVas9bHW33c+yVJo9u2uv4calB3 PKxSE6xhCbHx+mAIVp38LiI1fyodRK/XnG7oaaUzXVvYyeucDUTsN6h5OZ8EGvvqPuwM I1kw== X-Gm-Message-State: ANhLgQ09X5yukmyHuG/YJt7olgE77H65xaLbliTOKryeETfIzo52E1st IV/HPQMEP5N05lJUjqNeVtO6MA== X-Google-Smtp-Source: ADFU+vtsjt+AhjADbfH0IlA0Tc3/tPn1qgyzSFWAePAeMxma1IEt7OmqeyXKF3QBOFmaDpiwUlgpEw== X-Received: by 2002:a17:902:8a81:: with SMTP id p1mr10964039plo.284.1585548510230; Sun, 29 Mar 2020 23:08:30 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id a24sm9338163pfl.115.2020.03.29.23.08.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Mar 2020 23:08:29 -0700 (PDT) Date: Sun, 29 Mar 2020 23:08:27 -0700 From: Noah Misch To: Kyotaro Horiguchi Cc: robertmhaas@gmail.com, pgsql-hackers@postgresql.org, 9erthalion6@gmail.com, andrew.dunstan@2ndquadrant.com, hlinnaka@iki.fi, michael@paquier.xyz Subject: Re: [HACKERS] WAL logging problem in 9.4.3? Message-ID: <20200330060827.GD2324620@rfd.leadboat.com> References: <20200321224920.GB1763544@rfd.leadboat.com> <20200323.172027.2270553329883636814.horikyota.ntt@gmail.com> <20200330044101.GA2324620@rfd.leadboat.com> <20200330.145611.1603373373605263450.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200330.145611.1603373373605263450.horikyota.ntt@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Mar 30, 2020 at 02:56:11PM +0900, Kyotaro Horiguchi wrote: > At Sun, 29 Mar 2020 21:41:01 -0700, Noah Misch wrote in > > Since pendingSyncHash is always NULL under XLogIsNeeded(), I also removed some > > XLogIsNeeded() tests that immediately preceded !pendingSyncHash tests. > > Sounds reasonable. In AddPendingSync, don't we put > Assert(!XLogIsNeeded()) instead of "Assert(pendingSyncHash == NULL)"? > The former guarantees the relationship between XLogIsNeeded() and > pendingSyncHash, and the existing latter assertion looks redundant as > it is placed just after "if (pendingSyncHash)". The "Assert(pendingSyncHash == NULL)" is indeed useless; I will remove it. I am not inclined to replace it with Assert(!XLogIsNeeded()). This static function is not likely to get more callers, so the chance of accidentally calling it under XLogIsNeeded() is too low.