Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YISzn-0005QH-TU for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Feb 2015 02:13:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YISzn-00030w-7O for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Feb 2015 02:13:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YISzm-00030q-Bt for pgsql-hackers@postgresql.org; Tue, 03 Feb 2015 02:13:42 +0000 Received: from mail-bn1bon0696.outbound.protection.outlook.com ([2a01:111:f400:fc10::1:696] helo=na01-bn1-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YISzi-0004n1-72 for pgsql-hackers@postgresql.org; Tue, 03 Feb 2015 02:13:40 +0000 Received: from decina.local (24.55.12.91) by CY1PR11MB0345.namprd11.prod.outlook.com (25.161.165.13) with Microsoft SMTP Server (TLS) id 15.1.75.20; Tue, 3 Feb 2015 02:13:32 +0000 Message-ID: <54D02EC5.1030505@BlueTreble.com> Date: Mon, 2 Feb 2015 20:13:25 -0600 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Robert Haas CC: Pg Hackers Subject: Re: Comment patch for bgworker.c References: <544AF3FB.5000604@BlueTreble.com> In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [24.55.12.91] X-ClientProxiedBy: BY2PR06CA026.namprd06.prod.outlook.com (10.141.250.144) To CY1PR11MB0345.namprd11.prod.outlook.com (25.161.165.13) Authentication-Results: postgresql.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:CY1PR11MB0345; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:CY1PR11MB0345; X-Forefront-PRVS: 0476D4AB88 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(51704005)(377454003)(479174004)(24454002)(66066001)(110136001)(19580395003)(86362001)(92566002)(19580405001)(83506001)(80316001)(42186005)(50466002)(1411001)(33656002)(47776003)(46102003)(54356999)(87266999)(76176999)(23676002)(50986999)(65816999)(87976001)(2950100001)(15975445007)(122386002)(36756003)(77156002)(62966003)(40100003)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR11MB0345; H:decina.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:CY1PR11MB0345; X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2015 02:13:32.5020 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR11MB0345 X-Pg-Spam-Score: -1.9 (-) 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 2/2/15 7:49 AM, Robert Haas wrote: > On Fri, Oct 24, 2014 at 8:51 PM, Jim Nasby wrote: >> The comment for the BackgroundWorkerSlot structure tripped me up reviewing >> Robert's background worker patch; it made it clear that you need to use a >> memory barrier before setting in_use, but normally you'd never need to worry >> about that because RegisterDynamicBackgroundWorker() handles it for you. >> Patch adds a comment to that effect. > > I vote to reject this patch. I think it's explaining something that > doesn't really need to be explained, and shouldn't be explained like > this even if it does. It adds a comment that reads "Note that > RegisterDynamicBackgroundWorker() handles in_use correctly for you". > But the long block comment of which it is a part is entirely devoted > to explaining concerns internal to bgworker.c, from which I think it > should be inferred that all of the public APIs in that file handle all > of the things in that paragraph correctly (or are intended to, > anyway). At this point I don't remember what it was in your patch that tripped me up on this, so I'm marking the patch rejected. -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers