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.92) (envelope-from ) id 1j5tkc-0004Ta-3y for pgsql-general@arkaria.postgresql.org; Sun, 23 Feb 2020 16:05:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j5tkY-0002ZC-JU for pgsql-general@arkaria.postgresql.org; Sun, 23 Feb 2020 16:04:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j5tkX-0002Z4-KL for pgsql-general@lists.postgresql.org; Sun, 23 Feb 2020 16:04:58 +0000 Received: from mail-oln040092011099.outbound.protection.outlook.com ([40.92.11.99] helo=NAM04-SN1-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 1j5tkO-0007SP-88 for pgsql-general@postgresql.org; Sun, 23 Feb 2020 16:04:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H8m2xUWZwA9zXRNLOrwsmAGYXWSJ61C6gG1jhnPRsVd1XKFrxPcvNMZ8xtMaPJ1j0TkLSteBJ9r41uLY6gHsMnL5RIBJG47hC68gwFUBf8h/wtJv7Y0eMcU7sP2YZDeWUl0bxCCy2a4rAoFOHV8ZIhizMj9B4CPsCVu7n0GUdR1krEbH5eVTt/oGQyMcCDGcGptmA30Vf+K4K/QLUo9Sv+3mt/eLJGqCgo8b3Q0DvNOG3U4T25a0zulrbWrxHUyXdM8CDsdwQ0oUFrm2VRjhUyMkRad6eNALLNVODv7nf4vy//j9elFYVz984P1VmohX4kK/BdXysIRXsefCFP+1Uw== 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=DrlHEIy+A0cx0SF1GE1/9VXHg0ZOKM4A+X5XtNTNqYU=; b=DqPfH0GOFxAU3L7FyvQ/u/eOYI5t8o2skDqYdg2R6J0VMT5sfk3dTwmtmov7jZtXBqLB/P742Y5+KAuaQEXdieE0Ah4XReZ3l6WUNofeYb5aVqvqSFgirLL09U7wJjxuhZ9eoCcIkBxBAlUtegvb0wOyS7H31kdfNXK/rRIjih1G5KcBkzc21m3b/ft3XMkQTJK+EEqASOw+3632OhA1bD3CofPG4rdHDYN4xwKs8bud2KCW9qEpdh6z1UepxtohnToRZQ3zGIPiviW58y+v/X4zVbKtynD+sJyeen9lpiQ90yQXcAm5pW+hejA5TvjBMTPDUqEr6wUkrmJ9kAj09Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DrlHEIy+A0cx0SF1GE1/9VXHg0ZOKM4A+X5XtNTNqYU=; b=M4m7IpdMuC3dWE3ilMCdA5prtR31pwK+lBr/ZwsJ6Y1/NbLBvLk3SaxuDrBBcKsFGPDkt5TUJE59Aw2911lhwRYHQSvi+ssuK3BMFPp5ediQ8GRVLZvsYsqe8+sNG8tYV2njNGK9bwqyXXIU/zuca9PGOnNNNpO9rb20YvMdIguQCXMETErM+5D2FTAFtSHpBqbNWE3bD02eU+MLxo4pKKEmzb0B5/23FRfBYCF1JZgN99NdI73qK2l5eAJw4jF27zSECnnDdx1vwha1Dz6lJ3ymbFMOk9VodmtSe99ijC/lLPJRLzLvpTi87r36ei0JvHqZZwWOO2wR37DwFbRWXg== Received: from BN3NAM04FT022.eop-NAM04.prod.protection.outlook.com (10.152.92.52) by BN3NAM04HT121.eop-NAM04.prod.protection.outlook.com (10.152.93.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.18; Sun, 23 Feb 2020 16:04:45 +0000 Received: from MN2PR01MB5327.prod.exchangelabs.com (10.152.92.51) by BN3NAM04FT022.mail.protection.outlook.com (10.152.92.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.18 via Frontend Transport; Sun, 23 Feb 2020 16:04:45 +0000 Received: from MN2PR01MB5327.prod.exchangelabs.com ([fe80::651e:5e33:5b2a:adee]) by MN2PR01MB5327.prod.exchangelabs.com ([fe80::651e:5e33:5b2a:adee%7]) with mapi id 15.20.2750.021; Sun, 23 Feb 2020 16:04:45 +0000 From: Edson Richter To: Adrian Klaver , pgsql-general Subject: RE: Replication: slave server has 3x size of production server? Thread-Topic: Replication: slave server has 3x size of production server? Thread-Index: AQHV6aRUnElZAlVhK0CJQqY7zlebK6gneSSAgAAHgLmAAA33AIAAAj6UgAAE5gCAAACDUYAAIC2AgAAaoM+AAAzbAIABEw8V Date: Sun, 23 Feb 2020 16:04:45 +0000 Message-ID: References: <98f036e0-9bf2-8798-8742-9dba0601fb9a@aklaver.com> <590174e0-256a-fe72-468a-0bcf77ca0df8@aklaver.com> <46ab8dff-645a-0521-16e8-821db6fc6d9c@aklaver.com> ,<22dad45b-7d11-807e-c258-1e9872561f3b@aklaver.com> In-Reply-To: <22dad45b-7d11-807e-c258-1e9872561f3b@aklaver.com> Accept-Language: pt-BR, en-US Content-Language: pt-BR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:0A2475369DB3C0530C124557EE73E3BBC33C2476911E34CC0C704A6B8D6AB390;UpperCasedChecksum:4ED78E6F2460C3A656A42076BB4AE742DC4CFBA92C98C66427CA7CFB0F620987;SizeAsReceived:7582;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [Q45kMnpQKis+HHNqtrNlrWfV88+wxTl6] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 7c5fc254-5344-43ed-e920-08d7b87a199e x-ms-traffictypediagnostic: BN3NAM04HT121: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FQTNrb5ChOiUvqY+aPB+Hh/xnbUBzlETbiXr+diIBT3DHauS0fRtACFCRBIwAlskeB8gHXUmmlPA5BxiuOjCqFRzDxUC/SVuRjdJRZOpYe2jbSy2zaBEqZ6oV2adl5CGEOtYIET+rmFHqblGs+ZWYdPKaSejCqu5uWEcNfh1B5dI6Ihi3byqKvoKNWCpVQVV x-ms-exchange-antispam-messagedata: eXSCPvHi4lmDg662wKWXhDuakN13SsScjiLddz5dqKbIfuTEGs7l2BsA1jYToVUm6iMhl63roRah4ThMs0cHz10QNjboitBeNvmHxSnQ/QMF1t+aQV0f6JXwxDEOjuaY+hdB/QFwoMzotJfRepmjVw== x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_MN2PR01MB53272BB0BED23EF660DA8A18CFEF0MN2PR01MB5327prod_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 7c5fc254-5344-43ed-e920-08d7b87a199e X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2020 16:04:45.1230 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3NAM04HT121 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_MN2PR01MB53272BB0BED23EF660DA8A18CFEF0MN2PR01MB5327prod_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ________________________________ De: Adrian Klaver Enviado: s=E1bado, 22 de fevereiro de 2020 20:34 Para: Edson Richter ; pgsql-general Assunto: Re: Replication: slave server has 3x size of production server? On 2/22/20 2:51 PM, Edson Richter wrote: > > Yes, it is working. Last X'log file is present on all thee servers. > Also, comparting last transaction number on master and slave shows that > all are in sync. > Last, but not least, select max(id) from a busy table shows same id > (when queried almost simultaneously using a simple test routine). Well something is keeping those WAL file around. You probably should analyze your complete setup to see what else is touching those servers. It is safe to add a "--remove-source-files" into my archive_command as folo= ws into my slave server? archive_command =3D 'rsync --remove-source-files -e "ssh -2 -C -p 2022" -az= %p barman@192.168.0.2:/dados/barman/dbcluster/incoming/%f' and remove the xlog file after copy to barman? I mean, whem the archive command starts, the wal has been already processed= by the slave server, so we don't need them after copying to backup server,= right? Regards, Edson > > > > > > > The files are about 7 months old. > > Are there newer files that would indicate that the streaming is worki= ng? > > > Yes, streaming is working properly (as stated above). > > Thanks, > > > Edson Richter > > >> -- Adrian Klaver adrian.klaver@aklaver.com --_000_MN2PR01MB53272BB0BED23EF660DA8A18CFEF0MN2PR01MB5327prod_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable


De: Adrian= Klaver <adrian.klaver@aklaver.com>
Enviado: s=E1bado, 22 de fevereiro de 2020 20:34
Para: Edson Richter <edsonrichter@hotmail.com>; pgsql-general = <pgsql-general@postgresql.org>
Assunto: Re: Replication: slave server has 3x size of production ser= ver?
 
On 2/22/20 2:51 PM, Edson Richter wrote:

>
> Yes, it is working. Last X'log file is present on all thee servers. > Also, comparting last transaction number on master and slave shows tha= t
> all are in sync.
> Last, but not least, select max(id) from a busy table shows same id > (when queried almost simultaneously using a simple test routine).

Well something is keeping those WAL file around. You probably should
analyze your complete setup to see what else is touching those servers.

It is safe to add a "--remove-source-files&qu= ot; into my archive_command as folows into my slave server?


archive_command =3D 'rsync --remove-source-files -e "ssh -2 -C -p 2022" -az= %p = ;barman@192.168.0.2:/dados/barman/dbcluster/incoming/%f'


and remove the xlog file after copy to barman?
I mean, whem the archive command starts, the wal h= as been already processed by the slave server, so we don't need them after = copying to backup server, right?


Regards,

Edson

>
>     >
>     >
>     > The files are about 7 months old.
>
>     Are there newer files that would indicate that= the streaming is working?
>
>
> Yes, streaming is working properly (as stated above).
>
> Thanks,
>
>
> Edson Richter
>
>
>>



--
Adrian Klaver
adrian.klaver@aklaver.com
--_000_MN2PR01MB53272BB0BED23EF660DA8A18CFEF0MN2PR01MB5327prod_--