codership / documentation

Galera Cluster Library
http://galeracluster.com/library/
24 stars 64 forks source link

querying the PERFORMANCE_SCHEMA.PROCESSLIST #405

Closed byte closed 5 months ago

byte commented 10 months ago

new in 8.0.35

https://galeracluster.com/2024/01/galera-cluster-for-mysql-5-7-44-and-mysql-8-0-35-released/

kirjaamo commented 8 months ago

I have no idea where this could be added. Any hints?

byte commented 8 months ago

@kirjaamo i think i would place it here https://galeracluster.com/library/documentation/system-tables.html

kirjaamo commented 8 months ago

If I change, for example: SELECT COLUMN_NAME FROM information_schema.columns to SELECT COLUMN_NAME FROM performance_schema.columns enough?

byte commented 8 months ago

No. The current system tables are accurate, this is an addendum at the end.

We have seen: commit 81db5ada90da942a89431552e811d8776e087257 Author: Praveenkumar Hulakund praveenkumar.hulakund@oracle.com Date: Mon Sep 4 17:09:46 2023 +0200

WL#15915 Deprecate INFORMATION_SCHEMA.PROCESSLIST

Use of INFORMATION_SCHEMA.PROCESSLIST is deprecated, use
PERFORMANCE_SCHEMA.PROCESSLIST instead.

Change-Id: I2564471ede42d9da1ccd61269b073e57dbee6fcf

Which leads to commit 0fbec92303e1b2ed473e3cab2be6c9e6450ce589 Author: Jan Lindström jan.lindstrom@galeracluster.com Date: Fri Oct 27 10:42:26 2023 +0300

A lot of the "test suite" was updated.

So in previous releases you could do:

mysql> select * from processlist;

And see: | 1 | system user | | NULL | Sleep | 12247678 | wsrep aborter idle | NULL |

But now it results in tests, e.g. mysql-test/suite/galera_3nodes/r/galera_parallel_apply_3nodes.result

doing: SELECT COUNT(*) IN (1, 2) FROM performance_schema.processlist WHERE USER = 'system user' AND STATE LIKE '%committed%';

This is more an upstream change that Galera has to follow

kirjaamo commented 8 months ago

@byte I don't know what to write about this

byte commented 8 months ago

I think its just to state that we are no longer using INFORMATION_SCHEMA.PROCESSLIST, but PERFORMANCE_SCHEMA.PROCESSLIST

another example: SET GLOBAL wsrep_applier_threads = 10; SELECT COUNT(*) AS EXPECT_10 FROM performance_schema.threads WHERE NAME = 'thread/sql/wsrep_applier_thread';