Update pgstattuple extension for parallel query.
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
This commit is contained in:
parent
496899ccc2
commit
a8501ba119
4 changed files with 25 additions and 10 deletions
|
@ -4,7 +4,9 @@ MODULE_big = pgstattuple
|
|||
OBJS = pgstattuple.o pgstatindex.o pgstatapprox.o $(WIN32RES)
|
||||
|
||||
EXTENSION = pgstattuple
|
||||
DATA = pgstattuple--1.3.sql pgstattuple--1.2--1.3.sql pgstattuple--1.1--1.2.sql pgstattuple--1.0--1.1.sql pgstattuple--unpackaged--1.0.sql
|
||||
DATA = pgstattuple--1.4.sql pgstattuple--1.3--1.4.sql \
|
||||
pgstattuple--1.2--1.3.sql pgstattuple--1.1--1.2.sql \
|
||||
pgstattuple--1.0--1.1.sql pgstattuple--unpackaged--1.0.sql
|
||||
PGFILEDESC = "pgstattuple - tuple-level statistics"
|
||||
|
||||
REGRESS = pgstattuple
|
||||
|
|
13
contrib/pgstattuple/pgstattuple--1.3--1.4.sql
Normal file
13
contrib/pgstattuple/pgstattuple--1.3--1.4.sql
Normal file
|
@ -0,0 +1,13 @@
|
|||
/* contrib/pgstattuple/pgstattuple--1.3--1.4.sql */
|
||||
|
||||
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
|
||||
\echo Use "ALTER EXTENSION pgstattuple UPDATE TO '1.4'" to load this file. \quit
|
||||
|
||||
ALTER FUNCTION pgstattuple(text) PARALLEL SAFE;
|
||||
ALTER FUNCTION pgstatindex(text) PARALLEL SAFE;
|
||||
ALTER FUNCTION pg_relpages(text) PARALLEL SAFE;
|
||||
ALTER FUNCTION pgstatginindex(regclass) PARALLEL SAFE;
|
||||
ALTER FUNCTION pgstattuple(regclass) PARALLEL SAFE;
|
||||
ALTER FUNCTION pgstatindex(regclass) PARALLEL SAFE;
|
||||
ALTER FUNCTION pg_relpages(regclass) PARALLEL SAFE;
|
||||
ALTER FUNCTION pgstattuple_approx(regclass) PARALLEL SAFE;
|
|
@ -14,7 +14,7 @@ CREATE FUNCTION pgstattuple(IN relname text,
|
|||
OUT free_space BIGINT, -- free space in bytes
|
||||
OUT free_percent FLOAT8) -- free space in %
|
||||
AS 'MODULE_PATHNAME', 'pgstattuple'
|
||||
LANGUAGE C STRICT;
|
||||
LANGUAGE C STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION pgstatindex(IN relname text,
|
||||
OUT version INT,
|
||||
|
@ -28,12 +28,12 @@ CREATE FUNCTION pgstatindex(IN relname text,
|
|||
OUT avg_leaf_density FLOAT8,
|
||||
OUT leaf_fragmentation FLOAT8)
|
||||
AS 'MODULE_PATHNAME', 'pgstatindex'
|
||||
LANGUAGE C STRICT;
|
||||
LANGUAGE C STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION pg_relpages(IN relname text)
|
||||
RETURNS BIGINT
|
||||
AS 'MODULE_PATHNAME', 'pg_relpages'
|
||||
LANGUAGE C STRICT;
|
||||
LANGUAGE C STRICT PARALLEL SAFE;
|
||||
|
||||
/* New stuff in 1.1 begins here */
|
||||
|
||||
|
@ -42,7 +42,7 @@ CREATE FUNCTION pgstatginindex(IN relname regclass,
|
|||
OUT pending_pages INT4,
|
||||
OUT pending_tuples BIGINT)
|
||||
AS 'MODULE_PATHNAME', 'pgstatginindex'
|
||||
LANGUAGE C STRICT;
|
||||
LANGUAGE C STRICT PARALLEL SAFE;
|
||||
|
||||
/* New stuff in 1.2 begins here */
|
||||
|
||||
|
@ -57,7 +57,7 @@ CREATE FUNCTION pgstattuple(IN reloid regclass,
|
|||
OUT free_space BIGINT, -- free space in bytes
|
||||
OUT free_percent FLOAT8) -- free space in %
|
||||
AS 'MODULE_PATHNAME', 'pgstattuplebyid'
|
||||
LANGUAGE C STRICT;
|
||||
LANGUAGE C STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION pgstatindex(IN relname regclass,
|
||||
OUT version INT,
|
||||
|
@ -71,12 +71,12 @@ CREATE FUNCTION pgstatindex(IN relname regclass,
|
|||
OUT avg_leaf_density FLOAT8,
|
||||
OUT leaf_fragmentation FLOAT8)
|
||||
AS 'MODULE_PATHNAME', 'pgstatindexbyid'
|
||||
LANGUAGE C STRICT;
|
||||
LANGUAGE C STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION pg_relpages(IN relname regclass)
|
||||
RETURNS BIGINT
|
||||
AS 'MODULE_PATHNAME', 'pg_relpagesbyid'
|
||||
LANGUAGE C STRICT;
|
||||
LANGUAGE C STRICT PARALLEL SAFE;
|
||||
|
||||
/* New stuff in 1.3 begins here */
|
||||
|
||||
|
@ -92,4 +92,4 @@ CREATE FUNCTION pgstattuple_approx(IN reloid regclass,
|
|||
OUT approx_free_space BIGINT, -- estimated free space in bytes
|
||||
OUT approx_free_percent FLOAT8) -- free space in % (based on estimate)
|
||||
AS 'MODULE_PATHNAME', 'pgstattuple_approx'
|
||||
LANGUAGE C STRICT;
|
||||
LANGUAGE C STRICT PARALLEL SAFE;
|
|
@ -1,5 +1,5 @@
|
|||
# pgstattuple extension
|
||||
comment = 'show tuple-level statistics'
|
||||
default_version = '1.3'
|
||||
default_version = '1.4'
|
||||
module_pathname = '$libdir/pgstattuple'
|
||||
relocatable = true
|
||||
|
|
Loading…
Reference in a new issue