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 1evJGs-0002e4-Jb for pgsql-admin@arkaria.postgresql.org; Mon, 12 Mar 2018 08:57:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1evJGr-0002i4-Co for pgsql-admin@arkaria.postgresql.org; Mon, 12 Mar 2018 08:57:29 +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 1evJGr-0002fp-4j for pgsql-admin@lists.postgresql.org; Mon, 12 Mar 2018 08:57:29 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1evJGo-0000xg-6d for pgsql-admin@postgresql.org; Mon, 12 Mar 2018 08:57:28 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 1B5404103D; Mon, 12 Mar 2018 09:57:24 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id j1BSjUTsS1WG; Mon, 12 Mar 2018 09:57:22 +0100 (CET) Message-ID: <1520845041.2810.3.camel@cybertec.at> Subject: Re: streaming replication and wal 's usages From: Laurenz Albe To: ghiureai , "pgsql-admin@postgresql.org" Date: Mon, 12 Mar 2018 09:57:21 +0100 In-Reply-To: <63b50fbd-4822-8a36-4fea-2dc473cc1242@nrc-cnrc.gc.ca> References: <63b50fbd-4822-8a36-4fea-2dc473cc1242@nrc-cnrc.gc.ca> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ghiureai wrote: > I am running PG 10.2 with streaming replication, no archiving option > with 10 slots replication option , I had the slave down for 6 hours > which generated 56GB of wal files in pg_wal dir, after slave was brougt > online and catchup with master , the wal dir was still growing on slave > with more than 25GB where in archive_status where all the files where in > *.done files , eventually the /wal directory reached 100% but still no > wal files removed from archive_status > > I am trying to understand what I am missing in this confg ( the master > and slave are cfg for pg_dump backups the switch-over is done with > pg_basebackup using repmgr4.2.last release ) > > the present db size 140GB OLTP type transactions , with an avg 10-12GB > new data growth per day. > > Here is my cfg > > wal_keep_segments = 300 > max_replication_slots=10 > wal_log_hints = on > checkpoint_timeout = 5min > max_wal_size = 1GB > min_wal_size = 80MB > archive_mode=off > > hot_standby =on You are not using replication slots, right? Check pg_replication_slots to see if you have abandoned replication slots; that could cause old WAL to be retained. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com