When a GBase 8a cluster is set to READONLY mode, SELECT is not the only allowed operation. Statements that don't modify user data or cluster metadata — like SHOW, USE, and DESCRIBE — continue to work normally.
Permitted Statements
-
Data queries:
SELECTis the central operation allowed in read‑only mode. -
Metadata and status inspections: All
SHOWvariants (SHOW DATABASES;,SHOW TABLES;,SHOW COLUMNS FROM ...;,SHOW PROCESSLIST;, etc.),DESC/DESCRIBE, and queries againstINFORMATION_SCHEMAorPERFORMANCE_SCHEMA. -
Session‑level commands:
USE database_name;only changes the current database context for the session without touching persisted data.SETfor session variables (e.g.,SET NAMES utf8;) is also allowed. -
Selected administrative commands:
KILL QUERYterminates a running query — a connection‑management action that does not alter business data.
Prohibited Statements
-
DDL:
CREATE,ALTER,DROP,TRUNCATE -
DML:
INSERT,UPDATE,DELETE -
LOAD:
LOAD DATA INFILE -
Privilege changes:
GRANT,REVOKE
Why SHOW and USE Are Allowed
The whole point of READONLY mode is to freeze data during maintenance tasks — node expansion, replacement, or backup — ensuring user data and schema stay unchanged. Yet DBAs and applications still need to inspect tables, review structures, and monitor the cluster.
-
SHOWcommands are pure reads; they gather information from system catalogs without any write risk. -
USEmerely updates a pointer in the client's session memory; it generates no disk I/O, transaction log, or DDL coordination. - Neither statement touches transactional logs, data files, or distributed DDL synchronization, so they don't interfere with background maintenance.
Because they are inherently read‑only or only modify session state, they are permitted. This design balances data safety with operational continuity — you can keep "looking" at your gbase database while the cluster remains in maintenance mode.
Top comments (0)