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/master/ecosystem_components/pg_profile.adoc
+3-42Lines changed: 3 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ pg_profile is an extension tool for PostgreSQL database performance analysis. It
9
9
10
10
pg_profile hard-depends on two extensions: dblink and plpgsql (it is written entirely in SQL and PL/pgSQL and requires no external libraries or software). Additionally, it is recommended to install the pg_stat_statements extension to obtain SQL statement-level statistics in the reports. The version of pg_profile is strongly tied to the version of PostgreSQL, currently supporting up to PG 18. For the specific version support, please refer to the README in the official pg_profile github repository.
11
11
12
-
Both the PG mode and Oracle compatibility mode of IvorySQL have been adapted for pg_profile. Note that in Oracle compatibility mode, before compiling pg_profile, you need to manually modify the control.tpl file in the extension source code to add a configuration item `pg_dialect = true`, otherwise the installation will fail.
12
+
Both the PG mode and Oracle compatibility mode of IvorySQL have been adapted for pg_profile.
To install pg_profile in IvorySQL's Oracle compatibility mode, you need to first modify the control.tpl file of pg_profile to add the `pg_dialect` configuration item:
22
-
[literal]
23
-
----
24
-
# pg_profile/control.tpl
25
-
pg_dialect = true
26
-
----
27
21
28
22
Perform source code compilation and installation:
29
23
[literal]
@@ -34,15 +28,7 @@ make -C contrib/pg_stat_statements install
34
28
make -C contrib/pg_profile install
35
29
----
36
30
37
-
The installation artifacts are `pg_profile.control` and `pg_profile--4.11.sql`. In IvorySQL's Oracle compatibility mode, you can verify that the generated `pg_profile.control` file carries the `pg_dialect` declaration:
38
-
[literal]
39
-
----
40
-
default_version = '4.11'
41
-
requires = 'dblink,plpgsql'
42
-
superuser = false
43
-
44
-
pg_dialect = true
45
-
----
31
+
The installation artifacts are `pg_profile.control` and `pg_profile--4.11.sql`.
46
32
47
33
=== Modify Configuration
48
34
The pg_stat_statements that pg_profile depends on must be loaded at server startup via `shared_preload_libraries`.
@@ -77,16 +63,6 @@ SELECT extname, extversion FROM pg_extension WHERE extname = 'pg_profile';
77
63
pg_profile | 4.11
78
64
----
79
65
80
-
In Oracle compatibility mode, you can run the following query to confirm that the extension functions of pg_profile have been pinned to the PG syntax parser:
81
-
[literal]
82
-
----
83
-
SELECT proname, proconfig FROM pg_proc
84
-
WHERE proname = 'take_sample' AND proconfig IS NOT NULL LIMIT 1;
The above functions are invoked and produce identical results in an Oracle mode session (Oracle port/1521).
131
-
132
-
== Notes
133
-
134
-
=== Adaptation Description
135
-
IvorySQL can directly install and use the pg_profile extension in PG mode. However, in Oracle compatibility mode, you need to add the `pg_dialect` configuration item to the control.tpl file of pg_profile at compile time to enable the PG syntax parser and avoid installation failure.
136
-
137
-
=== Adaptation Boundary
138
-
The `pg_dialect` adaptation mechanism protects the extension's own code; the SQL written in the caller's session is still parsed according to the session dialect. When calling pg_profile in an Oracle mode session, the user's own expressions in the statements must conform to Oracle mode syntax, for example:
139
-
[literal]
140
-
----
141
-
-- In an Oracle session: PG-style interval literals will cause an error during session parsing
Copy file name to clipboardExpand all lines: EN/modules/ROOT/pages/master/ecosystem_components/pg_repack.adoc
+1-8Lines changed: 1 addition & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
== Overview
8
8
pg_repack is an extension for PostgreSQL used to rebuild tables and indexes online and eliminate storage bloat. It can achieve effects similar to `VACUUM FULL` (reclaiming space), while barely blocking business read/write operations.
9
9
10
-
Both the PG mode and Oracle compatibility mode of IvorySQL have been adapted for pg_repack. Note that in Oracle compatibility mode, before compiling pg_repack, you need to manually modify the lib/pg_repack.control.in file in the extension source code to add a configuration item `pg_dialect = true`, otherwise the installation will fail.
10
+
Both the PG mode and Oracle compatibility mode of IvorySQL have been adapted for pg_repack.
11
11
12
12
Github: <https://github.com/reorg/pg_repack>
13
13
@@ -47,13 +47,6 @@ Pull the pg_repack source code:
To install pg_repack in IvorySQL's Oracle compatibility mode, you need to first modify the lib/pg_repack.control.in file of pg_repack to add the `pg_dialect` configuration item:
0 commit comments