diff --git a/META.json b/META.json index 55f3b20..b85dd03 100644 --- a/META.json +++ b/META.json @@ -2,7 +2,7 @@ "name": "plpgsql_check", "abstract": "Additional tools for plpgsql functions validation", "description": "The plpgsql_check is PostgreSQL extension with functionality for direct or indirect extra validation of functions in plpgsql language. It verifies a validity of SQL identifiers used in plpgsql code. It try to identify a performance issues. Modern versions has integrated profiler. The table and function dependencies can be displayed", - "version": "2.1.5", + "version": "2.1.6", "maintainer": "Pavel STEHULE ", "license": "bsd", "provides": { @@ -10,7 +10,7 @@ "abstract": "Additional tools for plpgsql functions validation", "file": "sql/plpgsql_check_active.sql", "docfile": "README.md", - "version": "2.1.5" + "version": "2.1.6" } }, "prereqs": { diff --git a/postgresql10-plpgsql_check.spec b/postgresql10-plpgsql_check.spec index 629667c..01452e0 100644 --- a/postgresql10-plpgsql_check.spec +++ b/postgresql10-plpgsql_check.spec @@ -3,7 +3,7 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 2.1.5 +Version: 2.1.6 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation diff --git a/postgresql11-plpgsql_check.spec b/postgresql11-plpgsql_check.spec index 876c05b..6b0c983 100644 --- a/postgresql11-plpgsql_check.spec +++ b/postgresql11-plpgsql_check.spec @@ -3,7 +3,7 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 2.1.5 +Version: 2.1.6 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation diff --git a/postgresql12-plpgsql_check.spec b/postgresql12-plpgsql_check.spec index 662d055..1ec724f 100644 --- a/postgresql12-plpgsql_check.spec +++ b/postgresql12-plpgsql_check.spec @@ -3,7 +3,7 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 2.1.5 +Version: 2.1.6 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation diff --git a/postgresql13-plpgsql_check.spec b/postgresql13-plpgsql_check.spec index 4f10404..dc7caaa 100644 --- a/postgresql13-plpgsql_check.spec +++ b/postgresql13-plpgsql_check.spec @@ -3,7 +3,7 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 2.1.5 +Version: 2.1.6 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation diff --git a/postgresql14-plpgsql_check.spec b/postgresql14-plpgsql_check.spec index b30c115..0c325d5 100644 --- a/postgresql14-plpgsql_check.spec +++ b/postgresql14-plpgsql_check.spec @@ -3,7 +3,7 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 2.1.5 +Version: 2.1.6 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation diff --git a/postgresql15-plpgsql_check.spec b/postgresql15-plpgsql_check.spec index 06bd7c9..e41a158 100644 --- a/postgresql15-plpgsql_check.spec +++ b/postgresql15-plpgsql_check.spec @@ -3,7 +3,7 @@ %global sname plpgsql_check Name: %{sname}_%{pgmajorversion} -Version: 2.1.5 +Version: 2.1.6 Release: 1%{?dist} Summary: Additional tools for plpgsql functions validation diff --git a/src/plpgsql_check.c b/src/plpgsql_check.c index c5a53dd..8bffdd5 100644 --- a/src/plpgsql_check.c +++ b/src/plpgsql_check.c @@ -309,6 +309,7 @@ _PG_init(void) NULL, NULL, NULL); #if PG_VERSION_NUM < 150000 + /* * If you change code here, don't forget to also report the * modifications in plpgsql_check_profiler_shmem_request() for pg15 and @@ -318,15 +319,19 @@ _PG_init(void) RequestNamedLWLockTranche("plpgsql_check profiler", 1); RequestNamedLWLockTranche("plpgsql_check fstats", 1); + #endif /* * Install hooks. */ #if PG_VERSION_NUM >= 150000 + prev_shmem_startup_hook = shmem_request_hook; shmem_request_hook = plpgsql_check_profiler_shmem_request; + #endif + prev_shmem_startup_hook = shmem_startup_hook; shmem_startup_hook = plpgsql_check_profiler_shmem_startup; } diff --git a/src/profiler.c b/src/profiler.c index e710745..7d4b9d7 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -613,6 +613,7 @@ plpgsql_check_shmem_size(void) * _PG_init() for pg14 and below. */ #if PG_VERSION_NUM >= 150000 + void plpgsql_check_profiler_shmem_request(void) { @@ -624,6 +625,7 @@ plpgsql_check_profiler_shmem_request(void) RequestNamedLWLockTranche("plpgsql_check profiler", 1); RequestNamedLWLockTranche("plpgsql_check fstats", 1); } + #endif /*