forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #678 from arenadata/6.26.2-sync
Sync 6.26.2 changes
- Loading branch information
Showing
117 changed files
with
5,112 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ConfigureNamesBool_gp | ||
ConfigureNamesInt_gp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ConfigureNamesBool_gp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
/pg_buffercache.sql | ||
# Generated subdirectories | ||
/log/ | ||
/results/ | ||
/tmp_check/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
CREATE EXTENSION pg_buffercache; | ||
select count(*) = (select setting::bigint | ||
from pg_settings | ||
where name = 'shared_buffers') | ||
from pg_buffercache; | ||
?column? | ||
---------- | ||
t | ||
(1 row) | ||
|
||
SELECT count(*) = (select setting::bigint | ||
from pg_settings | ||
where name = 'shared_buffers') * | ||
(select count(*) from gp_segment_configuration where role='p') | ||
as buffers | ||
FROM gp_buffercache; | ||
buffers | ||
--------- | ||
t | ||
(1 row) | ||
|
||
-- Check that the functions / views can't be accessed by default. | ||
CREATE ROLE buffercache_test; | ||
NOTICE: resource queue required -- using default resource queue "pg_default" | ||
SET ROLE buffercache_test; | ||
SELECT * FROM pg_buffercache; | ||
ERROR: permission denied for relation pg_buffercache | ||
SELECT * FROM pg_buffercache_pages() AS p (wrong int); | ||
ERROR: permission denied for function pg_buffercache_pages | ||
SELECT * FROM gp_buffercache; | ||
ERROR: permission denied for relation gp_buffercache | ||
RESET ROLE; | ||
DROP ROLE buffercache_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* contrib/pg_buffercache/pg_buffercache--1.0--1.1.sql */ | ||
|
||
-- complain if script is sourced in psql, rather than via ALTER EXTENSION | ||
\echo Use "ALTER EXTENSION pg_buffercache UPDATE TO '1.1'" to load this file. \quit | ||
|
||
-- Upgrade view to 1.1. format | ||
CREATE OR REPLACE VIEW pg_buffercache AS | ||
SELECT P.* FROM pg_buffercache_pages() AS P | ||
(bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid, | ||
relforknumber int2, relblocknumber int8, isdirty bool, usagecount int2, | ||
pinning_backends int4); | ||
|
||
CREATE VIEW gp_buffercache AS | ||
SELECT gp_execution_segment() AS gp_segment_id, * | ||
FROM gp_dist_random('pg_buffercache') | ||
UNION ALL | ||
SELECT -1 AS gp_segment_id, * | ||
FROM pg_buffercache | ||
ORDER BY 1,2; | ||
|
||
REVOKE ALL ON gp_buffercache FROM PUBLIC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# pg_buffercache extension | ||
comment = 'examine the shared buffer cache' | ||
default_version = '1.0' | ||
default_version = '1.1' | ||
module_pathname = '$libdir/pg_buffercache' | ||
relocatable = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CREATE EXTENSION pg_buffercache; | ||
|
||
select count(*) = (select setting::bigint | ||
from pg_settings | ||
where name = 'shared_buffers') | ||
from pg_buffercache; | ||
|
||
SELECT count(*) = (select setting::bigint | ||
from pg_settings | ||
where name = 'shared_buffers') * | ||
(select count(*) from gp_segment_configuration where role='p') | ||
as buffers | ||
FROM gp_buffercache; | ||
|
||
-- Check that the functions / views can't be accessed by default. | ||
CREATE ROLE buffercache_test; | ||
SET ROLE buffercache_test; | ||
SELECT * FROM pg_buffercache; | ||
SELECT * FROM pg_buffercache_pages() AS p (wrong int); | ||
SELECT * FROM gp_buffercache; | ||
RESET ROLE; | ||
DROP ROLE buffercache_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule source
updated
from cbbdde to 0e5576
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.