Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YQ6g1-00009r-Av for pgsql-admin@arkaria.postgresql.org; Tue, 24 Feb 2015 04:00:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YQ6g0-0007pk-QP for pgsql-admin@arkaria.postgresql.org; Tue, 24 Feb 2015 04:00:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YQ232-0000Bn-80 for pgsql-admin@postgresql.org; Mon, 23 Feb 2015 23:04:20 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YQ22y-0005Ii-Al for pgsql-admin@postgresql.org; Mon, 23 Feb 2015 23:04:18 +0000 Received: by pabrd3 with SMTP id rd3so31146855pab.1 for ; Mon, 23 Feb 2015 15:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:subject:mime-version:content-type :content-transfer-encoding:content-disposition; bh=F6S23P9hFzbBl9wQd+qjgCPfBm6kG7xSYWPg3o8u0dA=; b=EgH1vZHH8mjJv7HbPx3ivmyVy3/7kgwUov7UwxI8Fb1DbAF7VpctwkHDDUUtNSCdIO UZ//yzPMWWX0h78FVm8nCXjfthxqZcOqtYk1WhxgInojz/ouJwyc85z2G3FQyEdpZrdb GjhbmBnn81w7whx1uqiuEZ2dwmB6nG0vzvIy14ovtCDWY5m99KzlpbOH6cRuFS+Qu+FH /+xZ6Hvx4L6w6LNHUq0M9AhuH+yzqJLGSJXG1CBa7jqhWOhDuWYHlSMFCESh4Rq+dqgr nNEZOQaiLuGClXtj/lmDuJPnBtNpKPaNLRerkSrNvbMPq92lcpPZv3VkHlw8soHR3eU9 GJfQ== X-Received: by 10.70.0.66 with SMTP id 2mr23548619pdc.4.1424732654263; Mon, 23 Feb 2015 15:04:14 -0800 (PST) Received: from cheyne.local ([216.38.151.109]) by mx.google.com with ESMTPSA id ot6sm30782515pdb.28.2015.02.23.15.04.12 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Feb 2015 15:04:13 -0800 (PST) Date: Mon, 23 Feb 2015 15:04:10 -0800 From: Cheyne Wallace To: pgsql-admin@postgresql.org Message-ID: Subject: Postgres won't start after disk space issue X-Mailer: Airmail (286) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org =C2=A0 Hey guys,=20=20 I have a problem i=E2=80=99m stuck on. Our Postgres server ran out of disk = space last night and it fell over. We=E2=80=99ve resolved the disk space is= sue and there is plenty now although Postgres will not start.=20=20 When I view the main log it reads:=20=20 2015-02-23 17:49:35 UTC LOG: =C2=A0redo starts at 75/202674D8 2015-02-23 17:49:35 UTC LOG: =C2=A0incomplete startup packet 2015-02-23 17:49:36 UTC FATAL: =C2=A0the database system is starting up 2015-02-23 17:49:36 UTC FATAL: =C2=A0the database system is starting up 2015-02-23 17:49:41 UTC FATAL: =C2=A0the database system is starting up 2015-02-23 17:49:41 UTC LOG: =C2=A0incomplete startup packet When I look at ps , I can see that postgres is trying to perform a recovery= , although it never finishes.=C2=A0 - postgres: startup process =C2=A0 recovering 00000001000000750000002D =C2= =A0=C2=A0 I ran an strace on this process to try and see what it=E2=80=99s doing and = I see these lines repeating over and over again: read(7, 0x7fff6c82fadf, 1) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =3D -1 EAGAIN (Resource temporarily unavailable) open("pg_clog/01ED", O_RDWR|O_CREAT, 0600) =3D 27 lseek(27, 212992, SEEK_SET) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 2= 12992 write(27, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0= "..., 8192) =3D 8192 fsync(27) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 0 close(27) When I look under pg_clog I can see that the 01ED file it=E2=80=99s opening= here is the most recent one and has a different file size to the others in= the dir.=C2=A0 I=E2=80=99m assuming this is the file it was writing too when the disk spac= e ran out and now it=E2=80=99s corrupt or something along those lines. Can anyone please help me figure out how to fix this? =C2=A0I was told that= deleting any of these pg_clog files would be bad, how ever I had no idea h= ow to repair it. p.s I also asked this question here:=C2=A0http://dba.stackexchange.com/ques= tions/93594/postgres-wont-start-incomplete-startup-packet Cheers Cheyne --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin