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.89) (envelope-from ) id 1j5aMs-0001Q4-80 for pgsql-general@arkaria.postgresql.org; Sat, 22 Feb 2020 19:23:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j5aMr-0005Yx-1f for pgsql-general@arkaria.postgresql.org; Sat, 22 Feb 2020 19:23:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j5aMp-0005Yq-Sw for pgsql-general@lists.postgresql.org; Sat, 22 Feb 2020 19:23:12 +0000 Received: from mail-dm6nam11olkn2024.outbound.protection.outlook.com ([40.92.19.24] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j5aMl-0005uh-Dc for pgsql-general@postgresql.org; Sat, 22 Feb 2020 19:23:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DceedNflVzGZgZ1xjIU9Ku6ESLGq8Ie6D+Qri0a4R5H06R28/8gkZMids6JnOgGz0Y3LXaLi7YofQqfRfjgOq0IBa42ihJ6WDOfNK+fAf+Gt2K0BoShzuZ0A93f8C+tAsTPYUoawXt5saJzCcMMtJFfjUOhNamzaiFn2hM9gtYaJq7MOHTbt+b1bKkaWfTl3xasVt+c8sp8NHCJk6PPTydZNmj1VXkf5b0aRcGQhjyECG/aSB3ev3TeuRgACMaobTSzadBu1r48iX+921xXGbxPMDNb78BiaIw4yGlZIpsOnUbHvxU3iUpmF1uPigy5T4kSWSLwx1ntWinPbMLW8Zw== 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=5Izv5NTQlf0Rfaxjy29pyFj7TDxLhUhgvfYRnhWhe44=; b=Djhzxw2t1+SnRjdc5l0PQYWiE6llxDd41o476YCUkX0o5frH+xKdSnWYLYz8+8Lmdl5tP1YbXSObGX/Ep2swJ1+T0bwZUsqQYmfH8ODIJh6nKqDVbHnVo1gHFfpXVius9zWwpWzTtLDVFGYDVFbmjP99d4gCxT0o6FhqmNC4oDEXo7D5gMuO2rgH5KCbX4tBE+b5KUUNvbndTZk0uWeo4EpdrFMZMzaes67TM/S8Pf/gm+2IOhmyB0MrRveIY39N49xUXcqjeSOB+EkGQsQfB4MhxlMPzs6ug/Xc03vONGBqbOf8u2CvI0gA7MqHNb+bF2vemJ4C8ndq+SeDvq2VLw== 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=5Izv5NTQlf0Rfaxjy29pyFj7TDxLhUhgvfYRnhWhe44=; b=AYejP1w20SEXoJYe0dZf8mQQjLnWnou/HjaJto68W8hiwOx+YDdc5sWlqqExEW6f+BlqZVz/OEbpjuUAOuX34OSXtEGH76P7wq4LSIz6+t9YbaN75uRkQpcPlUwlaR0uIUPY+FZ6kdXNLsG9MecAWjOT2sH17zJeJfdfSAQ5GNWThJvTctN0E317YB9UVH+wKv+EiJ9YJQeB5XpSvfMdfoFvEsAoe7ytTPo7dSjq1pUw1TljK7WrORLdikawcs6v9KwsdnTHiNkiZQLM8uc8sHOeU8IHFAiufycXznkIE6u+9zanPODD2Jb+0T5Im06MDbG9HYZCiHoLUECPiDKoQg== Received: from DM6NAM11FT044.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::3a) by DM6NAM11HT189.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::258) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.19; Sat, 22 Feb 2020 19:23:06 +0000 Received: from MN2PR01MB5327.prod.exchangelabs.com (2a01:111:e400:fc4d::36) by DM6NAM11FT044.mail.protection.outlook.com (2a01:111:e400:fc4d::441) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.19 via Frontend Transport; Sat, 22 Feb 2020 19:23:05 +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; Sat, 22 Feb 2020 19:23:05 +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: AQHV6aRUnElZAlVhK0CJQqY7zlebK6gneSSAgAAHgLmAAA33AIAAAj6UgAAE5gCAAACDUQ== Date: Sat, 22 Feb 2020 19:23:05 +0000 Message-ID: References: <98f036e0-9bf2-8798-8742-9dba0601fb9a@aklaver.com> <590174e0-256a-fe72-468a-0bcf77ca0df8@aklaver.com> , In-Reply-To: Accept-Language: pt-BR, en-US Content-Language: pt-BR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:1F402C708226D6E86E31AF07B918FF5B7CE496D92DDEF375509563FDDB4F544F;UpperCasedChecksum:3E94F229731FDB1BF0D74AD7B4485E47650DB07BB2719389D70FA48FBC2E3486;SizeAsReceived:7303;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [aw7kolgiudoMZMFcp6rGn57A1b39eM/z] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 55833b20-52a7-4452-b484-08d7b7cca4a1 x-ms-traffictypediagnostic: DM6NAM11HT189: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rwwqE9Vm+BxDehu590tGwIwQZs7+YDbLCEJXoBwZtd+BzZU3jW2zauQr/72N/3oGUVa5KNoAPIFM5xhkJhBg6UB2Hh/IqG3wCpF4n94fSOQnbGnb/I9J8FSziC1lVXB2if/S5UMsWR+o4SuMdgzp/L+40HuJ5Ic9cdhDE1EJiBW1Id8DsnfnfaGojVBTxYt3 x-ms-exchange-antispam-messagedata: yPsB4SVquEjVio21ASWc/EfmZiIlxrVovuUjMP4zbTQcF2kJw+7IDoY8sK4lxGJVKgRmTMYL5c4h//NurJ+7askBAkiNf6h/omc3z1f+WeOqZJLwzPZjkDaTgBuCZ8Q5xjFOQ96iyd09QnuC3vyWGg== x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_MN2PR01MB5327AC08F819CCED387027FACFEE0MN2PR01MB5327prod_" 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: 55833b20-52a7-4452-b484-08d7b7cca4a1 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Feb 2020 19:23:05.8857 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM11HT189 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_MN2PR01MB5327AC08F819CCED387027FACFEE0MN2PR01MB5327prod_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ________________________________ De: Adrian Klaver Enviado: s=E1bado, 22 de fevereiro de 2020 16:16 Para: Edson Richter ; pgsql-general Assunto: Re: Replication: slave server has 3x size of production server? On 2/22/20 11:03 AM, Edson Richter wrote: > ---------------------------------------------------------------------= --- > > > > Streaming replication. Initiated via pg_basebackup. > > Settings on master server: > > # - Sending Server(s) - > # Set these on the master and on any standby that will send replication > data. > max_wal_senders =3D 2 # max number of walsender processes > (change requires restart) > wal_keep_segments =3D 25 # in logfile segments, 16MB each; 0 dis= ables > #wal_sender_timeout =3D 60s # in milliseconds; 0 disables > max_replication_slots =3D 2 # max number of replication > slots (change requires restart) > #track_commit_timestamp =3D off # collect timestamp of transaction > commit (change requires restart) > # - Master Server - > # These settings are ignored on a standby server. > #synchronous_standby_names =3D '' # standby servers that provide sync > rep number of sync standbys and comma-separated list of > application_name from standby(s); '*' =3D all > #vacuum_defer_cleanup_age =3D 0 # number of xacts by which cleanup is > delayed > > > > Settings on slave server: > > # - Standby Servers - > # These settings are ignored on a master server. > hot_standby =3D on # "on" allows queries during > recovery (change requires restart) > max_standby_archive_delay =3D -1 # max delay before canceling > queries when reading WAL from archive; -1 allows indefinite delay > max_standby_streaming_delay =3D -1 # max delay before canceling > queries when reading streaming WAL; -1 allows indefinite delay > wal_receiver_status_interval =3D 10s # send replies at least this > often 0 disables > hot_standby_feedback =3D on # send info from standby to > prevent query conflicts > wal_receiver_timeout =3D 0 # time that receiver waits for > communication from master in milliseconds; 0 disables > wal_retrieve_retry_interval =3D 5s # time to wait before retrying > to retrieve WAL after a failed attempt What are the settings for: archive_mode archive_command on the standby? Are the files in pg_xlog on the standby mostly from well in the past? Actually, standby server is sending wals to a backup (barman) server: archive_mode =3D always # enables archiving; off, on, or always (= change requires restart) archive_command =3D 'rsync -e "ssh -2 -C -p 2022" -az %p barman@192.168.0.2= :/dados/barman/dbcluster/incoming/%f' The files are about 7 months old. Thanks, Edson > > > Regards, > > Edson > > > > > > > Edson > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com --_000_MN2PR01MB5327AC08F819CCED387027FACFEE0MN2PR01MB5327prod_ 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 16:16
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 11:03 AM, Edson Richter wrote:
>     ----------------------------------------------= --------------------------
>

>
>
> Streaming replication. Initiated via pg_basebackup.
>
> Settings on master server:
>
> # - Sending Server(s) -
> # Set these on the master and on any standby that will send replicatio= n
> data.
> max_wal_senders =3D 2             # max = number of walsender processes
> (change requires restart)
> wal_keep_segments =3D 25          # in logfil= e segments, 16MB each; 0 disables
> #wal_sender_timeout =3D 60s       # in milliseconds; 0 = disables
> max_replication_slots =3D 2       # max number of repli= cation
> slots (change requires restart)
> #track_commit_timestamp =3D off   # collect timestamp of transact= ion
> commit (change requires restart)
> # - Master Server -
> # These settings are ignored on a standby server.
> #synchronous_standby_names =3D '' # standby servers that provide sync =
> rep number of sync standbys and comma-separated list of
> application_name from standby(s); '*' =3D all
> #vacuum_defer_cleanup_age =3D 0   # number of xacts by which clea= nup is
> delayed
>
>
>
> Settings on slave server:
>
> # - Standby Servers -
> # These settings are ignored on a master server.
> hot_standby =3D on               &n= bsp;        # "on" allows queries during
> recovery (change requires restart)
> max_standby_archive_delay =3D -1          # m= ax delay before canceling
> queries when reading WAL from archive; -1 allows indefinite delay
> max_standby_streaming_delay =3D -1        # max de= lay before canceling
> queries when reading streaming WAL; -1 allows indefinite delay
> wal_receiver_status_interval =3D 10s      # send replie= s at least this
> often 0 disables
> hot_standby_feedback =3D on             =   # send info from standby to
> prevent query conflicts
> wal_receiver_timeout =3D 0             &= nbsp;  # time that receiver waits for
> communication from master in milliseconds; 0 disables
> wal_retrieve_retry_interval =3D 5s        # time t= o wait before retrying
> to retrieve WAL after a failed attempt

What are the settings for:

archive_mode
archive_command

on the standby?

Are the files in pg_xlog on the standby mostly from well in the past?

Actually, standby server is sending wals to a back= up (barman) server:

archive_mode =3D always      =     # enables archiving; off, on, or always (change requires restart)
archive_command =3D 'rsync -e "ssh -2 -C -p 2022= " -az %p barman@192.168.0.2:/dados/barman/dbcluster/incoming/%f'


The files are about 7 months old.


Thanks,

Edson

>
>
> Regards,
>
> Edson
>
>     >
>     >
>     > Edson
>     >
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com
>


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