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 1jKeyc-00055H-ON for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2020 09:20:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jKeya-0006i0-5M for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2020 09:20:28 +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 1jKeyZ-0006hm-RT for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2020 09:20:27 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jKeyT-00046T-7h for pgsql-hackers@postgresql.org; Sat, 04 Apr 2020 09:20:26 +0000 Received: by mail-lf1-x142.google.com with SMTP id n20so7772196lfl.10 for ; Sat, 04 Apr 2020 02:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ykMdAjEcYx4x1//HiLPW/XddmPBRSOmAA6wCkJAY4AY=; b=FBoHXpqVveIV6ve2zK+7ZuoQwIz8SuND/+B290iUK6bSS4ALZcRrTWoKxZWDxexn50 VkYkk6DdyIW7J+kDEJaLBJpIzoWNOPoNyWmrlV6XTBVzH8YveY+2K3ZEe8Q5FBDbumPo T1/lBMSCij3wr9y17qD/A/QhGzUkhkMxcTGnZE35Z3YpfRn8EQxXys04TR4oW9DaG2/T YQfJ0LsfHNmQMraIzhqzzIw9nmZYWFq1rbeyeqvWXHs0KfKv0KtF+RWIWElx1S1osZVb J/VHopQ3p0TSZWBcOvkN9xPiR1NH0J0/grHLWQQpnYLttS/ll9QsY6IxxHLiix98epaz iUAw== 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; bh=ykMdAjEcYx4x1//HiLPW/XddmPBRSOmAA6wCkJAY4AY=; b=kGx1eVjzdxMEBbx8hTAhXOBymISDP3cNw7IICkOI0KGzeACpp6n+kr35KI2grvS7vm 5GeL8VcjvkpOu/GLIRooLOEx8pD5jhM3cPeNK0njSfmyP039kzdyORrX7NFmit76x09a GXfvMZ9xBiw3H9k1LQwGgEEWG2Uu/HEocBTIwY+OA1yBLpjYHjb/babJGX89d0+5TO1M w7BxfYgfCKnqnyTaQZ3KbwWEm++EvRp9Mnn6FnIgi60da8HbnD9dSVV2V5FH/CVc8CfP nSmsyvIQBF7BoERsOv7x29AGRTLY6sXsOGYNIkNTy/kgYrFQPy5yjYs5/DAzbFVq9JvZ SlBg== X-Gm-Message-State: AGi0PuYjTnFzdDfRmJASKbWJGOoqNUnJwvh8vpxSVmpPMppvHkVNMhZN 8F+YLHQeJoRvft0pasra+NAEHloFObA= X-Google-Smtp-Source: APiQypJnoQ0SAPov0rfXx3VDHi3eWEvKJch6n+WIviIzPmTuR9qUSNK3lhN7zhldNIjlJc+cVevAkQ== X-Received: by 2002:ac2:5de7:: with SMTP id z7mr7775302lfq.174.1585992019432; Sat, 04 Apr 2020 02:20:19 -0700 (PDT) Received: from nol (82-64-124-11.subs.proxad.net. [82.64.124.11]) by smtp.gmail.com with ESMTPSA id r23sm6434630ljh.34.2020.04.04.02.20.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Apr 2020 02:20:18 -0700 (PDT) Date: Sat, 4 Apr 2020 11:20:15 +0200 From: Julien Rouhaud To: Amit Kapila Cc: Dilip Kumar , Kuntal Ghosh , Fujii Masao , Kirill Bychik , PostgreSQL Hackers , Thomas Munro Subject: Re: WAL usage calculation patch Message-ID: <20200404092015.GE1206@nol> References: <20200404060303.n2q74lbccjm2swdc@nol> <20200404085423.GC1206@nol> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Apr 04, 2020 at 02:39:32PM +0530, Amit Kapila wrote: > On Sat, Apr 4, 2020 at 2:24 PM Julien Rouhaud wrote: > > > > > > We can add if we want but I am not able to convince myself for that. > > > Do you have any use case in mind? I think in most of the cases > > > (except for hint-bit WAL) it will be zero. If we are not sure of this > > > we can also discuss it separately in a new thread once this > > > patch-series is committed and see if anybody else sees the value of it > > > and if so adding the code should be easy. > > > > > > I'm mostly thinking of people trying to investigate possible slowdowns on a > > hot-standby replica with a primary without wal_log_hints. If they explicitly > > ask for WAL information, we should provide them, even if it's quite unlikely to > > happen. > > > > Yeah, possible but I am not completely sure. I would like to hear the > opinion of others if any before adding code for this. How about if we > first commit pg_stat_statements and wait for this till Monday and if > nobody responds we can commit the current patch but would start a new > thread and try to get the opinion of others? I'm fine with it. > > > > > > > > > > I'm wondering how stable the normalized > > > > WAL information would be in some regression tests, as the counters are only > > > > showed if non zero. Maybe it'd be better to remove them from the output, same > > > > as the buffers? > > > > > > > > > > Which regression tests are you referring to? pg_stat_statements? If > > > so, why would it be unstable? It should always generate WAL although > > > the exact values may differ and we have already taken care of that in > > > the patch, no? > > > > > > I'm talking about a hypothetical new EXPLAIN (ALAYZE, WAL) regression test, > > which could be unstable for similar reason to why the first attempt to add > > BUFFERS in the planning part of EXPLAIN was unstable. > > > > oh, then leave it for now because I don't see much use of those as the > code path can anyway be hit by the tests added by pg_stat_statements > patch. > Perfect then!