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 1gozmO-0001zY-AD for pgsql-admin@arkaria.postgresql.org; Thu, 31 Jan 2019 00:00:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gozmM-0000X6-S8 for pgsql-admin@arkaria.postgresql.org; Thu, 31 Jan 2019 00:00:26 +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 1gozmM-0000Wx-Cy for pgsql-admin@lists.postgresql.org; Thu, 31 Jan 2019 00:00:26 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gozmE-00067b-SY for pgsql-admin@lists.postgresql.org; Thu, 31 Jan 2019 00:00:25 +0000 Received: by mail-ed1-x543.google.com with SMTP id o10so1103799edt.13 for ; Wed, 30 Jan 2019 16:00:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=uaxSsgQRo0U0tQjasRwpUb5cEvwMH+XqO9/nj3z6dPI=; b=UdIrSxdwjDQdGw5sjTG94/1YoK3R1G1i6l+U/Qz7VjLnRfol4KquWrv6qCeaJUIHHr GUU4AuTIyV0e/WESupXOnWf4Z8J/EKZUqobIOnLgZd2rgxWystgj21q1qkCrNL2z33r5 XJLzwCapmic1eZvRzUIsBFYyAnXpzDTJwZjzeSgwmTjOojwb+vIoKXKda2unWjICoQXf UxvToYdmUDOaR+18Z85Hcn5sZ1kcYjVn/esl2y4g+KFoxTIs2bGhNL+Zi3c7LXE9IE78 QC08FdY0WsWzBjZe5RT0Xdl5Vo4nbvAXaAwINZ5x+4ShN644Ovqehg9y4lM50Hs+izcs PCFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=uaxSsgQRo0U0tQjasRwpUb5cEvwMH+XqO9/nj3z6dPI=; b=U0DIsWahgnceK3vITa3VLWl3a31F+WbxWP98o0OlYCApSHBkrO5lns36zBCCD2IlbG CSSpIyJ0elnP7rTLHmi+jPNpaovfiIS0ETkOloxcwPOIzoFfzQ6i9/h40ycd8BuCYESM 2Ff10JclKxuBasVu194+Zk39hXZKgxgezEkQVxLdTHWmyaesSfVAFPs2sAaCgM7qOrFW 6XoyjNqmRvTWwUgqoa3STEumEQ9mD/ue9zii1e+IJKD96j9U0aCT/3bwGrbMj0Sqa0lx hK9VAgFSbAtbC6h/zcraaktylo7vTWYOtGzEILF+1gQxBvM9FUdmFfoUaQ0qxm58zZ1a By2Q== X-Gm-Message-State: AJcUukcis4fQR+kSL23nk1ePHgaF7SEwUIY6Tw96qwyQBmaNuJKXIlYk vUC+nV5df0FLrKUBUiopNEVJdA== X-Google-Smtp-Source: ALg8bN6YAxkzPv9MCAP+9QbrmcQbiBHFAMLykxYkf+om+r5P3JCvCAC9XVPhNHeTJEhlSFCci/ftBw== X-Received: by 2002:a50:9a01:: with SMTP id o1mr32657341edb.82.1548892816366; Wed, 30 Jan 2019 16:00:16 -0800 (PST) Received: from alvin.alvh.no-ip.org ([212.76.254.98]) by smtp.gmail.com with ESMTPSA id b46sm836271edd.94.2019.01.30.16.00.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Jan 2019 16:00:15 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 2F1CB9B2; Wed, 30 Jan 2019 21:00:15 -0300 (-03) Date: Wed, 30 Jan 2019 21:00:15 -0300 From: Alvaro Herrera To: Ron Cc: pgsql-admin@lists.postgresql.org Subject: Re: Old WAL files under pg_xlog not getting delete Message-ID: <201901310000.fkapsf6clz5s@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716-1013-2c1e88 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jan-30, Ron wrote: > Plus the ".", ".." and archive_status directories, and lost+found if pg_xlog > is it's own partition.  That's four of the unknown six.  Add a .backup file > or two and all 506 files are accounted for. Hmm ... I would recommend to keep the xlog files in a subdir, not the root of the filesystem. So the lost+found would be, at the most, a sibling of pg_xlog, not inside it. Otherwise, it seems too easy to get in trouble if for whatever reason the filesystem is not mounted, your database starts writing files in it, and the filesystem is mounted later. Whatever files got written before mounting would be misteriously "missing", and few people think to unmount the FS to see if they are in the underlying filesystem. Then again, if you read this advice then you're safe because next time this happens to you, you'll remember to unmount to check, so you can safely ignore me. Go figure. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services