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 1kFvhy-0003Qv-0l for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2020 08:44:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFvhw-0002ee-In for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2020 08:44:00 +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 1kFvhw-0002eJ-Bi for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2020 08:44:00 +0000 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kFvht-0000rB-Bg for pgsql-hackers@postgresql.org; Wed, 09 Sep 2020 08:43:59 +0000 Received: by mail-ej1-x642.google.com with SMTP id i26so2319494ejb.12 for ; Wed, 09 Sep 2020 01:43:57 -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:references:mime-version :content-disposition:in-reply-to; bh=xY90FffUaAUwNcJ7Nxz1/4ajO1tHO9PMv/mHAALPyhc=; b=b6Q7ZSaHo/NSwsn5AlBGIZBzmioBgHvT+LUFM7KTQNGQHZCb9biAciy6Edz9Dr0vwv hlv0/KaBsrGyCVvYRl7PajSSHPl9WVl+Xizv83R57gXUciRgPShy8Nd6cAVFMe2m+k8n yc9hPgJdFrEV+/f6wYnnT4Xb3vP+qgZ/DKPg/shhriRj3DzMMCCmILsnyToNWtMH2G2p D9Ct6nDOFzMSy/+e4DvFE4ZWU8LM0W6aDHmAVJ5oAKhueuOql4q/f93DC+qKkLM9AjIv dVVqClAcdoOGR+rraf5m2PYVaFApHBcpUkzLiO3tDf2eOdMSsibw7TV8t7zozMH3BBjE CbEw== 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=xY90FffUaAUwNcJ7Nxz1/4ajO1tHO9PMv/mHAALPyhc=; b=fPAYub/s1LCovFEVioRq8s/D6ZUBuQxaq9RMa7zrwV3dPg9+7xt49Q4bMEqLywY0Lx kHoYxtJIeQyn2lUiXHZ8Jp9sv2St6UkiaiOwSbZgK6ku5MpeWB9TBE6CswS/nTycy67f ZXdVsVE5c/fuZC+Bp5eyGTNOOS/cJAWbgRbYmvNenzBv8aYxdWN7lOCllDPxEm/yzTY+ QObYEUkPGdKbibtXXhaKcLEHlZ7AyPDbE04Hk8tGoAoUPOqh9emB6a4Lzr0yhe6WJAq5 2EnQ0W5HrSiJS4PDqUQho/Qy5aTE/kzDRQn6VHHPQpqZiBmcKgj83H32stNre7ZGEWhB BSxg== X-Gm-Message-State: AOAM5328ZvIvqIcbBhLlWWCO9+LgsZN+5+UNeFpQ9Y6vECpG8kKOR3yN 8jjrugc4QLxrDwIBGYFd9w02vg== X-Google-Smtp-Source: ABdhPJxCA3DB4emwoukvR1/TrhZIy1WVZJBwfx91/BWRnwQIMfn8Z0/Mv+rdcF8GIEqnj8J/paYJaA== X-Received: by 2002:a17:906:b10:: with SMTP id u16mr2493234ejg.179.1599641036000; Wed, 09 Sep 2020 01:43:56 -0700 (PDT) Received: from localhost (ip-86-49-253-216.net.upcbroadband.cz. [86.49.253.216]) by smtp.gmail.com with ESMTPSA id mb16sm1365513ejb.45.2020.09.09.01.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 01:43:54 -0700 (PDT) Date: Wed, 9 Sep 2020 10:43:53 +0200 From: Tomas Vondra To: Amit Kapila Cc: Dilip Kumar , Erik Rijkers , Jeff Janes , Kuntal Ghosh , Michael Paquier , Peter Eisentraut , PostgreSQL Hackers Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions Message-ID: <20200909084353.pncuclpbwlr7vylh@development> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="vqdsnmjotud2qiqn" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --vqdsnmjotud2qiqn Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Hi, while looking at the streaming code I noticed two minor issues: 1) logicalrep_read_stream_stop is never defined/called, so the prototype in logicalproto.h is unnecessary 2) minor typo in one of the comments Patch attached. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --vqdsnmjotud2qiqn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="streaming-fixes.patch" diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c index c29c088813..343f03129f 100644 --- a/src/backend/replication/pgoutput/pgoutput.c +++ b/src/backend/replication/pgoutput/pgoutput.c @@ -77,7 +77,7 @@ static void send_relation_and_attrs(Relation relation, TransactionId xid, * and with streamed transactions the commit order may be different from * the order the transactions are sent in. Also, the (sub) transactions * might get aborted so we need to send the schema for each (sub) transaction - * so that we don't loose the schema information on abort. For handling this, + * so that we don't lose the schema information on abort. For handling this, * we maintain the list of xids (streamed_txns) for those we have already sent * the schema. * diff --git a/src/include/replication/logicalproto.h b/src/include/replication/logicalproto.h index 53905ee608..607a728508 100644 --- a/src/include/replication/logicalproto.h +++ b/src/include/replication/logicalproto.h @@ -133,7 +133,6 @@ extern void logicalrep_write_stream_start(StringInfo out, TransactionId xid, extern TransactionId logicalrep_read_stream_start(StringInfo in, bool *first_segment); extern void logicalrep_write_stream_stop(StringInfo out); -extern TransactionId logicalrep_read_stream_stop(StringInfo in); extern void logicalrep_write_stream_commit(StringInfo out, ReorderBufferTXN *txn, XLogRecPtr commit_lsn); extern TransactionId logicalrep_read_stream_commit(StringInfo out, --vqdsnmjotud2qiqn--