Parameters | Description |
---|---|
domino.decoder_info() |
Current database decoder information. |
domino.decoder_info_all() |
All database decoder information. |
domino.decoder_workers() |
Query the worker's pid, the connected database, etc. |
domino.decoder_metric() |
View the performance counter of decoder. |
domino.job_info() |
View the scheduling performance counter of the stream and the error message. |
domino.strategy_info() |
View the scheduling policy and status of the stream. |
domino.progress_info() |
Used to view stream progress and XLog retention. |
domino.ticker_info() |
Check whether ticker is running (or paused). |
domino.ticker_metric() |
Used to see what condition the ticker is triggered. |
domino.read_tuples() |
is used to view TLog content, used for debugging. |
Usage Example
domino.decoder_workers()
: query the worker's pid, the connected database, etc.
=# select * from domino.decoder_workers();
segid | dbid | dbname | pid
-------+------+-------------------------------------------------------------------------------------------------------------------
0 | 18745 | haoyu | 20351
1 | 18745 | haoyu | 20353
2 | 18745 | haoyu | 20352
-1 | 18745 | haoyu | 20354
(4 rows)
domino.decoder_metric()
: View the performance counter of decoder.
segid | dbid | dbname | bytes_in | xacts | spills | tuples_new | tuples_old | snapshots | latency_ms | loops | total_duration_ms | last_duration_ms
-------+------+-------+-------+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 | 18745 | haoyu | 36048 | 0 | 0 | 0 | 0 | 119 | 0 | 25851 | 26616 | 1
1 | 18745 | haoyu | 35872 | 0 | 0 | 0 | 0 | 119 | 0 | 26755 | 27517 | 1
2 | 18745 | haoyu | 36048 | 0 | 0 | 0 | 0 | 119 | 0 | 25814 | 26576 | 1
-1 | 18745 | haoyu | 36784 | 0 | 0 | 0 | 0 | 119 | 0 | 22781 | 23444 | 1
(4 rows)
domino.job_info()
: View the scheduling performance counter of the stream and the error message.
db | db_name | stream | stream_name | loops | tuples | total_slip_ms | last_slip_ms | last_lag_ms | total_duration_ms | last_duration_ms | last_run | held_until | has_error | error_message | error_detail | error_hint | error_context
-------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18745 | haoyu | 18792 | s1 | 4 | 0 | 6 | 2 | 1709 | 57 | 7 | 2025-05-23 14:14:26.249188+08 | 2025-05-23 14:14:27.242299+08 | f | | | |
(1 row)
domino.strategy_info()
: View the scheduling policy and status of the stream
id | db | db_name | stream | stream_name | strategy | summary
----+--------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 | 18745 | haoyu | 18792 | s1 | roundrobin | held until 2025-05-23 14:14:56.279678+08
(1 row)
domino.progress_info()
: Used to view stream progress and XLog retention.
segid | db | db_name | stream | stream_name | restart_lsn | flush_lsn | tsn | xmin | end_lsn | lag_size | pending_xid | pending_restart | pending_flush | pending_tsn | pending_xmin | wal_status | safe_wal_size
-------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 | 18745 | haoyu | 18792 | s1 | 0/C246788 | 0/C249420 | 0/1A160 | 645 | 0/C249CE0 | 2240 | 647 | 0/C246788 | 0/C249610 | 0/1A240 | 646 | reserved |
1 | 18745 | haoyu | 18792 | s1 | 0/C2466F0 | 0/C249388 | 0/1A160 | 645 | 0/C249C48 | 2240 | 647 | 0/C2466F0 | 0/C249578 | 0/1A240 | 646 | reserved |
2 | 18745 | haoyu | 18792 | s1 | 0/C246788 | 0/C249420 | 0/1A160 | 645 | 0/C249CE0 | 2240 | 647 | 0/C246788 | 0/C249610 | 0/1A240 | 646 | reserved |
(3 rows)
domino.ticker_info()
: Check whether the ticker is running (or paused).
-- The return value is (invalid not started, running is running, paused is paused).
ticker_info
-------------------
running
(1 row)
domino.ticker_metric()
: Used to see what condition the ticker is triggered.
=# SELECT * FROM domino.ticker_metric();
segid | ticks_by_time | ticks_by_size | ticks_by_force
-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 | 18894 | 2 | 1
1 | 18894 | 2 | 1
2 | 18894 | 2 | 1
-1 | 0 | 0 | 0
(4 rows)
The Domino plug-in provides two views: domino.decoder_info
and domino.stream_info
, which monitor the status of the logical decoder and data streams.
decoder_info
displays the logical decoder running status and metric information on each segment.
Field Description
Field name | Type | Meaning |
---|---|---|
segid | integer | segment number |
dbid | oid | database OID |
dbname | text | database name |
restart_lsn | pg_lsn | Dependency xlog start position (click this position to retain xlog) |
confirmed_flush | pg_lsn | dependency xlog flush location |
start_tsn | pg_lsn | The starting point of the last tlog of production tsn |
end_tsn | pg_lsn | The tail of the last tlog produced tsn |
prog_xmin | xid | xmin of the dependent catalog/dimensional table (click this xid to retain the table's data) |
pid | integer | decoder process ID, 0 means not running |
bytes_in | bigint | Total data consumption of xlog |
xacts | bigint | Total consumption transactions |
spills | bigint | Number of transactions spills to disk |
tuples_new | bigint | number of inserted rows |
tuples_old | bigint | number of old rows updated/deleted |
snapshots | bigint | Number of snapshots generated |
latency_ms | bigint | last round of decoding delay |
loops | bigint | number of decoder execution rounds |
total_duration_ms | bigint | cumulative operation time |
last_duration_ms | bigint | The last round of running time |
Query Example
-- View segments with high decoding delay
SELECT segid, dbid, dbname, dbname, latency_ms
FROM domino.decoder_info
WHERE latency_ms > 60 * 1000;
stream_info
Displays the overall progress, status and scheduling information of each logical stream.
Field Description
Field name | Type | Meaning |
---|---|---|
segid | integer | segment number |
db | oid | database OID |
db_name | text | database name |
stream | oid | stream OID |
stream_name | text | stream name |
restart_lsn | pg_lsn | Dependency xlog start position (click this position to retain xlog) |
flush_lsn | pg_lsn | dependency xlog flush location |
start_tsn | pg_lsn | The starting point of the last tlog for consumption tsn |
end_tsn | pg_lsn | The starting point of the last tlog for consumption tsn |
xmin | xid | xmin of dependency catalog / dimension table (click this xid to retain the table's data) |
end_lsn | pg_lsn | latest lsn on this segment |
lag_size | bigint | flush_lsn The size of the distance end_lsn |
pending_xid | xid | Transaction ID that has not been submitted yet |
pending_restart | pg_lsn | Dependency start position for xlog that has not been submitted (click this to preserve xlog) |
pending_flush | pg_lsn | xlog flush location for dependencies that have not been submitted |
pending_tsn | pg_lsn | The starting point of the last tlog for dependent consumption that has not been submitted tlog |
pending_xmin | xid | xmin of the dependency catalog / dimension table that has not been submitted (click this xid to retain the table's data) |
wal_status | text | WAL status description has the following values: reserved : The max_wal_size limit is not exceeded, and it will not be cleaned; extended : The max_wal_size is exceeded, but it is protected by logical slots or streams, and it will not be cleaned; unreserved : The protection range of slots and streams is exceeded, and it will be cleaned next time; `removed: It has been cleaned |
safe_wal_size | bigint | safe maximum WAL size limit, wal beyond this limit will be cleaned |
loops | bigint | number of execution rounds |
tuples | bigint | Number of rows processed |
total_slip_ms | bigint | cumulative sleep duration (task scheduling delay) |
last_slip_ms | bigint | last sleep time |
last_lag_ms | bigint | stream processing delay (time difference between the last tick transaction processed to the latest tick) |
total_duration_ms | bigint | Total execution time |
last_duration_ms | bigint | The last execution took |
last_run | timestamp with time zone | last run time |
hold_until | timestamp with time zone | The next time you are scheduled (the execution error will sleep for one minute before execution) |
has_error | boolean | Is there any error occurring |
error_message | text | error message |
error_detail | text | Error details |
error_hint | text | error prompt |
error_context | text | error context |
slot_id | integer | occupied domino worker slot |
strategy | text | Scheduling strategy |
summary | text | policy description summary |
Query Example
-- Check all streams with errors
SELECT stream_name, error_message
FROM domino.stream_info
WHERE has_error;
-- View streams with large lags
SELECT stream_name, pg_size_pretty(lag_size) AS lag
FROM domino.stream_info
WHERE lag_size > 64*1024*1024;
Parameters | Description |
---|---|
domino.start() |
Start with one click. Since the v2 component will not start automatically before the next restart after creating the plug-in, it needs to be started manually. |
domino.stop() |
Stop with one click. |
domino.start_decoder() |
Start the decoder. |
domino.stop_decoder() |
Close the decoder. |
domino.ticker_start() |
Start ticker. |
domino.ticker_stop() |
Close ticker. |
domino.ticker_pause() |
Pause ticker. |
domino.ticker_resume() |
Restore ticker. |
domino.ticker_reset() |
Reset ticker. |
domino.wait_tick() |
Wait for the next tick. |
Mostly used for troubleshooting.
Parameters | Description |
---|---|
domino.decoder_sync() |
Wait for the decoder progress to catch up. |
domino.progress_sync() |
Wait for the flow progress to catch up. |
domino.pause_stream() |
Pause a stream. |
domino.pause_all_streams() |
Pause all streams. |
domino.resume_stream() |
Restore a stream. |
domino.resume_all_streams() |
Restore all streams. |
domino.switch_tlog() |
Switch the TLog file (Segment). |