From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Edson Richter <edsonrichter@hotmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Replication: slave server has 3x size of production server?
Date: Sat, 22 Feb 2020 13:12:59 -0800
Message-ID: <46ab8dff-645a-0521-16e8-821db6fc6d9c@aklaver.com> (raw)
In-Reply-To: <MN2PR01MB5327AC08F819CCED387027FACFEE0@MN2PR01MB5327.prod.exchangelabs.com>
References: <MN2PR01MB53275B5A45E7D752514934CECFEE0@MN2PR01MB5327.prod.exchangelabs.com>
<98f036e0-9bf2-8798-8742-9dba0601fb9a@aklaver.com>
<MN2PR01MB5327EA9352994C5BAA1F3E94CFEE0@MN2PR01MB5327.prod.exchangelabs.com>
<590174e0-256a-fe72-468a-0bcf77ca0df8@aklaver.com>
<MN2PR01MB53271A46CE28B2FDF93EE77DCFEE0@MN2PR01MB5327.prod.exchangelabs.com>
<bde60fe9-f703-b8da-b253-10977b1c82a7@aklaver.com>
<MN2PR01MB5327AC08F819CCED387027FACFEE0@MN2PR01MB5327.prod.exchangelabs.com>
On 2/22/20 11:23 AM, Edson Richter wrote:
> ------------------------------------------------------------------------
>
> *De:* Adrian Klaver <adrian.klaver@aklaver.com>
> *Enviado:* sábado, 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
> 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 = 2 # max number of walsender processes
> > (change requires restart)
> > wal_keep_segments = 25 # in logfile segments, 16MB each; 0 disables
> > #wal_sender_timeout = 60s # in milliseconds; 0 disables
> > max_replication_slots = 2 # max number of replication
> > slots (change requires restart)
> > #track_commit_timestamp = off # collect timestamp of transaction
> > commit (change requires restart)
> > # - Master Server -
> > # These settings are ignored on a standby server.
> > #synchronous_standby_names = '' # standby servers that provide sync
> > rep number of sync standbys and comma-separated list of
> > application_name from standby(s); '*' = all
> > #vacuum_defer_cleanup_age = 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 = on # "on" allows queries during
> > recovery (change requires restart)
> > max_standby_archive_delay = -1 # max delay before canceling
> > queries when reading WAL from archive; -1 allows indefinite delay
> > max_standby_streaming_delay = -1 # max delay before canceling
> > queries when reading streaming WAL; -1 allows indefinite delay
> > wal_receiver_status_interval = 10s # send replies at least this
> > often 0 disables
> > hot_standby_feedback = on # send info from standby to
> > prevent query conflicts
> > wal_receiver_timeout = 0 # time that receiver waits for
> > communication from master in milliseconds; 0 disables
> > wal_retrieve_retry_interval = 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 = always # enables archiving; off, on, or always
> (change requires restart)
> archive_command = 'rsync -e "ssh -2 -C -p 2022" -az %p
> barman@192.168.0.2:/dados/barman/dbcluster/incoming/%f'
And the above is working, the files are showing up on the barman server?
>
>
> The files are about 7 months old.
Are there newer files that would indicate that the streaming is working?
>
>
> Thanks,
>
> Edson
>
> >
> >
> > Regards,
> >
> > Edson
> >
> > >
> > >
> > > Edson
> > >
> >
> > --
> > Adrian Klaver
> > adrian.klaver@aklaver.com
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, edsonrichter@hotmail.com
Subject: Re: Replication: slave server has 3x size of production server?
In-Reply-To: <46ab8dff-645a-0521-16e8-821db6fc6d9c@aklaver.com>
References: <MN2PR01MB53275B5A45E7D752514934CECFEE0@MN2PR01MB5327.prod.exchangelabs.com> <98f036e0-9bf2-8798-8742-9dba0601fb9a@aklaver.com> <MN2PR01MB5327EA9352994C5BAA1F3E94CFEE0@MN2PR01MB5327.prod.exchangelabs.com> <590174e0-256a-fe72-468a-0bcf77ca0df8@aklaver.com> <MN2PR01MB53271A46CE28B2FDF93EE77DCFEE0@MN2PR01MB5327.prod.exchangelabs.com> <bde60fe9-f703-b8da-b253-10977b1c82a7@aklaver.com> <MN2PR01MB5327AC08F819CCED387027FACFEE0@MN2PR01MB5327.prod.exchangelabs.com> <46ab8dff-645a-0521-16e8-821db6fc6d9c@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox