Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEHhu-0000p4-8o for pgsql-general@arkaria.postgresql.org; Wed, 10 Apr 2019 18:12:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hEHhs-000455-VR for pgsql-general@arkaria.postgresql.org; Wed, 10 Apr 2019 18:12:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEHhs-00044G-F4 for pgsql-general@lists.postgresql.org; Wed, 10 Apr 2019 18:12:20 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEHhp-0001J4-Fz for pgsql-general@postgresql.org; Wed, 10 Apr 2019 18:12:18 +0000 Received: by mail-pl1-x642.google.com with SMTP id n8so1883689plp.10 for ; Wed, 10 Apr 2019 11:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=Of4pQUt8ZuMDq+9ZXnRUew7V1dHydXMxrHwfCQHT7ek=; b=PJMGKkhs6727dw8iRTFfDm5sNOchIuKVWWoyX83nnBvL4oLaqJBP8f40C3te8ZIY8/ v624nFnhj9V3wqrXqtuiqC1nTUg3ARDYmGBPd5F9Jn8Vz9XMUNMQ+vHZNrXWuqZQ6XQx zS/WzcYQrIQQnBJZxmvKwCjtn77dxQ2kr44nANM7DuRNM55zDrZ3qBl5LOHb6W2cW3ja q1TshprEi3YgGzRWd4S+oxFaWVnz7GF12tlOfTkbzyPw42CCo1ex7XQ2FNWzpTP56lAP NZZgFr2SH8LeIVC9hsCjSUi+ra6ZY6ujZBdoXprhXlutoZKI1kLGtzAIuNu40dmn8KRN 7bjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=Of4pQUt8ZuMDq+9ZXnRUew7V1dHydXMxrHwfCQHT7ek=; b=BNxVDo8DLrY79yB9EgfXXXyXeSNwtsRUL+sREB9ddecHDpdWpGe7cs7me+Ng/Hl7S0 1WX5jm3r1HofkbCo3Z6htUd4h1SVbGwXSE0VJIkeaAHTuvEP5CUv77X5QOuzIYCyz23U 05ahbJ5mHn13GtUN0CtKy52AY734eB3H5DmTtK+nfKhF5V/uSckH33Xeda5Xp4GNzMOd AFNsdOzaz8Oom4S39qmMkRCId4K7eJHFNYSvRjJZAKBu1fnCdAO+lrYeHjFZV6zVBpHi 8sFXPwOronoo0/7QNXNbhMf1G6k4xkE3yZ3Iwb/L1BTGftzaTtaWGoV/l3Ayy8b8zXog 3/+w== X-Gm-Message-State: APjAAAUwcfIogjq1HKfdjt1cVXpzFaf8m3uENH30p5T5Dej7uHy3Zaxi 1t64LUGIych3ScaBMp1a/u2pKvTL X-Google-Smtp-Source: APXvYqyZh70oo+zWseCM3BpuJraif5YuQDMQf3aw5zhEfsWDDIUudt53HyDUK/LamIb672p1RVkLvQ== X-Received: by 2002:a17:902:1681:: with SMTP id h1mr31303704plh.102.1554919936059; Wed, 10 Apr 2019 11:12:16 -0700 (PDT) Received: from [10.104.134.14] ([155.100.47.6]) by smtp.gmail.com with ESMTPSA id p17sm48445990pfn.157.2019.04.10.11.12.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 11:12:15 -0700 (PDT) Subject: Re: stale WAL files? To: Rene Romero Benavides Cc: Michael Paquier , Adrian Klaver , "pgsql-general@postgresql.org" References: <10FF70E2-9F70-4469-A4F4-4081988F0204@gmail.com> <3dccbbe4-e115-11ab-2d78-74c3cc9e2e43@aklaver.com> <599C6022-1DA1-477D-895C-7E217D350B85@gmail.com> <20190328133005.GB2558@paquier.xyz> <973f0fdf-e20f-a8a1-86c8-7f145eb31b70@gmail.com> <20190329125811.GF1954@paquier.xyz> <989E476E-D798-4F80-ADDE-3DA4EB9CAA3C@gmail.com> <6F2111AD-1CD9-4077-AA8B-F6E1F7AD809D@gmail.com> From: Rob Sargent Message-ID: <04f4bc5d-be30-c1da-4d5c-db0f71b20324@gmail.com> Date: Wed, 10 Apr 2019 12:12:13 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------0C70BF391AC0B3A4C93C5005" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------0C70BF391AC0B3A4C93C5005 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit > As per your configuration : > max_wal_size = 50GB > this seems to be the cause for the WAL files piling up. > > this has been declared twice, the last one is taking effect. > -- > El genio es 1% inspiración y 99% transpiración. > Thomas Alva Edison > http://pglearn.blogspot.mx/ > I've manage to generate another 359 WAL files in a 10 minute span yesterday (now only 357 remain and I suspect they will wither away as before).  Are these being held simply because of the high max_wal_size value? This is a development environment, wherein I'm loading 4M+ records, first into 41 staging tables 100K rows per.  In a loop over each staging table, the data is then placed into application tables via selects. First select * into "matching table" then select id into intersection record (id, fixed groupId).  Each such iteration is in it's own transaction.  I have dropped and recreate this same database numerous times working my way up from 100K to 4M records, dialing in application parameters according to number of primary records. I have not, however, dropped the last incarnation. --------------0C70BF391AC0B3A4C93C5005 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit



As per your configuration :
max_wal_size = 50GB
this seems to be the cause for the WAL files piling up.

this has been declared twice, the last one is taking effect.
--
El genio es 1% inspiración y 99% transpiración.
Thomas Alva Edison
http://pglearn.blogspot.mx/

I've manage to generate another 359 WAL files in a 10 minute span yesterday (now only 357 remain and I suspect they will wither away as before).  Are these being held simply because of the high max_wal_size value?

This is a development environment, wherein I'm loading 4M+ records, first into 41 staging tables 100K rows per.  In a loop over each staging table, the data is then placed into application tables via selects. First select * into "matching table" then select id into intersection record (id, fixed groupId).  Each such iteration is in it's own transaction.  I have dropped and recreate this same database numerous times working my way up from 100K to 4M records, dialing in application parameters according to number of primary records.  I have not, however, dropped the last incarnation.

--------------0C70BF391AC0B3A4C93C5005--