I am following the AWS's documentation to setup pgactive extension and have an active-active setup on two AWS RDS Postgres instances. Following all the steps successfully till step 11 where it asks to run the following on endpoint-2:
SELECT pgactive.pgactive_join_group(
node_name := 'endpoint2-app',
node_dsn := 'user_mapping=postgres pgactive_foreign_server=pgactive_server_endpoint2',
join_using_dsn := 'user_mapping=postgres pgactive_foreign_server=pgactive_server_endpoint1'
);
Getting the following error:
ERROR: could not connect to the server in replication mode: connection failed
CONTEXT: SQL statement "SELECT * FROM _pgactive_get_node_info_private(node_dsn)"
PL/pgSQL function _pgactive_begin_join_private(text,text,text,text,boolean,boolean,boolean) line 66 at SQL statement
SQL statement "SELECT pgactive._pgactive_begin_join_private(
caller := '',
node_name := node_name,
node_dsn := node_dsn,
remote_dsn := join_using_dsn,
bypass_collation_check := bypass_collation_check,
bypass_node_identifier_creation := bypass_node_identifier_creation,
bypass_user_tables_check := bypass_user_tables_check)"
PL/pgSQL function pgactive_join_group(text,text,text,integer,text[],boolean,boolean,boolean) line 43 at PERFORM
The postgres users on both RDS1 and RDS2 are a member of rds_superuser and rds_replication role. Both the RDS Instances are associated with the same Security Group. I ran dblink_connect to check the connectivity b/w both the RDS instances and it gives an OK result. So, I am not sure what else to check here? Can someone recommend how to take care of this issue?
RDS Instance - t3.medium Postgres version - 16.3