replication not replicating

Started by Brad Whiteabout 2 years ago6 messagesgeneral
Jump to latest
#1Brad White
b55white@gmail.com

Errors from the primary

2024-01-15 00:00:51.157 CST [2660] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:00:51.157 CST [2660] STATEMENT: START_REPLICATION 2/A2000000
TIMELINE 1
2024-01-15 00:00:56.158 CST [492] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:00:56.158 CST [492] STATEMENT: START_REPLICATION 2/A2000000
TIMELINE 1
2024-01-15 00:00:56.159 CST [492] LOG: could not receive data from client:
An existing connection was forcibly closed by the remote host.

2024-01-15 00:01:01.151 CST [3404] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:01:01.151 CST [3404] STATEMENT: START_REPLICATION 2/A2000000
TIMELINE 1
2024-01-15 00:01:01.152 CST [3404] LOG: could not receive data from
client: An existing connection was forcibly closed by the remote host.

[repeat for 55000 lines]
--------------------------------------------------------

Errors from the hot backup at roughly the same time

2024-01-15 01:13:57.893 CST [2988] LOG: started streaming WAL from primary
at 2/A2000000 on timeline 1
2024-01-15 01:13:57.893 CST [2988] FATAL: could not receive data from WAL
stream: ERROR: requested WAL segment 0000000100000002000000A2 has already
been removed
2024-01-15 01:13:57.893 CST [1792] LOG: waiting for WAL to become
available at 2/A2002000
2024-01-15 01:14:02.884 CST [2552] LOG: started streaming WAL from primary
at 2/A2000000 on timeline 1
2024-01-15 01:14:02.884 CST [2552] FATAL: could not receive data from WAL
stream: ERROR: requested WAL segment 0000000100000002000000A2 has already
been removed
2024-01-15 01:14:02.884 CST [1792] LOG: waiting for WAL to become
available at 2/A2002000

[repeat for 49000 lines]

#2Ron
ronljohnsonjr@gmail.com
In reply to: Brad White (#1)
Re: replication not replicating

On Tue, Jan 16, 2024 at 4:10 PM Brad White <b55white@gmail.com> wrote:

Errors from the primary

2024-01-15 00:00:51.157 CST [2660] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:00:51.157 CST [2660] STATEMENT: START_REPLICATION
2/A2000000 TIMELINE 1
2024-01-15 00:00:56.158 CST [492] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:00:56.158 CST [492] STATEMENT: START_REPLICATION 2/A2000000
TIMELINE 1
2024-01-15 00:00:56.159 CST [492] LOG: could not receive data from
client: An existing connection was forcibly closed by the remote host.

2024-01-15 00:01:01.151 CST [3404] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:01:01.151 CST [3404] STATEMENT: START_REPLICATION
2/A2000000 TIMELINE 1
2024-01-15 00:01:01.152 CST [3404] LOG: could not receive data from
client: An existing connection was forcibly closed by the remote host.

[repeat for 55000 lines]
--------------------------------------------------------

Errors from the hot backup at roughly the same time

2024-01-15 01:13:57.893 CST [2988] LOG: started streaming WAL from
primary at 2/A2000000 on timeline 1
2024-01-15 01:13:57.893 CST [2988] FATAL: could not receive data from WAL
stream: ERROR: requested WAL segment 0000000100000002000000A2 has already
been removed
2024-01-15 01:13:57.893 CST [1792] LOG: waiting for WAL to become
available at 2/A2002000
2024-01-15 01:14:02.884 CST [2552] LOG: started streaming WAL from
primary at 2/A2000000 on timeline 1
2024-01-15 01:14:02.884 CST [2552] FATAL: could not receive data from WAL
stream: ERROR: requested WAL segment 0000000100000002000000A2 has already
been removed
2024-01-15 01:14:02.884 CST [1792] LOG: waiting for WAL to become
available at 2/A2002000

[repeat for 49000 lines]

What database version?
Streaming or Logical replication?
Using a slot?

#3Brad White
b55white@gmail.com
In reply to: Ron (#2)
Re: replication not replicating

On Tue, Jan 16, 2024 at 4:35 PM Ron Johnson <ronljohnsonjr@gmail.com> wrote:

On Tue, Jan 16, 2024 at 4:10 PM Brad White <b55white@gmail.com> wrote:

Errors from the primary

2024-01-15 00:00:51.157 CST [2660] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:00:51.157 CST [2660] STATEMENT: START_REPLICATION
2/A2000000 TIMELINE 1
2024-01-15 00:00:56.158 CST [492] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:00:56.158 CST [492] STATEMENT: START_REPLICATION
2/A2000000 TIMELINE 1
2024-01-15 00:00:56.159 CST [492] LOG: could not receive data from
client: An existing connection was forcibly closed by the remote host.

2024-01-15 00:01:01.151 CST [3404] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:01:01.151 CST [3404] STATEMENT: START_REPLICATION
2/A2000000 TIMELINE 1
2024-01-15 00:01:01.152 CST [3404] LOG: could not receive data from
client: An existing connection was forcibly closed by the remote host.

[repeat for 55000 lines]

What database version?

v15

Streaming or Logical replication?

IDK

Using a slot?

No.

Relevant sections from the conf

--- Primary ---
#------------------------------------------------------------------------------
# WRITE-AHEAD LOG
#------------------------------------------------------------------------------

# - Settings -

wal_level = replica # minimal, replica, or logical

# - Archiving -

archive_mode = on # enables archiving; off, on, or always
# (change requires restart)
#archive_library = '' # library to use to archive a logfile segment
# (empty string indicates archive_command should
# be used)
archive_command = 'copy %p
"\\\\DISKSTATION\\AccessData\\Prod\\WALfiles\\%f"'
# command to use to archive a
logfile segment
archive_timeout = 0 # force a logfile segment switch after this
# number of seconds; 0 disables

primary_conninfo is set.
Everything else is commented out, using default values.

--- Backup Server ---
#------------------------------------------------------------------------------
# WRITE-AHEAD LOG
#------------------------------------------------------------------------------

# - Settings -

wal_level = replica # minimal, replica, or logical
archive_cleanup_command = 'pg_archivecleanup
\\\\DISKSTATION\\AccessData\\Prod\\WALfiles %r'

# - Archiving -

archive_mode = on

# - Archive Recovery -
#restore_command = ''

Show quoted text
#4Ron
ronljohnsonjr@gmail.com
In reply to: Brad White (#3)
Re: replication not replicating

On Tue, Jan 16, 2024 at 6:26 PM Brad White <b55white@gmail.com> wrote:

On Tue, Jan 16, 2024 at 4:35 PM Ron Johnson <ronljohnsonjr@gmail.com>
wrote:

On Tue, Jan 16, 2024 at 4:10 PM Brad White <b55white@gmail.com> wrote:

Errors from the primary

2024-01-15 00:00:51.157 CST [2660] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:00:51.157 CST [2660] STATEMENT: START_REPLICATION
2/A2000000 TIMELINE 1
2024-01-15 00:00:56.158 CST [492] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:00:56.158 CST [492] STATEMENT: START_REPLICATION
2/A2000000 TIMELINE 1
2024-01-15 00:00:56.159 CST [492] LOG: could not receive data from
client: An existing connection was forcibly closed by the remote host.

2024-01-15 00:01:01.151 CST [3404] ERROR: requested WAL segment
0000000100000002000000A2 has already been removed
2024-01-15 00:01:01.151 CST [3404] STATEMENT: START_REPLICATION
2/A2000000 TIMELINE 1
2024-01-15 00:01:01.152 CST [3404] LOG: could not receive data from
client: An existing connection was forcibly closed by the remote host.

[repeat for 55000 lines]

What database version?

v15

Streaming or Logical replication?

IDK

Using a slot?

No.

Relevant sections from the conf

--- Primary ---

#------------------------------------------------------------------------------
# WRITE-AHEAD LOG

#------------------------------------------------------------------------------

# - Settings -

wal_level = replica # minimal, replica, or logical

# - Archiving -

archive_mode = on # enables archiving; off, on, or always
# (change requires restart)
#archive_library = '' # library to use to archive a logfile segment
# (empty string indicates archive_command should
# be used)
archive_command = 'copy %p
"\\\\DISKSTATION\\AccessData\\Prod\\WALfiles\\%f"'
# command to use to archive a
logfile segment
archive_timeout = 0 # force a logfile segment switch after this
# number of seconds; 0 disables

primary_conninfo is set.
Everything else is commented out, using default values.

--- Backup Server ---

#------------------------------------------------------------------------------
# WRITE-AHEAD LOG

#------------------------------------------------------------------------------

# - Settings -

wal_level = replica # minimal, replica, or logical
archive_cleanup_command = 'pg_archivecleanup
\\\\DISKSTATION\\AccessData\\Prod\\WALfiles %r'

# - Archiving -

archive_mode = on

# - Archive Recovery -
#restore_command = ''

Hmmm. Are you log shipping?

If so, why? Streaming Replication is sooo much easier.

#5Brad White
b55white@gmail.com
In reply to: Ron (#4)
Re: replication not replicating

On Tue, Jan 16, 2024 at 6:24 PM Ron Johnson <ronljohnsonjr@gmail.com> wrote:

On Tue, Jan 16, 2024 at 6:26 PM Brad White <b55white@gmail.com> wrote:

On Tue, Jan 16, 2024 at 4:35 PM Ron Johnson <ronljohnsonjr@gmail.com>
wrote:

What database version?

v15

Streaming or Logical replication?

IDK

Using a slot?

No.

Relevant sections from the conf

--- Primary ---

#------------------------------------------------------------------------------
# WRITE-AHEAD LOG

#------------------------------------------------------------------------------

# - Settings -

wal_level = replica # minimal, replica, or logical

# - Archiving -

archive_mode = on # enables archiving; off, on, or always
# (change requires restart)
#archive_library = '' # library to use to archive a logfile
segment
# (empty string indicates archive_command should
# be used)
archive_command = 'copy %p
"\\\\DISKSTATION\\AccessData\\Prod\\WALfiles\\%f"'
# command to use to archive a
logfile segment
archive_timeout = 0 # force a logfile segment switch after this
# number of seconds; 0 disables

primary_conninfo is set.
Everything else is commented out, using default values.

--- Backup Server ---

#------------------------------------------------------------------------------
# WRITE-AHEAD LOG

#------------------------------------------------------------------------------

# - Settings -

wal_level = replica # minimal, replica, or logical
archive_cleanup_command = 'pg_archivecleanup
\\\\DISKSTATION\\AccessData\\Prod\\WALfiles %r'

# - Archiving -

archive_mode = on

# - Archive Recovery -
#restore_command = ''

Hmmm. Are you log shipping?

If so, why? Streaming Replication is sooo much easier.

I'm attempting async streaming.

#6Brad White
b55white@gmail.com
In reply to: Brad White (#5)
Re: replication not replicating

On Tue, Jan 16, 2024 at 7:33 PM Brad White <b55white@gmail.com> wrote:

On Tue, Jan 16, 2024 at 6:24 PM Ron Johnson <ronljohnsonjr@gmail.com>
wrote:

On Tue, Jan 16, 2024 at 6:26 PM Brad White <b55white@gmail.com> wrote:

On Tue, Jan 16, 2024 at 4:35 PM Ron Johnson <ronljohnsonjr@gmail.com>
wrote:

What database version?

v15

Streaming or Logical replication?

IDK

Using a slot?

No.

Relevant sections from the conf

archive_mode = on

# - Archive Recovery -
#restore_command = ''

Hmmm. Are you log shipping?

If so, why? Streaming Replication is sooo much easier.

I'm attempting async streaming.

Looks like I was just missing the restore command.
Everything is looking happier now.