Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKuJp-0005O4-3F for pgsql-docs@arkaria.postgresql.org; Thu, 30 Jul 2015 20:20:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZKuJn-0001LK-JI for pgsql-docs@arkaria.postgresql.org; Thu, 30 Jul 2015 20:20:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZKuJn-0001LC-9j for pgsql-docs@postgresql.org; Thu, 30 Jul 2015 20:20:43 +0000 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZKuJj-00010x-Nt for pgsql-docs@postgresql.org; Thu, 30 Jul 2015 20:20:42 +0000 Received: by vkgc186 with SMTP id c186so14116115vkg.0 for ; Thu, 30 Jul 2015 13:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=j4yn/yorMRUwnTaZwtrRDcZLvx5LKyJAu+aYOzLQlXo=; b=tpS2kzg/Ew3SBTZbDCQYFvam1Xz2maqB5YHSL5G2iMwdrA9tUay/52Xb3vQky1kVlj eXoJZe1t9+lEBzNf92RvkoAlAmxXMGBk5SAM9bGHxhPm47YRxdgR5Th4UiTzDXLvbenS GFWO0SkzbUS73X2UhtXBI+li5Q0kZ8CQ57FWn6B2rlHcFfSD05MxcmuM7uSzNa/mxISY 3up8ADn4tdvQo/0qVUXPTcDUGLRfz2+DYgAv8LhaOq+AGqsv1KgJ8vc11BBPCXpxKeh6 WZpKj9A8P/Hh7o6oee71ig29c7/cfNDN4str3pUqK+cqa4H6iHvjx7mlRcoi0JZF8UYa PjvA== MIME-Version: 1.0 X-Received: by 10.52.89.196 with SMTP id bq4mr56280383vdb.85.1438287638251; Thu, 30 Jul 2015 13:20:38 -0700 (PDT) Received: by 10.31.1.215 with HTTP; Thu, 30 Jul 2015 13:20:38 -0700 (PDT) In-Reply-To: <55B9D677.8000800@iki.fi> References: <55B9D677.8000800@iki.fi> Date: Thu, 30 Jul 2015 16:20:38 -0400 Message-ID: Subject: Re: bgworker / SPI docs patches From: Robert Haas To: Heikki Linnakangas Cc: Craig Ringer , pgsql-docs Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On Thu, Jul 30, 2015 at 3:47 AM, Heikki Linnakangas wrote: > Hmm. worker_spi module uses bgw_main. Is that bad? Given that work_spi is > supposedly an example or template that you copy-paste from when writing your > own bgworker, we should make sure it follows the best practice. Also, I note > that worker_spi doesn't memset(0) its BackgroundWorker struct, so any > uninitialized fields will contain garbage. Including bgw_library_name and > bgw_function_name. That seems bad. Yeah, that stuff is bad. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs