pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedReplication Issues
5+ messages / 3 participants
[nested] [flat]
* Replication Issues
@ 2018-09-28 06:00 bhargav kamineni <bhargavpostgres@gmail.com>
2018-09-28 06:29 ` Re: Replication Issues Achilleas Mantzios <achill@matrix.gatewaynet.com>
2018-09-28 06:30 ` Re: Replication Issues Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 2 replies; 5+ messages in thread
From: bhargav kamineni @ 2018-09-28 06:00 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi Team,
I have configured replication using slot ,But it failed by throwing the
ERROR *pg_basebackup: could not get transaction log end position from
server: ERROR: requested WAL segment 0000000100002C9D00000085 has already
been removed *, which is unexpected because i have created the slot on
master first and then issued the base backup command from slave's end
the command is
*usr/lib/postgresql/9.5/bin/pg_basebackup -U user --max-rate='150 M'
--progress --verbose --write-recovery-conf --status-interval='10 s' -D
data_dir -h host_ip -p 5433*
These are the settings on my master
archive_mode=on
archive_command='/bin/true'
wal_keep_segments=512
max_wal_senders=4
Series of steps i have followed :
1) Enabled password less authentication between master and slave
2)created slot on master (assuming it will store wal's regardless of other
settings)
3)started basebackup from slave's end
4)Issued checkpoint at master's end
Here my concern is , slave should recover WAL from replication slot but why
i got the above ERROR , Why slot removed the requested wal file , Could
you please let me know the reason why it happened or did i miss something ?
Thanks,
Bhargav K
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Replication Issues
2018-09-28 06:00 Replication Issues bhargav kamineni <bhargavpostgres@gmail.com>
@ 2018-09-28 06:29 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
1 sibling, 0 replies; 5+ messages in thread
From: Achilleas Mantzios @ 2018-09-28 06:29 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 28/9/18 9:00 π.μ., bhargav kamineni wrote:
> Hi Team,
>
> I have configured replication using slot ,But it failed by throwing the ERROR /pg_basebackup: could not get transaction log end position from server: ERROR: requested WAL segment
> 0000000100002C9D00000085 has already been removed /, which is unexpected because i have created the slot on master first and then issued the base backup command from slave's end
> the command is
> /usr/lib/postgresql/9.5/bin/pg_basebackup -U user --max-rate='150 M' --progress --verbose --write-recovery-conf --status-interval='10 s' -D data_dir -h host_ip -p 5433/
Either :
add "-X stream" to the pg_basebackup command
or
increase wal_keep_segments on the server.
> These are the settings on my master
> archive_mode=on
> archive_command='/bin/true'
> wal_keep_segments=512
> max_wal_senders=4
> Series of steps i have followed :
> 1) Enabled password less authentication between master and slave
> 2)created slot on master (assuming it will store wal's regardless of other settings)
> 3)started basebackup from slave's end
> 4)Issued checkpoint at master's end
>
> Here my concern is , slave should recover WAL from replication slot but why i got the above ERROR , Why slot removed the requested wal file , Could you please let me know the reason why it happened
> or did i miss something ?
>
> Thanks,
> Bhargav K
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Replication Issues
2018-09-28 06:00 Replication Issues bhargav kamineni <bhargavpostgres@gmail.com>
@ 2018-09-28 06:30 ` Laurenz Albe <laurenz.albe@cybertec.at>
2018-09-28 10:50 ` Re: Replication Issues bhargav kamineni <bhargavpostgres@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Laurenz Albe @ 2018-09-28 06:30 UTC (permalink / raw)
To: bhargav kamineni <bhargavpostgres@gmail.com>; pgsql-general@lists.postgresql.org
bhargav kamineni wrote:
> Hi Team,
>
> I have configured replication using slot ,But it failed by throwing the
> ERROR pg_basebackup: could not get transaction log end position from server:
> ERROR: requested WAL segment 0000000100002C9D00000085 has already been removed ,
> which is unexpected because i have created the slot on master first
> and then issued the base backup command from slave's end
> the command is
> usr/lib/postgresql/9.5/bin/pg_basebackup -U user --max-rate='150 M' --progress --verbose --write-recovery-conf --status-interval='10 s' -D data_dir -h host_ip -p 5433
> These are the settings on my master
> archive_mode=on
> archive_command='/bin/true'
> wal_keep_segments=512
> max_wal_senders=4
> Series of steps i have followed :
> 1) Enabled password less authentication between master and slave
> 2)created slot on master (assuming it will store wal's regardless of other settings)
> 3)started basebackup from slave's end
> 4)Issued checkpoint at master's end
>
> Here my concern is , slave should recover WAL from replication slot but why i
> got the above ERROR , Why slot removed the requested wal file , Could you please
> let me know the reason why it happened or did i miss something ?
I guess your base backup took long enough for the required WAL segments to be
removed by the time it was done.
To prevent that, create a replication slot *before* you perform pg_basebackup
and use the options "-S <slotname> -X stream" of pg_basebackup.
You then use the same slot in "recovery.conf".
That way you cannot lose any WAL.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Replication Issues
2018-09-28 06:00 Replication Issues bhargav kamineni <bhargavpostgres@gmail.com>
2018-09-28 06:30 ` Re: Replication Issues Laurenz Albe <laurenz.albe@cybertec.at>
@ 2018-09-28 10:50 ` bhargav kamineni <bhargavpostgres@gmail.com>
2018-09-28 12:13 ` Re: Replication Issues Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 1 reply; 5+ messages in thread
From: bhargav kamineni @ 2018-09-28 10:50 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: pgsql-general@lists.postgresql.org
Ee are using 9.5 version, slot option -s is not available ,can I go with -X
stream option ?
On Fri 28 Sep, 2018, 12:01 PM Laurenz Albe, <laurenz.albe@cybertec.at>
wrote:
> bhargav kamineni wrote:
> > Hi Team,
> >
> > I have configured replication using slot ,But it failed by throwing the
> > ERROR pg_basebackup: could not get transaction log end position from
> server:
> > ERROR: requested WAL segment 0000000100002C9D00000085 has already been
> removed ,
> > which is unexpected because i have created the slot on master first
> > and then issued the base backup command from slave's end
> > the command is
> > usr/lib/postgresql/9.5/bin/pg_basebackup -U user --max-rate='150 M'
> --progress --verbose --write-recovery-conf --status-interval='10 s' -D
> data_dir -h host_ip -p 5433
> > These are the settings on my master
> > archive_mode=on
> > archive_command='/bin/true'
> > wal_keep_segments=512
> > max_wal_senders=4
> > Series of steps i have followed :
> > 1) Enabled password less authentication between master and slave
> > 2)created slot on master (assuming it will store wal's regardless of
> other settings)
> > 3)started basebackup from slave's end
> > 4)Issued checkpoint at master's end
> >
> > Here my concern is , slave should recover WAL from replication slot but
> why i
> > got the above ERROR , Why slot removed the requested wal file , Could
> you please
> > let me know the reason why it happened or did i miss something ?
>
> I guess your base backup took long enough for the required WAL segments to
> be
> removed by the time it was done.
>
> To prevent that, create a replication slot *before* you perform
> pg_basebackup
> and use the options "-S <slotname> -X stream" of pg_basebackup.
>
> You then use the same slot in "recovery.conf".
>
> That way you cannot lose any WAL.
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Replication Issues
2018-09-28 06:00 Replication Issues bhargav kamineni <bhargavpostgres@gmail.com>
2018-09-28 06:30 ` Re: Replication Issues Laurenz Albe <laurenz.albe@cybertec.at>
2018-09-28 10:50 ` Re: Replication Issues bhargav kamineni <bhargavpostgres@gmail.com>
@ 2018-09-28 12:13 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 0 replies; 5+ messages in thread
From: Achilleas Mantzios @ 2018-09-28 12:13 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 28/9/18 1:50 μ.μ., bhargav kamineni wrote:
> Ee are using 9.5 version, slot option -s is not available ,can I go with -X stream option ?
-S is intended when you plan to use the backup as a hot standby, when you must use the same replication slot.
If you plan to use the backup as a stand alone backup you don't need this option anyway.
>
> On Fri 28 Sep, 2018, 12:01 PM Laurenz Albe, <laurenz.albe@cybertec.at <mailto:laurenz.albe@cybertec.at>> wrote:
>
> bhargav kamineni wrote:
> > Hi Team,
> >
> > I have configured replication using slot ,But it failed by throwing the
> > ERROR pg_basebackup: could not get transaction log end position from server:
> > ERROR: requested WAL segment 0000000100002C9D00000085 has already been removed ,
> > which is unexpected because i have created the slot on master first
> > and then issued the base backup command from slave's end
> > the command is
> > usr/lib/postgresql/9.5/bin/pg_basebackup -U user --max-rate='150 M' --progress --verbose --write-recovery-conf --status-interval='10 s' -D data_dir -h host_ip -p 5433
> > These are the settings on my master
> > archive_mode=on
> > archive_command='/bin/true'
> > wal_keep_segments=512
> > max_wal_senders=4
> > Series of steps i have followed :
> > 1) Enabled password less authentication between master and slave
> > 2)created slot on master (assuming it will store wal's regardless of other settings)
> > 3)started basebackup from slave's end
> > 4)Issued checkpoint at master's end
> >
> > Here my concern is , slave should recover WAL from replication slot but why i
> > got the above ERROR , Why slot removed the requested wal file , Could you please
> > let me know the reason why it happened or did i miss something ?
>
> I guess your base backup took long enough for the required WAL segments to be
> removed by the time it was done.
>
> To prevent that, create a replication slot *before* you perform pg_basebackup
> and use the options "-S <slotname> -X stream" of pg_basebackup.
>
> You then use the same slot in "recovery.conf".
>
> That way you cannot lose any WAL.
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-09-28 12:13 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-28 06:00 Replication Issues bhargav kamineni <bhargavpostgres@gmail.com>
2018-09-28 06:29 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2018-09-28 06:30 ` Laurenz Albe <laurenz.albe@cybertec.at>
2018-09-28 10:50 ` bhargav kamineni <bhargavpostgres@gmail.com>
2018-09-28 12:13 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
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