Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKSu8-0005Ak-D9 for pgsql-admin@arkaria.postgresql.org; Thu, 30 Nov 2017 17:45:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKSu6-0000VZ-S6 for pgsql-admin@arkaria.postgresql.org; Thu, 30 Nov 2017 17:45:42 +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 1eKSu6-0000VP-Hw for pgsql-admin@lists.postgresql.org; Thu, 30 Nov 2017 17:45:42 +0000 Received: from nrccenhts1.nrc.ca ([132.246.15.88]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eKSu2-0006u9-Qp for pgsql-admin@lists.postgresql.org; Thu, 30 Nov 2017 17:45:41 +0000 Received: from [132.246.194.15] (132.246.11.2) by NRCCENHTS1.nrc.ca (132.246.15.88) with Microsoft SMTP Server (TLS) id 8.3.485.1; Thu, 30 Nov 2017 12:45:36 -0500 Message-ID: <5A2042CD.3090006@nrc-cnrc.gc.ca> Date: Thu, 30 Nov 2017 09:41:33 -0800 From: ghiureai User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: pgsql-admin@lists.postgresql.org Subject: Re: PG 10 streaming replication pg_wal question References: <5A203DC7.40509@nrc-cnrc.gc.ca> <1512063321.2328.20.camel@cybertec.at> In-Reply-To: <1512063321.2328.20.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thank you Laurenz, can I run a checkpoint manually in master host than ? On 11/30/2017 09:35 AM, Laurenz Albe wrote: > ghiureai wrote: >> I am testing PG10 streaming replication , with archiving off, I have >> pg_wal on separate directory to monitor the growth , I had the slave >> offline yesterday for more than 20h while I was restoring one of db >> (60GB) with pg_restore from a backup taken with pg_dump, today I brought >> the slave PG host online and replication catch up nicely , master and >> slave are in sync now, but on master host the pg_wal is still same >> large size ( as yesterday) even after all the wal files had been >> applied to salve, would replication process not suppose to removed the >> wal files on master after being applied to salve ? >> ( do I need to manually implement a cleanup job of this wal files, as >> mentioned archiving is off on both servers) > Never remove WAL files yourself. > > pg_wal will shrink eventually. > At the next checkpoint, PostgreSQL will remove all WAL files > that were completed and archived successfully since the > previous checkpoint, thus reducing WAL size a little. > > If there is activity on the databases, pg_wal will eventually > shrink back to max_wal_size. > > Yours, > Laurenz Albe >