You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix incorrect terminology for generating scripts/fill_help_tables.sql
Remove inconsistencies in replication terminology (master/slave
vs. primary/replica), in the files that are needed to generate the
help tables for the server source tree (scripts/fill_help_tables.sql).
Copy file name to clipboardExpand all lines: server/ha-and-performance/optimization-and-tuning/optimizing-tables/optimize-table.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ This statement requires [SELECT and INSERT privileges](../../../reference/sql-st
33
33
34
34
By default, `OPTIMIZE TABLE` statements are written to the [binary log](../../../server-management/server-monitoring-logs/binary-log/) and will be [replicated](../../standard-replication/replication-overview.md). The `NO_WRITE_TO_BINLOG` keyword (`LOCAL` is an alias) will ensure the statement is not written to the binary log.
35
35
36
-
`OPTIMIZE TABLE` statements are not logged to the binary log if [read\_only](../system-variables/server-system-variables.md#read_only) is set. See also [Read-Only Replicas](../../standard-replication/read-only-replicas.md).
36
+
`OPTIMIZE TABLE` statements are not logged to the binary log if [read\_only](../system-variables/server-system-variables.md#read_only) is set. See also [Read-Only Slaves](../../standard-replication/read-only-replicas.md).
37
37
38
38
`OPTIMIZE TABLE` is also supported for partitioned tables. You can use [ALTER TABLE ... OPTIMIZE PARTITION](../../../reference/sql-statements/data-definition/alter/alter-table/#optimize-partition) to optimize one or more partitions.
Copy file name to clipboardExpand all lines: server/ha-and-performance/standard-replication/innodb-based-binary-log.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Traditionally, MariaDB treated the [binary log](../../server-management/server-m
17
17
18
18
InnoDB-based binary logs entirely replace traditional file-based binary logs. When enabled, the server stops writing traditional binlog files, and the new format becomes the only binary log implementation in use.
19
19
20
-
Additionally, this feature is limited to the binary log on the server. The relay log on replicas continues to use the traditional implementation and is not affected by the use of InnoDB-based binary logs.
20
+
Additionally, this feature is limited to the binary log on the server. The relay log on slaves continues to use the traditional implementation and is not affected by the use of InnoDB-based binary logs.
21
21
22
22
## Enabling the InnoDB Binlog
23
23
@@ -113,18 +113,18 @@ The new binlog implementation requires GTID-based replication. The GTID state is
113
113
innodb-binlog-state-interval=2097152
114
114
```
115
115
116
-
The binary log from the last GTID state record is scanned when a replica connects in order to find the determined location.
116
+
The binary log from the last GTID state record is scanned when a slave connects in order to find the determined location.
117
117
The variable innodb-binlog-state-interval can be used to balance the cost of this scan against the extra space needed for the records; however this should have little impact in practice and normally can be left at the default.
118
118
119
119
For additional configuration options, see [Replication and Binary Log System Variables](replication-and-binary-log-system-variables.md).
120
120
121
121
#### Replication
122
122
123
-
Using the new binlog, [replication](./) configuration from the primary can be performed as usual. For that:
123
+
Using the new binlog, [replication](./) configuration from the master can be performed as usual. For that:
124
124
125
-
*Replicas must use GTID to connect to the primary (this is the default).
126
-
*Replicas should run MariaDB 12.3 or later when replicating from primary.
127
-
* The primary and replica can independently use either the traditional or new binlog format.
125
+
*Slaves must use GTID to connect to the master (this is the default).
126
+
*Slaves should run MariaDB 12.3 or later when replicating from master.
127
+
* The master and slave can independently use either the traditional or new binlog format.
* Files are not required for crash recovery or by active replicas.
206
+
* Files are not required for crash recovery or by active slaves.
207
207
208
208
## Backup using mariadb-backup
209
209
@@ -215,9 +215,9 @@ Key features:
215
215
216
216
* Consistent transactional backup for binlog files, similar to other [InnoDB](../../server-usage/storage-engines/innodb/) data.
217
217
* Backups are non-blocking, meaning the server continues running normally. By default, only `RESET MASTER`**,**`PURGE BINARY LOGS`, and `FLUSH BINARY LOGS` are blocked during backup. This blocking can be disabled with the `--no-lock` option.
218
-
* A restored backup can be used to set up a replica for replication.
218
+
* A restored backup can be used to set up a slave for replication.
219
219
220
-
### Setting Up Replica from Backup
220
+
### Setting Up Slave from Backup
221
221
222
222
```bash
223
223
# Default backup includes binlog files
@@ -273,12 +273,12 @@ This is the simplest approach, appropriate for cases where replication or point-
273
273
274
274
#### Method 2: Replication State Migration (GTID Preservation)
275
275
276
-
This approach is used to switch a primary server while ensuring that connected replicas can continue replicating without the need for a full reconfiguration.
276
+
This approach is used to switch a master server while ensuring that connected slaves can continue replicating without the need for a full reconfiguration.
277
277
278
-
1. Stop all writing to the primary.
279
-
2. Wait for all replicas to catch up to the primary's current position.
278
+
1. Stop all writing to the master.
279
+
2. Wait for all slaves to catch up to the master's current position.
280
280
3. Capture the current GTID state by noting down the value of `@@binlog_gtid_state`.
281
-
4. Restart the primary with this configuration:
281
+
4. Restart the master with this configuration:
282
282
283
283
```ini
284
284
[mariadb]
@@ -287,17 +287,17 @@ This approach is used to switch a primary server while ensuring that connected r
287
287
```
288
288
289
289
5. Immediately execute `SET GLOBAL binlog_gtid_state=<old value>` using the value saved in step 3.
290
-
6. Allow replicas to reconnect; they will continue from where they left off.
290
+
6. Allow slaves to reconnect; they will continue from where they left off.
291
291
292
292
#### Method 3: Live Migration (Zero downtime)
293
293
294
-
This is the most robust method for production environments, as it avoids primary downtime during the format transition.
294
+
This is the most robust method for production environments, as it avoids master downtime during the format transition.
295
295
296
-
1. Ensure that all replicas are upgraded to at least MariaDB version 12.3 before switching the primary.
297
-
2. Choose a replica and restart it with `--binlog-storage-engine=innodb`.
298
-
3. Allow the replica to replicate from the old-format primary until it has enough binlog data.
299
-
4. Promote this replica to be the new primary.
300
-
5. Restart the remaining replicas to point to the new primary after stopping them one at a time and changing their configuration to the new binlog format.
296
+
1. Ensure that all slaves are upgraded to at least MariaDB version 12.3 before switching the master.
297
+
2. Choose a slave and restart it with `--binlog-storage-engine=innodb`.
298
+
3. Allow the slave to replicate from the old-format master until it has enough binlog data.
299
+
4. Promote this slave to be the new master.
300
+
5. Restart the remaining slaves to point to the new master after stopping them one at a time and changing their configuration to the new binlog format.
Copy file name to clipboardExpand all lines: server/ha-and-performance/standard-replication/replication-and-binary-log-system-variables.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,7 +251,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
251
251
252
252
#### `binlog_row_event_fragment_threshold`
253
253
254
-
* Description: When a `Rows_log_event` exceeds this threshold, it is fragmented into multiple `Partial_rows_log_event` events in the binary log, each of it configured to maximum size. That is, all `Partial_rows_log_event` events up to the last in the group have this configured maximum size, and the last event takes the remaining size. This is relevant for events that would surpass the `slave_max_allowed_packet` length when sending to the replica, and thereby a sensible value would reflect the replica's configured `slave_max_allowed_packet` size.
254
+
* Description: When a `Rows_log_event` exceeds this threshold, it is fragmented into multiple `Partial_rows_log_event` events in the binary log, each of it configured to maximum size. That is, all `Partial_rows_log_event` events up to the last in the group have this configured maximum size, and the last event takes the remaining size. This is relevant for events that would surpass the `slave_max_allowed_packet` length when sending to the replica, and thereby a sensible value would reflect the slave's configured `slave_max_allowed_packet` size.
@@ -382,7 +382,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
382
382
383
383
#### `init_slave`
384
384
385
-
* Description: Similar to [init\_connect](../optimization-and-tuning/system-variables/server-system-variables.md#init_connect), but the string contains one or more SQL statements (separated by semicolons) that are executed by a replica server each time the SQL thread starts. These statements are only executed after the acknowledgement is sent to the replica and [START REPLICA](../../reference/sql-statements/administrative-sql-statements/replication-statements/start-replica.md) completes.
385
+
* Description: Similar to [init\_connect](../optimization-and-tuning/system-variables/server-system-variables.md#init_connect), but the string contains one or more SQL statements (separated by semicolons) that are executed by a replica server each time the SQL thread starts. These statements are only executed after the acknowledgement is sent to the replica and [START SLAVE](../../reference/sql-statements/administrative-sql-statements/replication-statements/start-replica.md) completes.
386
386
* Command line: `--init-slave=name`
387
387
* Scope: Global
388
388
* Dynamic: Yes
@@ -483,7 +483,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
483
483
484
484
#### `master_info_file`
485
485
486
-
* Description: The location and name of the file that remembers the primary and where the I/O replication thread is in the primary's binlogs. Defaults to primary.info.
486
+
* Description: The location and name of the file that remembers the master and where the I/O replication thread is in the master's binlogs. Defaults to master.info.
487
487
* Command line: `--master-info-file=val`
488
488
* Scope: Global
489
489
* Dynamic: No
@@ -752,15 +752,15 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
752
752
753
753
#### `report_host`
754
754
755
-
* Description: The host name or IP address the replica reports to the primary when it registers. If left unset, the replica does not register itself. Reported by [SHOW REPLICA HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md). Note that it is not sufficient for the primary to simply read the IP of the replica from the socket once the replica connects. Due to NAT and other routing issues, that IP may not be valid for connecting to the replica from the primary or other hosts.
755
+
* Description: The host name or IP address the replica reports to the primary when it registers. If left unset, the replica does not register itself. Reported by [SHOW SLAVE HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md). Note that it is not sufficient for the primary to simply read the IP of the replica from the socket once the replica connects. Due to NAT and other routing issues, that IP may not be valid for connecting to the replica from the primary or other hosts.
756
756
* Command line: `--report-host=host_name`
757
757
* Scope: Global
758
758
* Dynamic: No
759
759
* Data Type: `string`
760
760
761
761
#### `report_password`
762
762
763
-
* Description: Replica password reported to the primary when it registers. Reported by [SHOW REPLICA HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md) if `--show-slave-auth-info` is set. This password has no connection with user privileges or with the [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) user account password.
763
+
* Description: Replica password reported to the primary when it registers. Reported by [SHOW SLAVE HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md) if `--show-slave-auth-info` is set. This password has no connection with user privileges or with the [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) user account password.
764
764
* Command line: `--report-password=password`
765
765
* Scope: Global
766
766
* Dynamic: No
@@ -778,7 +778,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
778
778
779
779
#### `report_user`
780
780
781
-
* Description: Replica's account user name reported to the primary when it registers. Reported by [SHOW REPLICA HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md) if `--show-slave-auth-info` is set. This username has no connection with user privileges or with the [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) user account.
781
+
* Description: Replica's account user name reported to the primary when it registers. Reported by [SHOW SLAVE HOSTS](../../reference/sql-statements/administrative-sql-statements/show/show-replica-hosts.md) if `--show-slave-auth-info` is set. This username has no connection with user privileges or with the [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) user account.
782
782
* Command line: `--report-user=name`
783
783
* Scope: Global
784
784
* Dynamic: No
@@ -935,7 +935,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
* This system variable is only meaningful when parallel\
937
937
replication is configured (i.e. when [slave\_parallel\_threads](replication-and-binary-log-system-variables.md) > `0`).
938
-
* See [Parallel Replication: Configuring the Maximum Size of the Parallel Replica Queue](parallel-replication.md#configuring-the-maximum-size-of-the-parallel-slave-queue) for more information.
938
+
* See [Parallel Replication: Configuring the Maximum Size of the Parallel Slave Queue](parallel-replication.md#configuring-the-maximum-size-of-the-parallel-slave-queue) for more information.
939
939
* Command line: `--slave-parallel-max-queued=#`
940
940
* Scope: Global
941
941
* Dynamic: Yes
@@ -980,7 +980,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
980
980
981
981
#### `slave_run_triggers_for_rbr`
982
982
983
-
* Description: See [Running triggers on the replica for Row-based events](running-triggers-on-the-replica-for-row-based-events.md) for a description and use-case for this setting.
983
+
* Description: See [Running triggers on the slave for Row-based events](running-triggers-on-the-replica-for-row-based-events.md) for a description and use-case for this setting.
@@ -1086,7 +1086,7 @@ Also see [mariadbd replication options](../../server-management/starting-and-sto
1086
1086
1087
1087
#### `sync_master_info`
1088
1088
1089
-
* Description: A [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) replica synchronizes its primary.info file to disk after this many events. If set to 0, the operating system handles flushing the file to disk.
1089
+
* Description: A [replication](../../server-usage/storage-engines/myrocks/myrocks-and-replication.md) replica synchronizes its master.info file to disk after this many events. If set to 0, the operating system handles flushing the file to disk.
This function is useful in [replication](../../../../ha-and-performance/standard-replication/replication-overview.md) for controlling primary/replica synchronization. It blocks until the replica has read and applied all updates up to the specified position (`log_name,log_pos`) in the primary's binary log. The return value is the number of log events the replica had to wait for to advance to the specified position. The function returns `NULL` if the replica SQL thread is not started, the replica's primary information is not initialized, the arguments are incorrect, or an error occurs. It returns -1 if\
19
-
the timeout has been exceeded. If the replica SQL thread stops while`MASTER_POS_WAIT()` is waiting, the function returns `NULL`. If the replica is past the specified position, the function returns immediately.
18
+
This function is useful in [replication](../../../../ha-and-performance/standard-replication/replication-overview.md) for controlling master/slave synchronization. It blocks until the slave has read and applied all updates up to the specified position (`log_name,log_pos`) in the master's binary log. The return value is the number of log events the slave had to wait for to advance to the specified position. The function returns `NULL` if the slave SQL thread is not started, the slave's master information is not initialized, the arguments are incorrect, or an error occurs. It returns -1 if\
19
+
the timeout has been exceeded. If the slave SQL thread stops while`MASTER_POS_WAIT()` is waiting, the function returns `NULL`. If the slave is past the specified position, the function returns immediately.
20
20
21
21
If a `timeout` value is specified, `MASTER_POS_WAIT()` stops waiting when `timeout` seconds have elapsed. `timeout` must be greater than 0; a zero or negative `timeout` means no `timeout`.
0 commit comments