Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTKKD-0002Em-Qg for pgsql-admin@arkaria.postgresql.org; Tue, 28 Apr 2020 07:06:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTKKC-0001BA-OA for pgsql-admin@arkaria.postgresql.org; Tue, 28 Apr 2020 07:06:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTKKC-0001B3-Ei for pgsql-admin@lists.postgresql.org; Tue, 28 Apr 2020 07:06:36 +0000 Received: from mail-eopbgr30131.outbound.protection.outlook.com ([40.107.3.131] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTKK9-00068L-2a for pgsql-admin@lists.postgresql.org; Tue, 28 Apr 2020 07:06:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ewXHeL1y3drax/XLMtvDm8X5wbQt7KbvQJWnJX7pRUeLNRime6lcp500azzRkGPsQPHfoFjJ5gh36zpxmQ6AL/nZkHuXUdREDDZ/WQLwrbFabu3Qwdqn0KYcUH4joBz2d/PuFcSNIS+W7Qw47N/CEh3mblThyFXjLyK73cQ+M0jSaiLqoGVfkjChsA07h/GKR13lxfNY9RLsWbdRhrGdSMAmjXRy8fjIYxgSCB0MKCzHhaV2SA5QJM61VzInB9Ow/zplzxYv+sPEzy0bUXxZ0lYMYUaekCVuGrRiMUV0peFFOad2j0RNnvjLLeZYXLGyx0008O2eUR2o8g2XwsdDdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M4C1NjOIO9GetpJTwixIZ9v4sJopbiSDOY8wEJ5KQMc=; b=Koz24bY33MvY5sK9aMMP+zUE1yq+gYnI5H9IroXPnZA92YU5Tw4/AUYDpuL0Fl9ZTk5wQR+Daq7zUL19fxz0/wzGI/ttNq/kbCGYfBDALSO+0A4jzQ70y0Btonwwlzk3qsA/SfoilIgdTPEOfcyw+Jg4sEODzLp53JgNUgI3GLti9dctbO7FPOyBJxFL14Fb072opfMinIpmyGWjNI6a9IwFhKA7EQzoFR+PJqnV5piUaWXCv1RXHHuhHK4H7V/V8UXrNPnwUgfRwZqvh1HyNyt4+mvd8BVN9HgizvKJTcxFgX5QUTbJkIzJh/Xh7+IcU5pJKOyG4bUCZfQjuCJGqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=accelaero.com; dmarc=pass action=none header.from=accelaero.com; dkim=pass header.d=accelaero.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=accelaero.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M4C1NjOIO9GetpJTwixIZ9v4sJopbiSDOY8wEJ5KQMc=; b=hMULhBR6SbhoJ8t0HIKsN0953tsw2iSRB/Mp+W9L6KTdl5X5RsqmIyHdQN5/cNcPcQvs5M5xA15g7A5AoQEi/4EZPL9/0fG/aPUCBf0OadNF1qw646TX8x60u8EotDjXwqhXu/f8F6iklSijuWdw1jnGcxFILtDiq/6ndKb+kHM= Received: from AM0P191MB0708.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:153::8) by AM0P191MB0417.EURP191.PROD.OUTLOOK.COM (2603:10a6:208:44::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Tue, 28 Apr 2020 07:06:31 +0000 Received: from AM0P191MB0708.EURP191.PROD.OUTLOOK.COM ([fe80::543:76b5:fb40:eda9]) by AM0P191MB0708.EURP191.PROD.OUTLOOK.COM ([fe80::543:76b5:fb40:eda9%2]) with mapi id 15.20.2937.023; Tue, 28 Apr 2020 07:06:31 +0000 From: Ashok kumar Mani To: Rui DeSousa CC: "David G. Johnston" , "pgsql-admin@postgresql.org" , "pgsql-admin@lists.postgresql.org" Subject: RE: PostgreSQL DB checkpoint error! Thread-Topic: PostgreSQL DB checkpoint error! Thread-Index: AdYdI9nqBdKKuZSNRFSFEjQBqx6VDQAAipCAAAAXxLAAALm/gAAAhAIw Date: Tue, 28 Apr 2020 07:06:31 +0000 Message-ID: References: <61537141-A530-4AF4-A11D-7722740D4101@crazybean.net> In-Reply-To: <61537141-A530-4AF4-A11D-7722740D4101@crazybean.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_916ea167-67b1-4080-9c86-674eefeb4f23_Enabled=True; MSIP_Label_916ea167-67b1-4080-9c86-674eefeb4f23_SiteId=7bbb8a4d-7f1b-4a58-9b3a-c250fb8023e3; MSIP_Label_916ea167-67b1-4080-9c86-674eefeb4f23_Owner=amani@accelaero.com; MSIP_Label_916ea167-67b1-4080-9c86-674eefeb4f23_SetDate=2020-04-28T07:06:44.6331900Z; MSIP_Label_916ea167-67b1-4080-9c86-674eefeb4f23_Name=External - General; MSIP_Label_916ea167-67b1-4080-9c86-674eefeb4f23_Application=Microsoft Azure Information Protection; MSIP_Label_916ea167-67b1-4080-9c86-674eefeb4f23_ActionId=b180bb61-713a-4a77-ba5a-1286e089f76a; MSIP_Label_916ea167-67b1-4080-9c86-674eefeb4f23_Extended_MSFT_Method=Manual authentication-results: crazybean.net; dkim=none (message not signed) header.d=none;crazybean.net; dmarc=none action=none header.from=accelaero.com; x-originating-ip: [2001:8f8:1423:5930:bc14:19f:ca38:129e] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e5e00e79-8d6c-47e7-0ba3-08d7eb42ade0 x-ms-traffictypediagnostic: AM0P191MB0417: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0387D64A71 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0P191MB0708.EURP191.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(366004)(39850400004)(396003)(346002)(136003)(52536014)(3480700007)(6916009)(8936002)(316002)(4326008)(71200400001)(7696005)(8676002)(55016002)(9686003)(66476007)(81156014)(86362001)(33656002)(478600001)(53546011)(54906003)(64756008)(2906002)(66556008)(186003)(66946007)(76116006)(66446008)(6506007)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IxB9l+C+npV/EjIP5r7YOgcxj5xTgkNVCsVmGTziXPEWUs/9k/gZRStBbnqr5IIey2K5zZkZ7hu7gpowF6s6kp1ll/UWbMmhSTjiiNH8bFiHGAqKmjlHmY54GzfvTO6wBgrO9fegLa/OJE97564GA1tigM0YqyN+HYOgkYt0/cfH+HK8xMy0bX8rDtBPM9P3XVf1it0M31zd1IaHl59IUuuGFfWBq4oTis9WzcEexqJDbOvHy0XqSR2BcMZs14yxkMD2sNgIZIyRCgssMbV9ElLWWTjhyIVtGalaApFtEFvSUd7ek/q981vUnmTCPVn7bI6aJXT8Jj62SpZrZpx8IemifU324mrQ+TbYcdw3XwFsmFnZ8O1f48+hnP6npk7/CizPCIs1DY0rhmBZHh/fQUMIXHgWw22sW/3tzzbTULfjln9UephVhKp8OV/OplB7 x-ms-exchange-antispam-messagedata: UUC+UMaF+L4tEdk5kYgp7ot8rzN2DPeoVvoO7cgOKvmhxP5IdsZvMfGLX88cEEAII5craLa+Ft6VnopPofrBh0i4sRPeXjvvkZBVYpZfbDiYxYN4lxd9EAH13t7O3MGCbO6PcMvmlXbhU1doldHiIg9p0b7xg9T73dDGQbGIgx9aUXss1CmUCCXwDH5rCn3ISu2ESkNCjdGG8xkQM9k+ZpBVUAquQErRSEKbH/s4SUiynHCCYo35zAfElvfk3LcXL/NgZN/p9Gepy/WE3wZt5naf4k7krxE74ALeLVVgT67nwcsSRi7g7MkllfBa3ShDNZgSjRqIP+0MXAtpOaT9gBYytR4cMhyXYshjPng9EiuajNWlNhNlwOmd+V9xRDA0xal+BPODxudYQ/EaV+6vbmtKAXJtcunBa16o+72931w5WbF6RwKal40pvasV9QFZMBoZftpUI+KaZvWhORXAYBvTmDv7HGJLeWPJj+60DAphXE+wJ4rXwTm1wHGM+Xz8i9ftxzMmu1iXttDQt63svssC8eqR9KiylI4nAYMve13R1RflWmXIhOo3xEU0vt1doHomZp0NRFFmEgOwLoHkJ+aM6MehTiIdTOvzIgOk6vKajTs3AtMeETeGOaHQHIYWU9qqjkkMfpWAO6MKHWNS9vT97839wniu4zSCQKS/6t5dHXh51pBZoZJEaexzhNesZ3wTfLo8Mj7L7V832hkb2RpovNbql7MtXaTWXg9uzVids8n8+Xi52g2oEEl+uQ+BO7emDs+ugRI5NMmU2DvvU7nsNaaNHfOIGuLVC5Ew+ZeOAXUmHms448p02nTRHVhiWjdmT6ZhhSh1Is3LRgmnhcyLTHQGJBCU9At3wzr1QmY= x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_AM0P191MB07088D1138AD10963583199EAEAC0AM0P191MB0708EURP_" MIME-Version: 1.0 X-OriginatorOrg: accelaero.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5e00e79-8d6c-47e7-0ba3-08d7eb42ade0 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2020 07:06:31.2520 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7bbb8a4d-7f1b-4a58-9b3a-c250fb8023e3 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3c/V1MFZ128pB+78o4K1xXE+Y5lQT3Vg8BD/oPAX2XJphzqhBSb6k6DCBmW7ceIP+Ioaerp6eh32vaOwleTXeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P191MB0417 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_AM0P191MB07088D1138AD10963583199EAEAC0AM0P191MB0708EURP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Classification: External Dear Rui DeSousa, I would like to share the row counts of the big tables in zabbix as below. What would you suggest if vacuum full and reindex is not possible then, is = there any way to avoid blocking issue? zabbix=3D# select count(*) from alerts; count ------- 15354 (1 row) zabbix=3D# select count(*) from history; count ----------- 897550571 (1 row) zabbix=3D# select count(*) from history_uint; count ----------- 945414161 (1 row) Best Wishes, Ashokkumar Mani Database Architect\DBA OCP | AWSCSA | M103 From: Rui DeSousa Sent: Tuesday, April 28, 2020 10:50 AM To: Ashok kumar Mani Cc: David G. Johnston ; pgsql-admin@postgresql.= org; pgsql-admin@lists.postgresql.org Subject: Re: PostgreSQL DB checkpoint error! Information Security Email Alert: This email is from an EXTERNAL source. Pl= ease use caution when clicking on links or opening attachments from an unkn= own or suspicious sender. To report a suspected phishing email, Send us an = Email on Servicedesk@accelaero.com On Apr 28, 2020, at 2:31 AM, Ashok kumar Mani > wrote: I am running cronjob at the same time which will do data pruning for zabbix= database(psql). Please let me know if that warning is related to reindex = and vacuum ? ^C-bash-4.2$ cat /Data/zabbix_hkp/scripts/data_Pruning.sh psql -d zabbix -f /Data/zabbix_hkp/scripts/three_months_datapurge.sql 1>/Da= ta/zabbix_hkp/scripts_log/data_purging_`date +%m%d%y`.log 2>data_cleaning_e= rr_`date +%m%d%y`.log -bash-4.2$ cat /Data/zabbix_hkp/scripts/three_months_datapurge.sql -- Delete alerts which are older than 1 day -> tested on 8th april 2020 delete FROM alerts where age(to_timestamp(alerts.clock)) > interval '90 day= s'; VACUUM FULL alerts ; REINDEX TABLE ALERTS; delete FROM acknowledges where age(to_timestamp(acknowledges.clock)) > inte= rval '90 days'; VACUUM FULL acknowledges; REINDEX TABLE acknowledges; I would say so; the vacuum full and reindex is going create blocking situat= ions that will hang Zabbix. I wouldn't run vacuum full or reindex. --_000_AM0P191MB07088D1138AD10963583199EAEAC0AM0P191MB0708EURP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

= Classification: External

 

Dear Rui DeSousa,

 

I would like to share the row counts of th= e big tables in zabbix as below.

What would you suggest if vacuum full and = reindex is not possible then, is there any way to avoid blocking issue?

 

zabbix=3D# select count(*) from alerts;

count

-------

15354

(1 row)

 

 

zabbix=3D# select count(*) from history;

   count

-----------

897550571

(1 row)

 

zabbix=3D# select count(*) from history_ui= nt;

   count

-----------

945414161

(1 row)

 

 

Best Wishes,

 

Ashokkumar Mani

Database Architect\DBA=

OCP | AWSCSA | M103

 

From: Rui DeSousa <rui@crazybean.net>
Sent: Tuesday, April 28, 2020 10:50 AM
To: Ashok kumar Mani <amani@accelaero.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-admi= n@postgresql.org; pgsql-admin@lists.postgresql.org
Subject: Re: PostgreSQL DB checkpoint error!

 

Information Security Email Alert: This email is from an EXTERNAL source. Please use caution when clicking on lin= ks or opening attachments from an unknown or suspicious sender. To report a= suspected phishing email, Send us an Email on Servicedesk@accelaero.com<= /span>

 

 

 

On Apr 28, 2020, at 2:31 AM, Ashok kumar Mani <amani@accelaero.com> wrote:

 

I am running cronjob at the same time whic= h will do data pruning for zabbix database(psql).  Please let me know = if that warning is related to reindex and vacuum ?

 

^C-bash-4.2$ cat /Data/zabbix_hkp/scripts/da= ta_Pruning.sh

psql -d zabbix -f /Data/zabbix_hkp/scripts/t= hree_months_datapurge.sql 1>/Data/zabbix_hkp/scripts_log/data_purging_`d= ate +%m%d%y`.log 2>data_cleaning_err_`date +%m%d%y`.log

-bash-4.2$ cat /Data/zabbix_hkp/scripts/thre= e_months_datapurge.sql

-- Delete alerts which are older than 1 day = -> tested on 8th april 2020

delete FROM alerts where age(to_timestamp= (alerts.clock)) > interval '90 days';

VACUUM FULL  alerts ;

REINDEX TABLE ALERTS;

delete FROM acknowledges where age(to_tim= estamp(acknowledges.clock)) > interval '90 days';<= /p>

VACUUM FULL acknowledges;=

REINDEX TABLE acknowledges;

 

I would say so; the vacuum full and reindex is going= create blocking situations that will hang Zabbix.  I wouldn’t r= un vacuum full or reindex.  

--_000_AM0P191MB07088D1138AD10963583199EAEAC0AM0P191MB0708EURP_--