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
Copy file name to clipboardExpand all lines: EN/modules/ROOT/pages/5.13.adoc
+32-8Lines changed: 32 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,13 +27,17 @@ This guide was verified with IvorySQL 5.4 (PostgreSQL 18.4) and Pgpool-II 4.7.2
27
27
|Supported
28
28
|`SHOW POOL_NODES` identified the primary and standby correctly
29
29
30
-
|Read-query load balancing
31
-
|Supported
32
-
|Both nodes received SELECT queries with equal configured weights
30
+
|Read-query load balancing with PostgreSQL-compatible syntax
31
+
|Verified for the tested queries
32
+
|Both nodes received the tested SELECT queries with equal configured weights; this does not establish load balancing for Oracle-specific syntax
33
33
34
34
|Oracle-compatible sessions
35
-
|Supported with notes
36
-
|A session switched to `ivorysql.compatible_mode = oracle` and queried through Pgpool-II successfully
35
+
|Connectivity verified
36
+
|A session switched to `ivorysql.compatible_mode = oracle` and executed the SELECT example below; Oracle-specific syntax routing was not tested
37
+
38
+
|Load balancing of Oracle-specific syntax
39
+
|Not verified
40
+
|In streaming-replication mode, statements rejected by Pgpool-II's parser are sent to the primary, not load balanced
37
41
|===
38
42
39
43
== Prerequisites
@@ -148,7 +152,7 @@ SHOW POOL_NODES;
148
152
SHOW POOL_PROCESSES;
149
153
----
150
154
151
-
In the IvorySQL 5.4 validation, Pgpool-II reported both nodes as `up`, assigned roles `primary` and `standby`, and showed a replication delay of zero. With equal weights, 21 initial read queries were distributed 9 to the primary and 12 to the standby.
155
+
In the IvorySQL 5.4 validation, Pgpool-II reported both nodes as `up`, assigned roles `primary` and `standby`, and showed a replication delay of zero. With equal weights, 21 initial read queries were distributed 9 to the primary and 12 to the standby. These results apply to the tested PostgreSQL-compatible SELECT queries, not to Oracle-specific syntax.
152
156
153
157
== Oracle-compatible mode
154
158
@@ -160,12 +164,32 @@ SET ivorysql.compatible_mode = oracle;
160
164
SELECT 'connected through Pgpool-II' AS status FROM dual;
161
165
----
162
166
163
-
The validation succeeded through Pgpool-II and continued to use the replicated backend pair.
167
+
This example verifies connectivity and execution in an Oracle-compatible session, not load balancing of Oracle-specific syntax. Its `SELECT ... FROM dual` form is still a PostgreSQL-compatible SELECT referencing a relation. Changing `ivorysql.compatible_mode` changes the backend's behavior; it does not change Pgpool-II's SQL parser.
168
+
169
+
[IMPORTANT]
170
+
====
171
+
Pgpool-II 4.7 uses the PostgreSQL 18 SQL parser, as documented in its https://www.pgpool.net/docs/4.7/en/html/release-4-7-0.html[release notes]. In this guide's streaming-replication mode, statements that Pgpool-II cannot parse are sent to the primary according to its https://www.pgpool.net/docs/4.7/en/html/runtime-config-load-balancing.html[load-balancing rules]. Oracle-specific syntax outside that parser's grammar therefore does not benefit from read-query load balancing, even with `load_balance_mode = on`.
172
+
173
+
This does not mean every query in an Oracle-compatible session must go to the primary: a query that Pgpool-II can parse must still satisfy its other load-balancing conditions. Do not infer routing support from the session mode or successful execution alone.
174
+
====
175
+
176
+
=== Check routing for an application
177
+
178
+
In a test environment, enable https://www.pgpool.net/docs/4.7/en/html/runtime-config-logging.html#GUC-LOG-PER-NODE-STATEMENT[`log_per_node_statement`] in `pgpool.conf` and reload the configuration:
179
+
180
+
[source,ini]
181
+
----
182
+
log_per_node_statement = on
183
+
----
184
+
185
+
Run the application's representative PostgreSQL-compatible queries and Oracle-specific statements separately through Pgpool-II, then inspect the per-node statement logs to identify the actual destination. Test the application's transaction and write/read sequences as well; parsing alone does not determine load-balancing eligibility. `SHOW POOL_NODES` can help inspect node status, but successful execution and the selected load-balancing node are not proof that a particular statement ran on the standby.
186
+
187
+
Until this application-level routing validation is complete, do not rely on standby read offloading for Oracle-specific SQL. Disable statement logging after testing if SQL text contains sensitive data.
164
188
165
189
== Operational considerations
166
190
167
191
* This guide validates Pgpool-II on IvorySQL's PostgreSQL-compatible endpoint. It does not validate proxying an Oracle client protocol through `ivorysql.port`.
168
-
* Pgpool-II parses SQL to decide where to route it. Test application-specific Oracle syntax and route statements that must see the newest data to the primary.
192
+
* Apply the Oracle-specific routing limitations above, and route statements that must see the newest data to the primary.
169
193
* Asynchronous streaming replication can return stale data from a standby. Configure delay thresholds or synchronous replication according to the application's consistency requirements.
170
194
* Do not expose Pgpool-II with `trust` authentication. Use TLS, SCRAM, restricted listen addresses, and least-privilege monitoring accounts in production.
171
195
* Automatic failover is a separate high-availability design. Test promotion, fencing, client retry, and split-brain prevention before enabling it.
0 commit comments