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 1n66JF-0001hU-UQ for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Jan 2022 07:38:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n66JE-0000TS-In for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Jan 2022 07:38:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n66JE-0000TI-9Z for pgsql-hackers@lists.postgresql.org; Sat, 08 Jan 2022 07:38:40 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n66J9-0002GE-Ui for pgsql-hackers@postgresql.org; Sat, 08 Jan 2022 07:38:39 +0000 Received: by mail-pg1-x52f.google.com with SMTP id b133so704290pga.3 for ; Fri, 07 Jan 2022 23:38:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=5XpeyNxy7VdT98oW8Ux3F+EwIa/i/Y3XMZEwLJjfEK4=; b=YjVTgzGCmBkC9KRI86tTZWofwhu0n4grGkTaHwftamyVe44mO8uTnyKHH7Re3b6whW Amb8QPB7MGqoMuAGQCydeORu+2u6h+sRNoWNJRom2/QUNxfyjM4wOlOFK9/s9D4C4Mzq 4OPcSEPPlhYLofx1Fdq4PghPp6aqmGe/apbb8z0bBX1QRuQjVXfLnCJrulN1e6A2PUaa UhjgMR9m5CTZvWyayu0Xfk0hZjCr3jntixhWz8NTgZoAutH+VDSdZfsvYmpYX0iEiSRk lzGKtqxoxQBjhFnSM+HhEfjXKOvCb+NAc1f0KjmeHq882ekg+CST0RqmRDI5c6usEdH3 k0eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=5XpeyNxy7VdT98oW8Ux3F+EwIa/i/Y3XMZEwLJjfEK4=; b=RyN1jynp1WEXbj5mrSB6997cDrz5qtq9QaHWAmq8z9XrogCyRu8o1MXFT9fs0XcxYI S6DOZluZIT5xnUI58Shge0MOR727A6lKPR+MLxaRIq1QkwVZxoZ78KJirMQRlzUK05QP ScFdTJFIr007wEVLCMaLl/tDqotjwehw0CCXR9zV8GPhgnGwoBF1KhR9aeW/pXVJsIhf MDLEyqiALRH/R9iDV+1I02ZSJssQAB3buqZpahGTzHQibLna6p/mSu9yRm9Igi9Khk3D TSLe+ZHXaHVbGiXyzFy9Ta/eIlACrRnrltB9V3lAFzx7SfYIuNxAaFNAMdiZAtK7Q4IG AJag== X-Gm-Message-State: AOAM533D5dIEv2/G8IuEhDJjhVqvpQKwxKO6GmUjyQSFQh77C5wGJzee /WFU1PVdNHa8qi/4Zj2j2o/QYg== X-Google-Smtp-Source: ABdhPJwkreIV7pH3WSUWyfwFVAScYPy+26weIAhM4SAgiE4H58qtXXXDz+0CBGe/JdyWM1vLEcAgFw== X-Received: by 2002:a63:fe10:: with SMTP id p16mr58616551pgh.546.1641627513741; Fri, 07 Jan 2022 23:38:33 -0800 (PST) Received: from jdavis.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id d11sm1056643pfu.211.2022.01.07.23.38.32 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jan 2022 23:38:33 -0800 (PST) Message-ID: <9da4d877048f767d36283fca1a3d133112fceca7.camel@j-davis.com> Subject: Re: Non-superuser subscription owners From: Jeff Davis To: Mark Dilger Cc: Amit Kapila , Andrew Dunstan , PostgreSQL-development , Robert Haas Date: Fri, 07 Jan 2022 23:38:31 -0800 In-Reply-To: <92BEDE2A-8043-4F50-9BD8-46977A9A2972@enterprisedb.com> References: <9DFC88D3-1300-4DE8-ACBC-4CEF84399A53@enterprisedb.com> <6BB4451E-7B1B-474C-BD1F-DB7531E720C6@enterprisedb.com> <6A2B0FF6-CC86-48CE-B0D3-5401AA5CFEA9@enterprisedb.com> <1BB0A553-3FE9-4A91-A975-6F9D8C157FBD@enterprisedb.com> <7C62876F-5D19-4B5C-96AC-5590B10A49B2@enterprisedb.com> <66f55a6b9ff7bdd6bfd0d05e8fd8351690e69e23.camel@j-davis.com> <92BEDE2A-8043-4F50-9BD8-46977A9A2972@enterprisedb.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2021-12-15 at 12:23 -0800, Mark Dilger wrote: > > On Nov 24, 2021, at 4:30 PM, Jeff Davis wrote: > > > > We need to do permission checking for WITH CHECK OPTION and RLS. > > The > > patch right now allows the subscription to write data that an RLS > > policy forbids. > > Version 4 of the patch, attached, no longer allows RLS to be > circumvented, but does so in a course-grained fashion. Committed. I tried to do some performance testing to see if there was any impact of the extra catalog + ACL checks. Logical replication seems slow enough -- something like 3X slower than local inserts -- that it didn't seem to make a difference. To test it, I did the following: 1. sent a SIGSTOP to the logical apply worker 2. loaded more data in publisher 3. made the subscriber a sync replica 4. timed the following: a. sent a SIGCONT to the logical apply worker b. insert a single tuple on the publisher side c. wait for the insert to return, indicating that logical replication is done up to that point Does anyone have a better way to measure logical replication performance? Regards, Jeff Davis