Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVfti-00048S-4z for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jun 2018 16:23:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVftg-0002pZ-5Q for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Jun 2018 16:23:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVftf-0002pP-RJ for pgsql-hackers@lists.postgresql.org; Wed, 20 Jun 2018 16:23:51 +0000 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fVftb-0004xL-Cw for pgsql-hackers@postgresql.org; Wed, 20 Jun 2018 16:23:51 +0000 Received: by mail-qk0-x244.google.com with SMTP id c198-v6so67732qkg.12 for ; Wed, 20 Jun 2018 09:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=rH9n62lVqD/gSynK7bg3TAofX+VlY4+XSMJHpp3LFlw=; b=RWdxbLAn0BPFFP+xuoV1xtI24EuBHkzCKXjmSVZUYfGjgmKn4nc4EWO40DdOzE6ybc JUF+Mj3BQW41oMtB1wy421ZJ0RNxFbIO30/8OsUOXqqqQhKUjeq2SYLec6ewM1/33Az2 aKG5BjL/vs7340OM6qZl5jEcn+8qWJ4JBOJMXgOUunRWI8H5ykPmbmhSmblA+IC5z59I JRm5gSRiSDtQajI5lwlHr37YNOl3qibh32DEynPpwo4oPdv7bZg2V4D5e4x96pGsJq37 PHef15vr/X/ZsIFfS94UW1icRrpOfn3gRgDelqyABv9GKaeaY2UfQDTz5CeWDf03hfVi laPw== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=rH9n62lVqD/gSynK7bg3TAofX+VlY4+XSMJHpp3LFlw=; b=SnbNblr2TGv4V/wyMSGdEO0xkFkcIF/cTQvjcItL/3TYW4qqfkdZzNTDnp1DV2rP+q u7lAMdomULn1gu61xjmsk2XmwtYrqMR9fFgheR9dURHm875g3mDwwBImnFB0Fm9Pbiy6 bHi3bXe7a0qpwTNhtY0YwNyLzErINJsxK7cpC6hER2qmNFGwMyrp9XCtS5Uyy+DiTScI d+5Gc78FchGQinyKbhHYq/i3YrK+LA5ljLLLa6n5ImQpQpeos+XSe6v9iOUgshcCipaF dY+J+H8Pv0B/KJDa9d09/umeuASaQcr6LoOSGzMP/zk9gDr9D5Gx6RV1RaYp5viwwbme GoGg== X-Gm-Message-State: APt69E2ZocwtBailbD0b5hjftgoZWXldp1wEcN2oilI1xzkvczaw31ZA hGohh4u69hPB+stR8gg9qY8EZQ== X-Google-Smtp-Source: ADUXVKJHwvHV8FiUhYqZM8FvTuKhaw3sP/JEB0xxxX1OElwnetCQMHN3ata7pM51Nk9RcW/EEfZ4Wg== X-Received: by 2002:a37:5bc6:: with SMTP id p189-v6mr18140625qkb.212.1529511825433; Wed, 20 Jun 2018 09:23:45 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id j28-v6sm2173595qtk.56.2018.06.20.09.23.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 09:23:44 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id F122E9F3; Wed, 20 Jun 2018 12:23:42 -0400 (-04) Date: Wed, 20 Jun 2018 12:23:42 -0400 From: Alvaro Herrera To: Nikhil Sontakke Cc: Heikki Linnakangas , Michael Paquier , Simon Riggs , pgsql-hackers Subject: Re: pgsql: Store 2PC GID in commit/abort WAL recs for logical decoding Message-ID: <20180620162342.zfpxeriuk4oafxln@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180615191218.py3ti2fzxlysxf7h@alvherre.pgsql> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Jun-15, Alvaro Herrera wrote: > By the way, why do we need to strlen() the target buffer when strlcpy > already reports the length? (You could argue that there is a difference > if the string is truncated ... but surely we don't care about that case) > I propose the attached. I decided not to push this after all. Yes, one strlen is saved, but there is some code clarity lost also, and this is certainly not a contention point. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services