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 1nXqGq-0007rL-20 for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Mar 2022 20:10:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nXqGo-0005UE-UT for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Mar 2022 20:10:50 +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 1nXqGo-0005U4-8j for pgsql-hackers@lists.postgresql.org; Fri, 25 Mar 2022 20:10:50 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nXqGj-0006AR-3w for pgsql-hackers@lists.postgresql.org; Fri, 25 Mar 2022 20:10:49 +0000 Received: by mail-ej1-x633.google.com with SMTP id qa43so17420781ejc.12 for ; Fri, 25 Mar 2022 13:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=obavV2Nlwa/B5omZkjJPzb5YAFAEDfcnSzjJZrmQlAA=; b=Dz2w1qaDw/Fkt4GpzBNKYjW9tgQ6ImLbuC3Rd5u0iQGfRpIk3zkZfb/4sFFujk4vE2 bo5wpraivVTONBkIeBZ6lGIVXfd9Oc/n/vRIf0RToap7Og9F7DDHWmEuhfDnAM1HOuU6 jhOfugR2RCLOsuZZyxvCURHaq+8BdGodNWFzM1tEdVR0g+CXoozNfCZgNJfBiGLesVQv Y8YaKFn0y+DOrwiRaOwi8mvUMYqPzWBJmuasV+rJyQuVF38XKGyFDCGkN1h7clkymwkF h7Z4oKYkJh/7ONtO2S4tFHhCTDC60qbQZCmkSM5l75vdar8dsEw2Y+dvf+ZPjcKg6eor 84sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=obavV2Nlwa/B5omZkjJPzb5YAFAEDfcnSzjJZrmQlAA=; b=SMkP5L3f8/eQszRjQ6+PlIe+neDS18xvF+VsusBDIuCdTcur+QY0/b/hA6vDIhcFhW gKNugThofG88pmSeumBGmWvmL8DC7V+FIQv1/FYJtUiK3Cd6XgeCrCN4cvFxJLgfqSKB 613JTeUJvMu7CoHDuAtZt5Tomzoc6PDCMiKYNJBmbgMjAWwontapC3c1m+FAhtPml8LH zZSlUJY23qXV7q8gd+ZDZ/S1JV19G7Ic2gBddBqT/kk51MF/hIkSRi0VKtc4Ypnpu0dz MS6/x3dAOFa3X/ssy5qfqz4dtoKIbEvc3FnTOJWocV9bgeHnaM9uRwDoEjrpDXPch/bN LpgQ== X-Gm-Message-State: AOAM530lAvNFCH5IE+wxsitQPbutsdllyzEk1FGpvUMTX1CKRGw3fGGL q2l8bAAp+nHZrspxvm/jAj3w0ndPlaymrnJKOnrTx/In82e4xNGM8bO7X4vipZFS9VmX4Vi77Es LYuyFb6xj5U7LaPho9jEL+Lkiq8Ka0VjN/RXivc2TtkPRPdDj/YlbdH44k6tyC9m+TPlu0vqH5c rmcvtPG/+At2+BPncFNXraVMdRlyqmzKClXltgTqQopHxAfYO2B1Ma X-Google-Smtp-Source: ABdhPJyt3ngGffjFSC5EJMT2k3jb1YPrfeT6+NTYXrMnN1PIFxPWakPN50GBiSsH9XqW5f2wYg0L7g== X-Received: by 2002:a17:907:6090:b0:6df:edc5:12a1 with SMTP id ht16-20020a170907609000b006dfedc512a1mr13316939ejc.694.1648239043691; Fri, 25 Mar 2022 13:10:43 -0700 (PDT) Received: from [10.137.0.17] (ip-86-49-251-241.net.upcbroadband.cz. [86.49.251.241]) by smtp.gmail.com with ESMTPSA id o12-20020a50c90c000000b0041907e62024sm3241564edh.85.2022.03.25.13.10.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Mar 2022 13:10:43 -0700 (PDT) Message-ID: Date: Fri, 25 Mar 2022 21:10:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: logical decoding and replication of sequences Content-Language: en-US To: Amit Kapila Cc: Petr Jelinek , Peter Eisentraut , PostgreSQL Hackers References: <9defb937-20a9-1d9f-6972-f1c4b4da4f73@enterprisedb.com> <8e766e0f-ed3e-fd68-4b0f-10dd2db60c88@enterprisedb.com> <6b21233e-c880-e4ad-5df2-7832f769296c@enterprisedb.com> <9da788c7-01eb-f11d-aa08-c5f61fe9f33a@enterprisedb.com> <456A528F-8F19-41C7-9857-927024D32396@enterprisedb.com> <74729cc5-960b-9295-912a-a7c37356a0c4@enterprisedb.com> <9d7635f8-2402-e038-64da-cbc3732ce8cf@enterprisedb.com> From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I've fixed most of the reported issues (or at least I think so), with the exception of those in apply_handle_sequence function, i.e.: 1) properly coordinating with the tablesync worker 2) considering skip_lsn, skipping changes 3) missing privilege check, similar to TargetPrivilegesCheck 4) nicer error message if the sequence does not exist The apply_handle_sequence stuff seems to be inter-related, so I plan to deal with that in a single separate commit - the main part being the tablesync coordination, per the fix I shared earlier today. But I need time to think about that, I don't want to rush that. Thanks for the feedback! -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company