trying to get synchronous replication to work

82 views
Skip to first unread message

Georg Pfolz

unread,
Dec 1, 2023, 3:37:31 PM12/1/23
to firebird-support
Hello

I'm trying to get synchronous replication to work. I thought I had the settings right, but nothing happens and I even don't get any entries in the replication.log file.

I have a few questions I could not figure out from the documentation I found:
  1. What's the syntax of the sync_replica entry, if I have to include a port number?
  2. Do I have to configure anything on the replica server (other than gzipping the database for replication use)?
  3. I have set up the databases on the replica server in the databases.conf file. Was I supposed to do this?
What I've done:

In the replication.conf on the source server:
database = /local/path/db.fdb
{
 sync_replica = SYSDBA:abc...@my.server.com:/remote/path/fb.fdb
}


I did not configure anything on the replica server. Do I have to? I've copied the database file and applied gfix -replica read_only db.fdb

I can access both servers remotely, so I guess the primary server should also be able to do so. 

As I'm not getting any errors, I suppose I missed something in the configuration.

Dimitry Sibiryakov

unread,
Dec 1, 2023, 5:40:22 PM12/1/23
to firebird...@googlegroups.com
Georg Pfolz wrote 01.12.2023 20:24:
> As I'm not getting any errors, I suppose I missed something in the configuration.

Did you enable publication and include some table(s) into it?

Quoting the documentation:

> Inside the database, replication should be enabled via the DDL command:
> ALTER DATABASE ENABLE PUBLICATION
>
> Also, the replication set (aka publication) should be defined. It includes tables that should be replicated. This is also done via the DDL command:
>
> -- to replicate all tables (including the ones created later):
> ALTER DATABASE INCLUDE ALL TO PUBLICATION
> -- to replicate specific tables:
> ALTER DATABASE INCLUDE TABLE T1, T2, T3 TO PUBLICATION

--
WBR, SD.

Dmitry Yemanov

unread,
Dec 2, 2023, 12:46:04 AM12/2/23
to firebird...@googlegroups.com
01.12.2023 22:24, Georg Pfolz wrote:
>
> I have a few questions I could not figure out from the documentation I
> found:
>
> 1. What's the syntax of the sync_replica entry, if I have to include a
> port number?

The same as usual:
sync_replica = SYSDBA:abc...@my.server.com/3051:/remote/path/fb.fdb

> 2. Do I have to configure anything on the replica server (other than
> gzipping the database for replication use)?

Only run gfix -replica once

> 3. I have set up the databases on the replica server in the
> databases.conf file. Was I supposed to do this?

It's up to you, depending on whether you will access replicas for
read-only load and whether you need to apply any databases-specific
configuration settings to them.


Dmitry

Georg Pfolz

unread,
Dec 2, 2023, 12:47:16 AM12/2/23
to firebird-support
Did you enable publication and include some table(s) into it?
Yes, I did that: ALTER DATABASE ENABLE PUBLICATION; ALTER DATABASE INCLUDE ALL TO PUBLICATION;

Sorry, I forgot to include that information. I realized it right after I posted my question, but I couldn't correct it, as I'm still redacted.

Georg Pfolz

unread,
Dec 2, 2023, 12:53:45 AM12/2/23
to firebird-support
> 2. Do I have to configure anything on the replica server (other than 

> gzipping the database for replication use)? 
I meant "gfixing". So I did that too.

Georg Pfolz

unread,
Dec 2, 2023, 1:06:43 AM12/2/23
to firebird-support
Thanks a lot for the clarifications! It's working now, after I corrected the sync_replica syntax.
Reply all
Reply to author
Forward
0 new messages