Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fJ31y-0006ow-Ls for pgsql-general@arkaria.postgresql.org; Wed, 16 May 2018 20:28:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fJ31w-0007RQ-Jy for pgsql-general@arkaria.postgresql.org; Wed, 16 May 2018 20:28:12 +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.89) (envelope-from ) id 1fJ31w-0007RH-CM for pgsql-general@lists.postgresql.org; Wed, 16 May 2018 20:28:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fJ31t-0002I5-I1 for pgsql-general@lists.postgresql.org; Wed, 16 May 2018 20:28:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w4GKS5P2011850; Wed, 16 May 2018 16:28:06 -0400 From: Tom Lane To: Jonathan Marks cc: pgsql-general@lists.postgresql.org Subject: Re: Rapid disk usage spikes when updating large tables with GIN indexes In-reply-to: <6D9599DA-B74E-46DF-BA66-55A408A82E68@gmail.com> References: <26217.1526318186@sss.pgh.pa.us> <31807.1526324895@sss.pgh.pa.us> <3F92DA72-F04E-4154-AB04-B2792DD904F1@gmail.com> <6D9599DA-B74E-46DF-BA66-55A408A82E68@gmail.com> Comments: In-reply-to Jonathan Marks message dated "Wed, 16 May 2018 16:10:26 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <11848.1526502485.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 16 May 2018 16:28:05 -0400 Message-ID: <11849.1526502485@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jonathan Marks writes: > We turned on log_temp_files and since the last stats reset (about a week= ago) we=E2=80=99re seeing 0 temp files altogether (grabbing that info fro= m pg_stat_database). Hm. > Another thread we found suggested pg_subtrans =E2=80=94 this seems less = likely because we=E2=80=99ve been able to replicate this across many diffe= rent types of connections etc. but thought it might be a potential source. We're running out of other ideas, so maybe, but it's kind of hard to credit large numbers of gigabytes going into pg_subtrans et al. Still, you could easily adapt your WAL-size query to track the sizes of other DB subdirectories and see if anything springs out. Since I'm really feeling a bit baffled at this point, I'd suggest watching all of them: pg_commit_ts/ pg_dynshmem/ pg_logical/mappings/ pg_logical/snapshots/ pg_multixact/members/ pg_multixact/offsets/ pg_logical/ pg_multixact/ pg_notify/ pg_replslot/ pg_serial/ pg_snapshots/ pg_stat/ pg_stat_tmp/ pg_subtrans/ pg_tblspc/ pg_twophase/ pg_wal/ pg_xact/ regards, tom lane