Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHW9l-00042i-18 for pgsql-performance@arkaria.postgresql.org; Mon, 18 Mar 2013 09:15:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UHW9k-0007wq-Gx for pgsql-performance@arkaria.postgresql.org; Mon, 18 Mar 2013 09:15:00 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHW9j-0007wk-4G for pgsql-performance@postgresql.org; Mon, 18 Mar 2013 09:14:59 +0000 Received: from mail-wg0-f52.google.com ([74.125.82.52]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UHW9c-0000nO-0u for pgsql-performance@postgresql.org; Mon, 18 Mar 2013 09:14:57 +0000 Received: by mail-wg0-f52.google.com with SMTP id 15so3657349wgd.31 for ; Mon, 18 Mar 2013 02:14:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:content-type:content-transfer-encoding:subject :message-id:date:to:mime-version:x-mailer:x-gm-message-state; bh=/iMl5I8I4soaUYW014dLkw8xLAracb+P2kJu3xf8/r0=; b=PFH+HPR3AY3cXPPnmggUPzg4jC1uIaZJ7q5NC0DT/H6CTDsxdYZZs89TLlOsx+gjJx rq4iwAZWQqtiwvwMQ9SEvzXOT01w9fKaTYFajOUxHQRB0E0yTfANXEdPGUkD1Yuy/y3A dzLnCdjA0DpznrSDvhu3HzNYNwo46Ky5xOMlIHkYvfYi5ki1AvVQ/1nmjK4Apt/M8mmT jOLtL0gddbkZIno/1zGaQ13vgLi3s+nItusbHW4DxTjtPFId1tmVKk5YxNNO3SLRqPqR V21i5yeB99nbPRqM7AGPajYSdam8x4x7riB3dCswsGGPw4ZMOJeFoIY+2/FtLL+RQMVv msTg== X-Received: by 10.180.92.97 with SMTP id cl1mr14900757wib.19.1363598090539; Mon, 18 Mar 2013 02:14:50 -0700 (PDT) Received: from [192.168.1.34] (0905ds8-ar.0.fullrate.dk. [90.185.25.212]) by mx.google.com with ESMTPS id du2sm12254783wib.0.2013.03.18.02.14.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Mar 2013 02:14:49 -0700 (PDT) From: =?iso-8859-1?Q?Niels_Kristian_Schj=F8dt?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Why is my pg_xlog directory so huge? Message-Id: <02E032A0-7E7A-4CB3-9C76-5739B05660D5@autouncle.com> Date: Mon, 18 Mar 2013 10:14:52 +0100 To: postgres performance list Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) X-Gm-Message-State: ALoCoQkcWFOL7cFr37cBfSsvLfSyCERtCSYwP6nxu1OeA2C7fO4Mexe44iJLiJmxGehxjrcJLzXy X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org After installing my new server I just discovered something that doesn't see= m right: sudo du -h /var/lib/postgresql/9.2/main 4.0K /var/lib/postgresql/9.2/main/pg_snapshots 4.0K /var/lib/postgresql/9.2/main/pg_serial 4.0K /var/lib/postgresql/9.2/main/pg_tblspc 29M /var/lib/postgresql/9.2/main/pg_clog 6.8G /var/lib/postgresql/9.2/main/pg_log 104K /var/lib/postgresql/9.2/main/pg_stat_tmp 81G /var/lib/postgresql/9.2/main/base/27132 6.1M /var/lib/postgresql/9.2/main/base/12040 4.0K /var/lib/postgresql/9.2/main/base/pgsql_tmp 6.0M /var/lib/postgresql/9.2/main/base/12035 6.0M /var/lib/postgresql/9.2/main/base/1 81G /var/lib/postgresql/9.2/main/base 80K /var/lib/postgresql/9.2/main/pg_multixact/members 108K /var/lib/postgresql/9.2/main/pg_multixact/offsets 192K /var/lib/postgresql/9.2/main/pg_multixact 12K /var/lib/postgresql/9.2/main/pg_notify 4.0K /var/lib/postgresql/9.2/main/pg_twophase 160K /var/lib/postgresql/9.2/main/pg_subtrans 752K /var/lib/postgresql/9.2/main/pg_xlog/archive_status 202G /var/lib/postgresql/9.2/main/pg_xlog 496K /var/lib/postgresql/9.2/main/global 289G /var/lib/postgresql/9.2/main As you can see the pg_xlog folder is 202G, which is more than my entire dat= abase - this seems wrong to me, however I have no clue why this would happe= n. In short, this is my postgresql.conf data_directory =3D '/var/lib/postgresql/9.2/main' # use data in ano= ther directory hba_file =3D '/etc/postgresql/9.2/main/pg_hba.conf' # host-based auth= entication file ident_file =3D '/etc/postgresql/9.2/main/pg_ident.conf' # ident configura= tion file external_pid_file =3D '/var/run/postgresql/9.2-main.pid' # write a= n extra PID file listen_addresses =3D '192.168.0.4, localhost' # what IP ad= dress(es) to listen on; port =3D 5432 # (change requires restart) max_connections =3D 300 # (change requires restart) unix_socket_directory =3D '/var/run/postgresql' # (change require= s restart) wal_level =3D hot_standby # minimal, archive, or hot_standby synchronous_commit =3D on # synchronization level; on, off, = or local checkpoint_segments =3D 100 # in logfile segments, min 1, 16M= B each checkpoint_timeout =3D 10min # range 30s-1h checkpoint_completion_target =3D 0.9 # checkpoint target duration, 0.0 = - 1.0 archive_mode =3D on # allows archiving to be done archive_command =3D 'rsync -a %p postgres@192.168.0.2:/var/lib/postgresql/9= .2/wals/%f