Hi,
I am using the async-Replication and in with DDL-Changes (chreate table), the grantor is not set correct. This ensures that replication stops
Here is my way to reproduce it in FB 4.0.4 and 5.0.
I'm using a Windows 11-machine, but also had this seen on a Linux-machine.
- Create USER ISQL
isql employee -user SYSDBA
create user DBOwner password '1234' Grant Admin role;
- Create Database
CREATE DATABASE 'localhost/3050:primary.fdb'
USER 'DBOWNER' PASSWORD '1234'
PAGE_SIZE 16384
DEFAULT CHARACTER SET UTF8 COLLATION UTF8;
RECREATE TABLE TEST1 (
ID INTEGER GENERATED BY DEFAULT AS IDENTITY,
CONSTRAINT PK_TEST1 PRIMARY KEY (ID)
);
- Copy Database to secondary.fdb
- Setup an async replication between primary.fdb and secondary.fdb
- Activate replication on primary side
ALTER DATABASE INCLUDE ALL TO PUBLICATION
ALTER DATABASE ENABLE PUBLICATION
- Activate replication on secondary side
gfix -user DBOwner -pass 1234 -replica read_only localhost/3051:secondary.fdb
- Create an other Table on primary side (Connected as DBOwner)
RECREATE TABLE TEST2 (
ID INTEGER GENERATED BY DEFAULT AS IDENTITY,
CONSTRAINT PK_TEST2 PRIMARY KEY (ID)
)
- Have a look, who is the Grantor
select * from RDB$USER_PRIVILEGES where RDB$USER_PRIVILEGES.rdb$relation_name = 'TEST2'
In Primary: RDB$User = DBOWNER and RDB$GRANTOR = DBOWNER
In Secondary: RDB$User = DBOWNER and RDB$GRANTOR = SYSDBA
- Revoke delete from DBOwner on Table TEST2 on primary side
REVOKE delete on TEST2 from DBOWNER;
- Replication dosent works anymore
replocation.log: DBOWNER is not grantor of DELETE on TEST2 to DBOWNER.
My expectation is that the Grantor on the secondary side is the same as on the primary side. Or that you can specify in the config file who executes the replication statments on the secondary side.
I didn't find something in the Documentation to this.
Regards, Jan
Hi,
I am using the async-Replication and in with DDL-Changes (chreate table), the grantor is not set correct. This ensures that replication stops
Here is my way to reproduce it in FB 4.0.4 and 5.0.
I'm using a Windows 11-machine, but also had this seen on a Linux-machine.
isql employee -user SYSDBA
create user DBOwner password '1234' Grant Admin role;
RECREATE TABLE TEST2 ( ID INTEGER GENERATED BY DEFAULT AS IDENTITY, CONSTRAINT PK_TEST2 PRIMARY KEY (ID) )In Primary: RDB$User = DBOWNER and RDB$GRANTOR = DBOWNER
In Secondary: RDB$User = DBOWNER and RDB$GRANTOR = SYSDBA
My expectation is that the Grantor on the secondary side is the same as on the primary side. Or that you can specify in the config file who executes the replication statments on the secondary side.
I didn't find something in the Documentation to this.
Regards, Jan