Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit 3180073

Browse files
committed
Credits for original authors
1 parent c8a22bb commit 3180073

File tree

5 files changed

+100
-0
lines changed

5 files changed

+100
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ A human-readable report can be found at:
147147

148148
Open it with your favorite Markdown files viewer or just upload to a service such as gist.github.com.
149149

150+
## Credits
151+
152+
Some reports are based on or inspired by useful queries created and improved by
153+
various developers, including but not limited to:
154+
* Jehan-Guillaume (ioguix) de Rorthais https://github.com/ioguix/pgsql-bloat-estimation
155+
* Alexey Lesovsky, Alexey Ermakov, Maxim Boguk, Ilya Kosmodemiansky et al. from Data Egret (aka PostgreSQL-Consulting) https://github.com/dataegret/pg-utils
156+
* Josh Berkus, Quinn Weaver et al. from PostgreSQL Experts, Inc. https://github.com/pgexperts/pgx_scripts
150157

151158
# The Full List of Reports
152159

resources/checks/F004_heap_bloat.sh

+26
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,29 @@ select
147147
148148
)
149149
SQL
150+
151+
# This SQL is derived from https://github.com/ioguix/pgsql-bloat-estimation/blob/master/table/table_bloat.sql
152+
153+
#Copyright (c) 2015, Jehan-Guillaume (ioguix) de Rorthais
154+
#All rights reserved.
155+
#
156+
#Redistribution and use in source and binary forms, with or without
157+
#modification, are permitted provided that the following conditions are met:
158+
#
159+
#* Redistributions of source code must retain the above copyright notice, this
160+
# list of conditions and the following disclaimer.
161+
#
162+
#* Redistributions in binary form must reproduce the above copyright notice,
163+
# this list of conditions and the following disclaimer in the documentation
164+
# and/or other materials provided with the distribution.
165+
#
166+
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
167+
#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
168+
#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
169+
#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
170+
#FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
171+
#DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
172+
#SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
173+
#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
174+
#OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
175+
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

resources/checks/F005_index_bloat.sh

+25
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,28 @@ select
183183
)
184184
SQL
185185

186+
# An enhanced version of https://github.com/ioguix/pgsql-bloat-estimation/blob/master/btree/btree_bloat.sql
187+
188+
# Copyright (c) 2015, Jehan-Guillaume (ioguix) de Rorthais
189+
#All rights reserved.
190+
#
191+
#Redistribution and use in source and binary forms, with or without
192+
#modification, are permitted provided that the following conditions are met:
193+
#
194+
#* Redistributions of source code must retain the above copyright notice, this
195+
# list of conditions and the following disclaimer.
196+
#
197+
#* Redistributions in binary form must reproduce the above copyright notice,
198+
# this list of conditions and the following disclaimer in the documentation
199+
# and/or other materials provided with the distribution.
200+
#
201+
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
202+
#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
203+
#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
204+
#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
205+
#FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
206+
#DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
207+
#SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
208+
#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
209+
#OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
210+
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

resources/checks/H003_non_indexed_fks.sh

+31
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,34 @@ num_data as (
134134
)
135135
select json_object_agg(num_data.num, num_data) from num_data
136136
SQL
137+
138+
# Based on https://github.com/pgexperts/pgx_scripts/blob/master/indexes/fk_no_index.sql
139+
140+
#Copyright (c) 2014, PostgreSQL Experts, Inc.
141+
# and Additional Contributors (see README)
142+
#All rights reserved.
143+
#
144+
#Redistribution and use in source and binary forms, with or without
145+
#modification, are permitted provided that the following conditions are met:
146+
#
147+
#* Redistributions of source code must retain the above copyright notice, this
148+
# list of conditions and the following disclaimer.
149+
#
150+
#* Redistributions in binary form must reproduce the above copyright notice,
151+
# this list of conditions and the following disclaimer in the documentation
152+
# and/or other materials provided with the distribution.
153+
#
154+
#* Neither the name of pgx_scripts nor the names of its
155+
# contributors may be used to endorse or promote products derived from
156+
# this software without specific prior written permission.
157+
#
158+
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
159+
#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
160+
#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
161+
#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
162+
#FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
163+
#DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
164+
#SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
165+
#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
166+
#OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
167+
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

resources/checks/K000_query_analysis.sh

+11
Original file line numberDiff line numberDiff line change
@@ -407,3 +407,14 @@ done
407407
# print resulting JSON to stdout
408408
echo "${JSON}"
409409

410+
# Inspired by DataEgret's https://github.com/dataegret/pg-utils/blob/master/sql/global_reports/query_stat_total.sql
411+
412+
# Useful PostgreSQL utilities.
413+
#
414+
#Copyright (c) 2011-2014, PostgreSQL-Consulting.com
415+
#
416+
#Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
417+
#
418+
#IN NO EVENT SHALL POSTGRESQL-CONSULTING.COM BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF POSTGRESQL-CONSULTING.COM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
419+
#
420+
#POSTGRESQL-CONSULTING.COM SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND POSTGRESQL-CONSULTING.COM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

0 commit comments

Comments
 (0)