Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM2EL-0000uU-Ry for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Jun 2017 01:08:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dM2EL-000638-Et for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Jun 2017 01:08:49 +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 1dM2EK-00062Z-IJ for pgsql-hackers@postgresql.org; Sat, 17 Jun 2017 01:08:48 +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.84_2) (envelope-from ) id 1dM2EH-00038x-S1 for pgsql-hackers@postgresql.org; Sat, 17 Jun 2017 01:08:47 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 258212097C; Fri, 16 Jun 2017 21:08:45 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Fri, 16 Jun 2017 21:08:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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:x-sasl-enc; s= fm1; bh=Ng49KJPlD8of68JepUucNt7XAU/PJIY9QIS2clRihT8=; b=revBnNXZ nNYhRIcPintc+RHPsKcuhLo96uTcJVGnN1Ryq4BKBwSfK9suMFDkUK++aIqyUPUm uVr3lN4BUZvCLbEQ2/NeBeFh23UsokvHXLMHakJnPR/1Iwoct0LJWujTVl1L0fZM Yzadbp2s9kCx+puDH/zlDrlrJSimKEWXc2gUGZX9yuOU6cYG82p/jC9hB3mbkGps 7YV4SWY5t724U7/JQxzr6TqEb3gtW1Ek6hqWBTTqoX98dVU9bOAZperrIG9Khmfb jz/MhUAQ1OAnOzVPw0O6zA5DQ3V/T2M7jb7JKjY6++8DFqYR4w2JvQsHVfwcSQ2Y gPRJPJEuCHbv+g== X-ME-Sender: X-Sasl-enc: QYfqGn4yRkqH/jnjGnWRqvfGU+XVRF5+mHehc/EMcPit 1497661724 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 DCF39249CF; Fri, 16 Jun 2017 21:08:44 -0400 (EDT) Subject: Re: [BUGS] BUG #14699: Statement trigger and logical replication References: <20170609160109.26502.14118@wrigleys.postgresql.org> Cc: =?UTF-8?B?0JrQvtC90YHRgtCw0L3RgtC40L0g0JXQstGC0LXQtdCy?= To: pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Fri, 16 Jun 2017 21:08:44 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 6/16/17 09:13, Константин Евтеев wrote: > 2017-06-13 5:57 GMT+03:00 Peter Eisentraut > >: > > I think this is all working correctly and as intended. > > But then, why data copy for init logical replication fires statement > trigger. May be it is also not nedeed? > Or this feature needs to be mentioned in documentation? I don't know. Hackers? The issue is that the logical replication initial data copy fires a statement trigger for INSERT, because it's implemented as a COPY internally. By contrast, the normal apply worker does not fire any statement triggers (because they are not "statements"). We could adjust one or the other or leave it as is. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers