Only read requests on the hot standby server are not executed due to transaction ID

we just backed up the main server on a hot backup server. however, when we try to request a hot standby, we get the following error:

ERROR: cannot assign TransactionIds during recovery

I turned on verbose mode and see that an error occurs in varsup.c: 72

/* safety check, we should never get this far in a HS standby */ 
if (RecoveryInProgress())
   elog(ERROR, "cannot assign TransactionIds during recovery");

it is strange if we use the psql client and issue several read requests, the first will fail, but all subsequent ones will succeed.

pipeline=#    SELECT pg_is_in_recovery();
ERROR:  cannot assign TransactionIds during recovery
pipeline=#    SELECT pg_is_in_recovery();
 pg_is_in_recovery 
-------------------
t
(1 row)

using postgres 9.5.3

any ideas would be very grateful to him.

By the way: we added: hot_standby = onto pipelinedb.conf (which is equivalent to postgresql.conf)

and we added:

primary_slot_name = 'replicator_slot'
primary_conninfo = 'user=username host=ip_address port=5432'
recovery_target_timeline = 'latest'

to recovery.conf

+4
source share
2 answers

, . ,

+1

pg_ctl promote

(/).

postgresql:

In promote mode, the standby server that is running in the specified 
data directory is commanded to exit recovery and begin read-write 
operations.
0

Source: https://habr.com/ru/post/1686256/


All Articles