Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSQ3t-0008Ek-2K for pgsql-admin@arkaria.postgresql.org; Mon, 11 Jun 2018 16:52:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fSQ3r-000398-Gr for pgsql-admin@arkaria.postgresql.org; Mon, 11 Jun 2018 16:52:55 +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.89) (envelope-from ) id 1fSQ3r-00038y-59 for pgsql-admin@lists.postgresql.org; Mon, 11 Jun 2018 16:52:55 +0000 Received: from mr28p48im-tydg10101201.me.com ([17.110.88.44]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fSQ3o-0006Xt-K5 for pgsql-admin@postgresql.org; Mon, 11 Jun 2018 16:52:53 +0000 Received: from process-dkim-sign-daemon.mr28p48im-tydg10101201.me.com by mr28p48im-tydg10101201.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0PA60010042O2Z00@mr28p48im-tydg10101201.me.com> for pgsql-admin@postgresql.org; Mon, 11 Jun 2018 16:52:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1528735971; bh=ZSUIR8ejqKmH9z9VzwpIoLA6hiKqGPa2B4Ly/j20y6k=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=P9I6x+zQ8Z0SDaeca+uU+XkEWemZULzz0xOvES2AERAYMdxKOhb7R4+JvtDYwwqob vXe3DJOC+CDkrqhHp32aPzb5TrrSPg0Ttbjd6jT4eWKYeFjlAGX/JYVIsEiN1TZgd/ +Ts0BBgFMLWmB8hYaCCpulztNhVG1eTuUMvoiJiEJbByBds6/4tPDxw3djcPTVDwMz pUIhWhaHxqs1+SiHRiHG2RIqlB4LGyq3FW0AZSVihw1kg3HpLuU0JGs+lznS8HJYNV /DTm33UASL+AisOHbLUrRpdOrXKFgzzgLajy31CvFkcA8wx5TGHbrwrnn9ckzv3cwE PucEu+52AAIKw== Received: from icloud.com ([127.0.0.1]) by mr28p48im-tydg10101201.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0PA6009RU4820F10@mr28p48im-tydg10101201.me.com>; Mon, 11 Jun 2018 16:52:51 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-06-11_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1806110193 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: PostgreSQL 'Corruption & Fragmentation' detection and resolution/fix From: Rui DeSousa In-reply-to: <1528723690634-0.post@n3.nabble.com> Date: Mon, 11 Jun 2018 12:52:49 -0400 Cc: pgsql-admin@postgresql.org Content-transfer-encoding: quoted-printable Message-id: <477ADE32-3CCE-4A9A-A286-ADDAB0B4F74B@icloud.com> References: <1528723690634-0.post@n3.nabble.com> To: pavan95 X-Mailer: Apple Mail (2.3445.8.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jun 11, 2018, at 9:28 AM, pavan95 = wrote: >=20 > I'm searching a way to detect postgresql corruption on a daily basis. = Please > provide me=20 >=20 If you haven=E2=80=99t already (show data_checksums); I would recommend = turning on data checksums to allow Postgres to detect i/o data = corruption issues. =20 If it=E2=80=99s not enabled then you=E2=80=99ll have to reinit your = database: initdb =E2=80=94data-checksums =E2=80=A6 I would be very concerned why you feel the need to check for corruption = and would question your platform. The only time I=E2=80=99ve seen = corruption was due to a disk subsystem problem which data-checksums = should help flush out for you or a Postgres bug which would normally = gets bubbled up via the application and/or the logs. Make sure you have good backups; there really is no script that going to = solve a faulty disk subsystem or other disaster.=