Questions tagged [replication]
Replication is the process of sharing any level of information so as to ensure consistency between redundant hardware/software resources to improve reliability, fault-tolerance, and accessibility
3,521
questions
1
vote
1
answer
574
views
Mongodb replicaset allow secondary to write data
I'm having some trouble to understand how replicaSet works using 2 nodes and a arbiter, using MongoDB 6 community in 3 servers with ubuntu 22.04.
My actual scenario is I have 2 servers in a replicaSet ...
0
votes
1
answer
452
views
MySQL slave stuck at 'System lock'
We have Master-Slave replication but since +1h none changes are replicated because slave is stuck on 'System lock':
(dh@DB02) [(none)]> show slave status \G
*************************** 1. row ******...
1
vote
1
answer
180
views
How to interpret the contents of a replication slot state file in the data directory
We know that there is a state file for slot in the data/pg_replslot/<slot_name> directory.
It is needed when server restarts after a crash.
Questions:
How is the data stored inside this state ...
0
votes
1
answer
272
views
Charset Questions on Aurora-MySQL 5.7 as a Replica to a Aurora-MySQL 8.0 Primary
We are planning to upgrade from Aurora MySQL 2.10.2 (MySQL 5.7 equivalent) to Aurora MySQL 3.03.0 (MySQL 8 equivalent). One of the rollback plans that we are considering is having another Aurora MySQL ...
0
votes
1
answer
746
views
Detecting deleted rows in mysql
I have a Spring Boot webapp with a MySQL database. I'm trying to replicate this data into a MSSQL for running reports against.
All rows are audited with created_at and modified_at datetimes so i can ...
0
votes
2
answers
498
views
Postgresql Insert and Update only replica
Is it possible to create a replica from a database that only inserts and updates replicated and not deletes in PostgreSQL ?
0
votes
1
answer
62
views
Does the order in which vms are shutdown impact the postgresql replication environment?
I have the following environment:
A postgres server (rhel8, postgresql v14) as master and another as standby.
I need to do a maintenance task on the infrastructure and for this reason both vms need to ...
1
vote
1
answer
1k
views
Why does postgresql have so many replication slots open?
I use logical replication to move changes from my primary to a replica. Today, to update the replica, I:
disabled the subscription on the replica (ALTER SUBSCRIPTION foo DISABLE;)
upgraded it to ...
0
votes
1
answer
219
views
Postgresql, does pg_ctl promote affect primary server?
What will happen if I promote replica while primary server is still running? Does it affect the primary server in any way?
I know replica will lost it's continuity with primary but I'd like to set up ...
1
vote
1
answer
198
views
Mysql 8, how to fix replication when master IP changes?
I'm trying to figure out what needs to happen in mysql 8 when the master db IP in a replication setup changes (my ISP just randomly changed my IPs).
I found this article:
Change host IP of master in ...
0
votes
0
answers
1k
views
Postgresql logical replication suddenly stop (wal status is extended, An existing connection was forcibly closed by the remote host)
I checked the replication status of our production server when i noticed that one of the replicated DB is missing (using pg_stat_replication command).
I also check the replication slots and found out ...
3
votes
1
answer
122
views
How do distributed databases follow unique constraints?
Lets say i have an application where user can register, and the username has to be unqiue value.
Now lets say i have N partitions and for each partition i have M replicas with multiple leaders.
Now i ...
1
vote
0
answers
2k
views
Publication Error: The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction
I got some requirement to implement transactional replication, so I am doing some research on it, but I am getting some issues while creating the publication. I have restored adventure works database ...
1
vote
0
answers
96
views
Azure SQL: How can I share replicated db access with specific users?
I have 2 Azure SQL instances :
db-main which is my main DB, containing both my-db and master databases.
db-replica which contains a readonly replica my-db@db-main
I have currently a user my-db-admin ...
0
votes
1
answer
91
views
Mariadb 10.2.32 doesn't have REPLICATE_REWRITE_DB that can be set dynamically
I want to replicate DB from source to destination with another name. Seems like Replication filters like REPLICATE_REWRITE_DB filter is not availably dynamically .
Mariadb Version : 10.2.32 Focal (...
0
votes
0
answers
266
views
Postgres logical replication gets stuck at synchronized 's' state and does not move to 'r' state
I am currently trying out logical replication in postgres for upgrading postgres between major versions. Some tables which are part of a subscription gets stuck at 's' state of pg_subscription_rel. I ...
0
votes
0
answers
110
views
Synchronize same table between two databases in mysql
I have two databases with same table, this table stores products selling, i want to synchronize these two databases such us they must have same table products.
For example if i decrement or increment ...
0
votes
1
answer
368
views
Promoting MySQL replica to primary during failover
The MySQL primary fails and I'm trying to promote the replica to primary.
Following the official documentation, I've already:
disabled the failed primary server on all load balancers
waited for the ...
0
votes
1
answer
40
views
Remote DB-replication with time-lapse sync
I have a central DB and three remote client DB, say RDB-A, RDB-B and RDB-C. Main DB is implemented on a SQL Server Standard instance and all the RDB on different SQL Express instances. The RDB-X are ...
0
votes
1
answer
205
views
MongoDB oplog - entry removal process
When does old/first oplog entry in the mongo db primary get removed? I could not find much info when that would happen or if it even gets removed as it is a special circular collection.
My assumption ...
0
votes
1
answer
343
views
How difficult and how much time should it take to export a DB to a flat file?
How difficult of a process is it to export a database to a flat-file? Should it take seconds, minutes, hours, or days to complete an export?
I have no knowledge of the database structure, beyond the ...
1
vote
0
answers
733
views
How to understand why logical replication timeout
I have set up N-1 Postgresql (v12) logical replications: N publisher dbs to 1 subscriber db. And there are replication timeout logs in both pub and sub dbs sometimes:
Subscriber:
2023-04-13 15:41:37....
0
votes
0
answers
106
views
Configure SQL Server merge replication in local machine and a server machines
I have two databases on my local machine and the server. I want to sync them whenever they are being changed. For my scenario I'm using SQL Server replication.
I use merge type to sync these databases ...
0
votes
1
answer
276
views
MongoDB cluster Shard connection string suddenly misconfigured
A few hours ago, we had an outage in a server which was running a mongos instance. After resolving the underlying issue, the mongos has been unable to boot with the following error:
"ctx":&...
1
vote
1
answer
61
views
How to identify binlog_format for a specific query?
I have binlog_format set to MIXED and it states that mariadb will decide whether to use ROW or STATEMENT based logging for each query. Where can I see that information for a specific query?
1
vote
0
answers
199
views
How can I connect to my replicaset via DNS and private IP?
I have 2 node setup
10.1.0.7 - mongodb-1.com (primary)
10.1.0.8 - mongodb-2.com (secondary)
here is my mongod.conf
net:
port: 27017
bindIp: 0.0.0.0
tls:
mode: allowTLS
...
0
votes
1
answer
219
views
How to create mysql master slave replication from backup?
I am using sqlbak to back up my database. Here are the backup files look like:
Here is the content:
Typically, there should be one bin log file and one location to restore and be a slave. We back up ...
2
votes
0
answers
17
views
Merge Replication in SQL2019 database is restored to new server NOT keeping_replication
Merge Replication in SQL2019 database is restored to new server NOT keeping_replication but in restored database we find MSmerge_cont_% system views.
The last part of the system view name appears to ...
0
votes
1
answer
1k
views
How to prevent log_reuse_wait_desc REPLICATION stage and log growth
Not a unique problem here. I'm more so asking for advice on how to prevent this issue.
We're using a nightly snapshot replication job to offload data to our data warehouse. This job has been setup and ...
2
votes
1
answer
345
views
Why is the MySQL server-id necessary for replication when the server-uuid exists?
We're trying to setup some basic MySQL Master/Slave replication at our company, and we're confused regarding the unique server_id requirement on replica servers. Quoting the mysql docs:
On the source ...
0
votes
0
answers
299
views
MSSQL replication snapshot agent fails
I'm using MS SQL server 2019 on Linux. I'm trying to create a transactional replication.
The problem is that when I create a publication, the snapshot agent can not start.
Basically, I'm getting this ...
0
votes
1
answer
27
views
Handling IP Changes for Master MySQL Server
I have been working with master-slave replication in MySQl and was wondering if there is any possibility to set the listen-address property of the MYSQL config file to read the IP statically assigned ...
1
vote
1
answer
145
views
Advanced SQL Server replication scenario
I have a MS SQL Server based application with non-trivial schema (has indexing, clustering, transactions, views, stored procs, ...). The application itself has some features that need up-to-date data ...
0
votes
1
answer
1k
views
New rows are locked by select on PostgreSQL replica
have a strange trouble with getting new rows on replica on PostgreSQL on AWS.
I have master database on AWS with constant flow inserts/updates not with big rate.
And these changes are replicated ...
3
votes
1
answer
578
views
Avoid writing on a slave MariaDB server
I have a replication in place with a Master server and a slave server.
From time to time I connect to the slave server mostly to get info or generate statistics on my user's usage.
But I'm afraid that ...
0
votes
1
answer
155
views
Would MySQL Replication (master-slave) have prevented this problem?
I'm new to the idea of MySQL Replication (mainly because I've never really had data important enough to have redundancy until recently). Today I had a random crash of my MySQL 8 database with the ...
0
votes
2
answers
905
views
How to fix MySQL replication when duplicated key problem appears?
I have data logger software that writes data to master database. There are just 2 tables. If this database is locked or stopped for more than 1 minute I will loose some data that should be stored.
...
0
votes
1
answer
868
views
Mysql Replication Error: Waiting for master to send event
My replica db can't update master update.
When I write on my replica
Show slave status\g
its result:
*************************** 1. row ***************************
Slave_IO_State: ...
0
votes
1
answer
227
views
How to backup a replica Using mysqldump?
From MySQL Documents, and This answer they said:
When using mysqldump, you should stop replication on the replica before starting the dump process to ensure that the dump contains a consistent set of ...
1
vote
1
answer
169
views
Migrate from MySQL 5.6.33 to 5.7.41 through replication without downtime
I have to migrate from outdated standalone MySQL 5.6.33 to new server with 5.7.41(a separate server) without downtime (or just as short as possible). To accomplish that I'm going to use replication (...
0
votes
2
answers
313
views
PostgreSQL 12 streaming replication standbys timing out due to autovacuum tasks
We have PostgreSQL 12.9 running on Ubuntu 20.04.3 LTS in a streaming replication setup with 1 primary and 3 standbys where the following options have been configured on all servers:
hot_standby=on
...
0
votes
0
answers
63
views
Increase in Dirty Cache in Mongodb when we added a new replica set member
Mongo Version: 3.6
Database Engine: Wiredtiger
Old Cluster:
1 Primary
1 Secondary
1 Arbiter
We wanted to replace the secondary with a new machine, so we added a new Replica set. Due to which the ...
0
votes
1
answer
190
views
SQLServer replication between windows and linux server
I'm trying to setup a replication between a SQLServer 2016 in a windows server and a SQLServer 2019 host in linux server.
The linux instance run in a kubernetes setup and the docker image is simcube/...
1
vote
0
answers
859
views
How to see content of specific GTID transaction in MySQL
To maintain my GTID-Replication, I want to see the content of the GTID transaction. I use this command to do that:
#I want to see the content of binlog when GTID=1
mysqlbinlog -u USER -p'PASS' mysql-...
1
vote
1
answer
151
views
MySQL replication over unreliable network
I have a data logger application that puts data into MySQL database. That database has a replica. My data logger is connected to the internet via 4G connection which is unreliable sometimes.
It is not ...
1
vote
1
answer
174
views
PostgreSQL Logical Replication Trigger to add destination key column
I am using PostgreSQL Logical Replication to replicate data from multiple source databases into single one for analytical purposes.
Data from the source database have the same schema and therefore ...
0
votes
1
answer
829
views
How to convert standard replication to GTID replication in MySQL
Currently, I have a master-slave structure using binary replication. Since GTID replication is better and easier to manage, I want to convert my replication to GTID with minimal downtime and data loss....
0
votes
1
answer
58
views
Three Mysql Server Replikation (master <-> master <-> master )
Three different MySql servers:
master <-> master <-> master
Can it be configured as ?
Examples for 2 servers, but I couldn't find examples for 3 servers.
Thanks.
In my tests I was able to ...
0
votes
1
answer
109
views
PostgreSQL Real-Time Analytics
Latest months I am working with PostgreSQL while coming from Microsoft world (SQLServer). My scenario is the following:
Transfer data from different databases into single one (same set of tables and ...
2
votes
0
answers
177
views
Postgres First Replica has expected safe_wal_size, 2nd replica does not
Using Postgres 14 on Ubuntu:
I have logical replication setup from master => slave => slave2; It is replicating, but there is a problem with safe_wal_size.
Using du -sh /var/lib/postgresql/14
...