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 1mnRWc-00068x-Rk for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Nov 2021 20:27:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mnRW6-0003pL-AH for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Nov 2021 20:26:50 +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 1mnRW6-0003pC-1D for pgsql-hackers@lists.postgresql.org; Wed, 17 Nov 2021 20:26:50 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mnRW3-0006Yx-5o for pgsql-hackers@postgresql.org; Wed, 17 Nov 2021 20:26:48 +0000 Received: (Authenticated sender: adsend@dunslane.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 6E8631C0006; Wed, 17 Nov 2021 20:26:43 +0000 (UTC) Message-ID: <64a00122-26f3-678e-73a8-4bbd69de831d@dunslane.net> Date: Wed, 17 Nov 2021 15:26:41 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: Non-superuser subscription owners Content-Language: en-US From: Andrew Dunstan To: Mark Dilger Cc: PostgreSQL-development , Robert Haas References: <9DFC88D3-1300-4DE8-ACBC-4CEF84399A53@enterprisedb.com> <6BB4451E-7B1B-474C-BD1F-DB7531E720C6@enterprisedb.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/16/21 15:06, Andrew Dunstan wrote: > On 11/3/21 15:50, Mark Dilger wrote: >>> On Nov 1, 2021, at 10:58 AM, Mark Dilger wrote: >>> >>> ALTER SUBSCRIPTION..[ENABLE | DISABLE] do not synchronously start or stop subscription workers. The ALTER command updates the catalog's subenabled field, but workers only lazily respond to that. Disabling and enabling the subscription as part of the OWNER TO would not reliably accomplish anything. >> I have rethought my prior analysis. The problem in the previous patch was that the subscription apply workers did not check for a change in ownership the way they checked for other changes, instead only picking up the new ownership information when the worker restarted for some other reason. This next patch set fixes that. The application of a change record may continue under the old ownership permissions when a concurrent command changes the ownership of the subscription, but the worker will pick up the new permissions before applying the next record. I think that is consistent enough with reasonable expectations. >> >> The first two patches are virtually unchanged. The third updates the behavior of the apply workers, and updates the documentation to match. > > I'm generally happier about this than the previous patch set. With the > exception of some slight documentation modifications I think it's > basically committable. There doesn't seem to be a CF item for it but I'm > inclined to commit it in a couple of days time. > > Given there is some debate about the patch set I will hold off any action for the time being. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com