Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewrxA-0007uA-Dx for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Mar 2018 16:11:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ewrx9-0007QN-EA for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Mar 2018 16:11:35 +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.89) (envelope-from ) id 1ewrx8-0007QB-Jo for pgsql-bugs@lists.postgresql.org; Fri, 16 Mar 2018 16:11:35 +0000 Received: from sonic313-25.consmr.mail.gq1.yahoo.com ([98.137.65.88]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewrx5-000813-NM for pgsql-bugs@lists.postgresql.org; Fri, 16 Mar 2018 16:11:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1521216688; bh=BAECurpCtjbMHiTELL2cXBMT45Snb6CD9vqsN71qQv4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=lusxytw0VK9X18ZIqiQ26CbRl4PcK+MeHKNweGY7ZdDY2IRMyYhe7w3So6yG1yynbazwQl+4FROmf7dJm8GAtGsPyjg4W6iKYweJshcz0RoGu9xj8CVW7+Qdrglj+rISEde4+B9ztq4cy+2ahdvfYsf+LO1JXRk6+8GVenBEOSF62RseTHy5jWfZn2jxoqowWzr1okiG+NuDSDDrW+GAvqn87w9zQ1UmK0A/6c6CKqYBpVg2G4mrbsu+oT5vcynMA+pZEuSbU5Dtpzvcg87OiVOyIcdT8yPeGKDYlS0FxOUUxmPVou34bYCYFiBU20zdkuKSdvBygGSEES+Dp/9xYA== X-YMail-OSG: qpSukDgVM1nv.Evl_C8lnq8m6kRwX0SFiEwMfmIzcr0hc.c0wUC8.44fY7Zvxpj oebGMa0JvK8AQyPm5Hht6Ah2_J5xoUj2pj6KkGA0V9qKrOr9m9UGiz21Ub4kzQQBNmkvFeu5HHnT Z.RHGU4HR0Jmkz2bDljXWhm2n5dgng7DCiyhIVE7NVd9QWKeAJSxKqauTiTGwTQJ7HmMOxSdHBaC z86_Txf5IGZhjFu4sQvl9fDj_H1zNIsG.YrGDP7zSq7LNgRRb6pAkeDUDJ9Ziv4kS6xQARuqAw56 d2nj9g0D9ics1ZQg_XPYM5oJdlGjuEsNFy7HKJK.1dmX2cC.uKChMrj7UL8MVBaVaH9HHQHFZl.t jYHi0XdtVuDmMdBMmUCECAP2CuXfKA0NK2gAr.YWeURTd5FClfQHO92EWIDyLtEtOQenHJwNshvx 2xUs3lDRgPDuXkHFnEhpi5OMwPiFja4yOvcEYSvvUZTBBnkVXlEXd11FKFQ_LG0wdYknKKQOfI3M 3MgBPgwFDgRmvw6PqfdHQE7Tmpnci3bXusPtsOivxoC7js620aAQ- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Fri, 16 Mar 2018 16:11:28 +0000 Received: from c-24-130-144-35.hsd1.ca.comcast.net (EHLO Julis-MacBook-Pro.local) ([24.130.144.35]) by smtp413.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 63560130942475ada9ec60740220d9fc; Fri, 16 Mar 2018 16:11:24 +0000 (UTC) Subject: Re: BUG #15115: temporary AND unlogged tables for parallel db import To: Tom Lane , Andrew Gierth Cc: pgsql-bugs@lists.postgresql.org References: <152120772359.1215.16174625790404871093@wrigleys.postgresql.org> <878tasi0p2.fsf@news-spur.riddles.org.uk> <5d01c4db-6ca0-c780-870d-07a0c08added@yahoo.com> <874llghz6x.fsf@news-spur.riddles.org.uk> <33a6e05e-5dee-856e-d2a3-427eb190cc1e@yahoo.com> <87zi38gjrd.fsf@news-spur.riddles.org.uk> <27167.1521213903@sss.pgh.pa.us> From: Enno Wein Message-ID: Date: Fri, 16 Mar 2018 09:11:22 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <27167.1521213903@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk That sounds right. Every session (72 for now) creates and drops several (temp-) tables and indexes. Every session runs for about 30min, then does a final insert and exits afterwards. Depending on parallelism chosen, we run 8, 16 or 24 sessions in parallel. The main, (global-) table which persists has been declared as either logged or unlogged, there is much WAL traffic in any case. On 3/16/18 08:25, Tom Lane wrote: > Andrew Gierth writes: >> "Enno" == Enno Wein writes: >> Enno> However, it doesn't seem to work like that. Even with ONLY either >> Enno> unlogged (the global ones) and temprorary tables (the local ones), the >> Enno> system still produces a huge amount of WAL/checkpoint writes. > >> So what you just said above is that you get a lot of WAL/checkpoint >> writes when using unlogged non-temporary tables. What this implies is >> that you have something _else_ going on, involving persistent tables >> (i.e. non-temporary non-unlogged tables - these are the only kind that >> get their data changes WAL-logged). > > One theory is that the OP's workload involves a huge number of short-lived > temp tables, and then the WAL traffic is coming from the system catalog > changes involved in creating/dropping those tables (since even a temp > table must have entries in pg_class, pg_attribute, etc). That's only > a theory though, given the lack of any hard evidence in this thread. > > regards, tom lane >