Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3mQA-0006BM-8k for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Oct 2017 17:09:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e3mQ8-0002TD-Kp for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Oct 2017 17:09:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e3mOZ-0008A8-Of for pgsql-hackers@postgresql.org; Sun, 15 Oct 2017 17:08:11 +0000 Received: from mail-it0-x22e.google.com ([2607:f8b0:4001:c0b::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e3mOW-0003mf-L6 for pgsql-hackers@postgresql.org; Sun, 15 Oct 2017 17:08:10 +0000 Received: by mail-it0-x22e.google.com with SMTP id 72so15583481itk.3 for ; Sun, 15 Oct 2017 10:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rzRqlZlgOe261bd68C+R9PSCuUtdXfdWUZnDsk1jwY8=; b=ygXmK31UvjBmVqjaEMIsklATPm9BG6zT6sAibazaXhba0r0BNQPjngXfFY1qzBdNed 7kkgEFfuBqWCbAt8CvD2G6s3MdOuYZO3rwwZDiitAr9UT9xbsgVo89CUOUzgzEGTZYEu CasQpXVoqKpzYZ7QZDvIFhOtPfelKp1WsPgPz15N/BIbseJAuWbgeu3Dwo3nTJGH2G1Z TbRHL52qfv3JnjXfNxgmythfydufoQJNy7RHRhI/7FvxVPUmfZc/hn5kSaQK9FtVx4xl KhWjXPTa3OVSGMyWVUt7G11741VeUEFwp9h0pq1d4QaS3nfy1ROtXQkrmcPGVjgo5r9k 7jMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rzRqlZlgOe261bd68C+R9PSCuUtdXfdWUZnDsk1jwY8=; b=nham0WxiL/UDNKaLY6zQGCqE+VwVC5j3S049rsvrishRySLIcvxRuiYhqSPqlQsiYk HHyKT+48M8Ygo04zlz+IExDDM6dOkMWGWvKqsxKfVGhXukXKYJQHmquDc9WfHgXpXpKv 19p5fI8uCvy0W4ylRWzuDoLWsYdfv6yiha8kMMr/Fflsa/dYzCyd6IEKnp3JZarKqEW/ MQX/PtiA02xuFHAI/ZI0/OVWuiCSk/t7gA2+TgVTwT5eP5YcK71O2TVqa4dmsvJNPmcN yIXsU7Xz3KETQdYk0GZ/YVhQuAYOkSGoPGJDcUj1abf76Gt+wm2Rv7qnt/61/KswpKNE zSYw== X-Gm-Message-State: AMCzsaWb61jWeJvER1GfKi8M0r3j6mdpYE1q0XU+WvoynPyIG9/OYvj/ SF5XOaD5RXKl8lmkV1UiGmbAcQ== X-Google-Smtp-Source: ABhQp+SzlG9H72pd3fwaxWokCPmKhylzoGAIFTp7HK3yzVysI3NJI1R1hEUEvLFMCvcnQ3kwq9DzOw== X-Received: by 10.36.178.77 with SMTP id h13mr9306903iti.114.1508087286527; Sun, 15 Oct 2017 10:08:06 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e77sm1961267itc.25.2017.10.15.10.08.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Oct 2017 10:08:06 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 2599D80129D; Sun, 15 Oct 2017 12:08:05 -0500 (CDT) Date: Sun, 15 Oct 2017 12:08:05 -0500 From: Justin Pryzby To: Tomas Vondra Cc: pgsql-hackers@postgresql.org, Alvaro Herrera Subject: Re: SIGSEGV in BRIN autosummarize Message-ID: <20171015170805.GA15756@telsasoft.com> References: <20171014035732.GB31726@telsasoft.com> <20171014224220.GB22678@telsasoft.com> <74e6535c-4a96-6a3f-1e04-3068106c6f59@2ndquadrant.com> <20171015015656.GC22678@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171015015656.GC22678@telsasoft.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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 Sat, Oct 14, 2017 at 08:56:56PM -0500, Justin Pryzby wrote: > On Fri, Oct 13, 2017 at 10:57:32PM -0500, Justin Pryzby wrote: > > > Also notice the vacuum process was interrupted, same as yesterday (think > > > goodness for full logs). Our INSERT script is using python > > > multiprocessing.pool() with "maxtasksperchild=1", which I think means we load > > > one file and then exit the subprocess, and pool() creates a new subproc, which > > > starts a new PG session and transaction. Which explains why autovacuum starts > > > processing the table only to be immediately interrupted. > > On Sun, Oct 15, 2017 at 01:57:14AM +0200, Tomas Vondra wrote: > > I don't follow. Why does it explain that autovacuum gets canceled? I > > mean, merely opening a new connection/session should not cancel > > autovacuum. That requires a command that requires table-level lock > > conflicting with autovacuum (so e.g. explicit LOCK command, DDL, ...). > > I was thinking that INSERT would do it, but I gather you're right about > autovacuum. Let me get back to you about this.. I confirmed that we're taking an explicit lock before creating new child tables (as I recall, to avoid errors in the logs shortly after midnight when multiple subprocesses see data for the new date for the first time): 2017-10-15 12:52:50.499-04 | 59e3925e.6951 | statement: LOCK TABLE cdrs_huawei_sgsnPDPRecord IN SHARE UPDATE EXCLUSIVE MODE Probably we can improve that with LOCK TABLE ONLY. Justin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers