Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYjmk-0001iD-Co for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jan 2018 02:37:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYjmj-0007JN-Fr for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Jan 2018 02:37:05 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eYjmj-0007JD-4T for pgsql-hackers@lists.postgresql.org; Tue, 09 Jan 2018 02:37:05 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eYjmf-0008Tp-2Z for pgsql-hackers@postgresql.org; Tue, 09 Jan 2018 02:37:03 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 8832A20DD9; Mon, 8 Jan 2018 21:36:59 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 08 Jan 2018 21:36:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=pCiC4U WbtkuTdUuenbZ2/hiPCQfl7oXxsDA4YaF2xm4=; b=W8ECs+/wHdBmalLD2SOrod e8t9QMTPCK+/EHa/ZehsFXkKIF8EZk3DF7Q6IHzxY7lGzCVcXFWr8W0sVNOY//RG 1yLeJx4KegHdNylOd4BlsZkfRXUTQh6uBLu8KrVmCa6HmtL9l2iC+HaO940IcC4Z kO3vfPDPNZbbL0pjVm93UWpxPiKwF2If1HKvGjmBQ7f4WXmqXwALrcT+vy3kHnq9 FJJm0Jnhs7e/XoEQkP7THnJobXITH/huWYUR1ENRhVbKSSKEatD05ZiMxNeB3A1U vgO3NLivYbHhiuzKzYZf9sU2aR4q7UrCpXKlLFhvuiNMIRQuHkjnIXP5O8SUqgiQ == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 48EA0246CC; Mon, 8 Jan 2018 21:36:59 -0500 (EST) Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions To: Tomas Vondra , PostgreSQL Hackers References: <688b0b7f-2f6c-d827-c27b-216a8e3ea700@2ndquadrant.com> From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 8 Jan 2018 21:36:59 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/3/18 15:13, Tomas Vondra wrote: > Forgot to mention that the v4 also extends the CREATE SUBSCRIPTION to > allow customizing the streaming and memory limit. So you can do > > CREATE SUBSCRIPTION ... WITH (streaming=on, work_mem=1024) > > and this subscription will allow streaming, and the logica_work_mem (on > provider) will be set to 1MB. I was wondering already during PG10 development whether we should give subscriptions a generic configuration array, like databases and roles have, so we don't have to hardcode a bunch of similar stuff every time we add an option like this. At the time we only had synchronous_commit, but now we're adding more. Also, instead of sticking this into the START_REPLICATION command, could we just run a SET command? That should work over replication connections as well. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services