Skip to content

Commit 06d7fd6

Browse files
committed
Update pg_buffercache extension for parallel query.
The pg_buffercache_pages function provided by this extension is PARALLEL SAFE. Andreas Karlsson
1 parent e3b607c commit 06d7fd6

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

contrib/pg_buffercache/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ MODULE_big = pg_buffercache
44
OBJS = pg_buffercache_pages.o $(WIN32RES)
55

66
EXTENSION = pg_buffercache
7-
DATA = pg_buffercache--1.1.sql pg_buffercache--1.0--1.1.sql pg_buffercache--unpackaged--1.0.sql
7+
DATA = pg_buffercache--1.2.sql pg_buffercache--1.1--1.2.sql \
8+
pg_buffercache--1.0--1.1.sql pg_buffercache--unpackaged--1.0.sql
89
PGFILEDESC = "pg_buffercache - monitoring of shared buffer cache in real-time"
910

1011
ifdef USE_PGXS
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* contrib/pg_buffercache/pg_buffercache--1.1--1.2.sql */
2+
3+
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
4+
\echo Use "ALTER EXTENSION pg_buffercache UPDATE TO '1.2'" to load this file. \quit
5+
6+
ALTER FUNCTION pg_buffercache_pages() PARALLEL SAFE;

contrib/pg_buffercache/pg_buffercache--1.1.sql renamed to contrib/pg_buffercache/pg_buffercache--1.2.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* contrib/pg_buffercache/pg_buffercache--1.1.sql */
1+
/* contrib/pg_buffercache/pg_buffercache--1.2.sql */
22

33
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
44
\echo Use "CREATE EXTENSION pg_buffercache" to load this file. \quit
@@ -7,7 +7,7 @@
77
CREATE FUNCTION pg_buffercache_pages()
88
RETURNS SETOF RECORD
99
AS 'MODULE_PATHNAME', 'pg_buffercache_pages'
10-
LANGUAGE C;
10+
LANGUAGE C PARALLEL SAFE;
1111

1212
-- Create a view for convenient access.
1313
CREATE VIEW pg_buffercache AS
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pg_buffercache extension
22
comment = 'examine the shared buffer cache'
3-
default_version = '1.1'
3+
default_version = '1.2'
44
module_pathname = '$libdir/pg_buffercache'
55
relocatable = true

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy