OSDN Git Service

pgdbmsstats/pg_dbms_stats.git
7 years agoUpdate copyright notice REL1_3_7
Kyotaro Horiguchi [Mon, 5 Sep 2016 07:31:00 +0000 (16:31 +0900)]
Update copyright notice

Update copyright notices in several files that have left unchaged so
far.

7 years agoSupport PostgreSQL9.6
Kyotaro Horiguchi [Tue, 30 Aug 2016 10:25:49 +0000 (19:25 +0900)]
Support PostgreSQL9.6

No functional change needed so this patch just adds subsidary files
and edit Makefile so as to build and make RPM packages for PG9.6.

Tomokuni Fujita

7 years agoAdd .gitignore entries for file generated by building RPM files
Kyotaro Horiguchi [Tue, 26 Apr 2016 08:16:52 +0000 (17:16 +0900)]
Add .gitignore entries for file generated by building RPM files

Some .tar.gz files and RPMS directory are generated by "make rpms" but
should be ignored by git. Added them to .gitignore.

7 years agoMerge pull request #36280 (fujii_masao/pg_dbms_stats/master into master).
Kyotaro HORIGUCHI [Tue, 26 Apr 2016 08:18:33 +0000 (17:18 +0900)]
Merge pull request #36280 (fujii_masao/pg_dbms_stats/master into master).

7 years agoAdd .gitignore entries for files generated by build and regression test.
MasaoFujii [Mon, 25 Apr 2016 05:19:47 +0000 (14:19 +0900)]
Add .gitignore entries for files generated by build and regression test.

8 years agoAdd stats-injection feature.
Kyotaro Horiguchi [Fri, 25 Mar 2016 06:44:20 +0000 (15:44 +0900)]
Add stats-injection feature.

pg_dbms_stats potentially have an ability to give arbitrary stats to
the planner but some stats items are of anyarray type so they were
impossible to be modified using SQL commands. This commit provides
some subsidiary functions that enable administrators to modify
anyarray stuffs in dbms_stats.column_stats_locked by arbitrary values.
(Only Japanese doc is provided so far)

8 years agoPrepare for release 1.3.7
Kyotaro Horiguchi [Fri, 25 Mar 2016 01:52:30 +0000 (10:52 +0900)]
Prepare for release 1.3.7

8 years agoSupport PostgreSQL 9.5.0.
Kyotaro Horiguchi [Thu, 14 Jan 2016 05:06:44 +0000 (14:06 +0900)]
Support PostgreSQL 9.5.0.

Added support for PostgreSQL 9.5.0.

8 years agoRefactor Makefile
Kyotaro Horiguchi [Thu, 14 Jan 2016 08:39:48 +0000 (17:39 +0900)]
Refactor Makefile

Simplified Makefile. Makefile gets too complex and ugly so refactored
it for readability. This change also allows to share some script among
multiple PG versions if possible.

8 years agoFollow the change of regression test framework.
Kyotaro Horiguchi [Tue, 18 Aug 2015 12:11:46 +0000 (21:11 +0900)]
Follow the change of regression test framework.

pg_regress no longer installs extra modules since 9.5. This commit
makes Makefile to give --extra-install flag to pg_regress only when
required.

8 years agoRemove misplaced space.
Kyotaro Horiguchi [Tue, 18 Aug 2015 12:05:58 +0000 (21:05 +0900)]
Remove misplaced space.

Removed a misplaced space placed after continuation backslash.

8 years agoRename a static function to avoid conflict.
Kyotaro Horiguchi [Tue, 18 Aug 2015 12:04:12 +0000 (21:04 +0900)]
Rename a static function to avoid conflict.

CopyArrayEls is a static function but also has a definition for
different function in core header. Rename it CopyAnyArrayEls so that
compler doesn't complain.

8 years agoCatch up the change of representation of view definition.
Kyotaro Horiguchi [Tue, 18 Aug 2015 11:50:03 +0000 (20:50 +0900)]
Catch up the change of representation of view definition.

Representation of view definition was changed at 9.3.5 by commit
164acbe33c0951221b1ae2e5285c793f404a75a1.

8 years agoStabilize regression test.
Kyotaro Horiguchi [Tue, 18 Aug 2015 11:48:49 +0000 (20:48 +0900)]
Stabilize regression test.

Sort results to avoid altering of tuples in regression test.

9 years agoSupport for 9.4 added officially. REL1_3_6
Kyotaro Horiguchi [Mon, 22 Dec 2014 03:33:22 +0000 (12:33 +0900)]
Support for 9.4 added officially.

Since PostgreSQL REL9_4_0 has been released, pg_dbms_stats became to
support 9.4. There's no functional change made and some fixes in the
steps to build RPM packages has been made.

9 years agoFix release date of 1.3.6 in SPEC files.
Kyotaro Horiguchi [Mon, 1 Dec 2014 03:47:30 +0000 (12:47 +0900)]
Fix release date of 1.3.6 in SPEC files.

9 years agoFixed regression tests to avoid test failure for 9.1.
Kyotaro Horiguchi [Mon, 1 Dec 2014 03:23:19 +0000 (12:23 +0900)]
Fixed regression tests to avoid test failure for 9.1.

A test item added in ut-common at 1.3.5 failed for 9.1 because the
error message differs from later versions. Moved it to
version-specific tests.

9 years agoFixed import function according to the current stats table
Kyotaro Horiguchi [Fri, 28 Nov 2014 08:17:49 +0000 (17:17 +0900)]
Fixed import function according to the current stats table
configuration.

The stats tables prefixed by underscore have been removed in the last
release, but import function did not follow that change. It results in
failure of import_xxx_stats() for dump files of any version including
itself.

9 years agoFix target version of 9.4 regtests, which was no harm.
Kyotaro Horiguchi [Mon, 1 Dec 2014 02:08:05 +0000 (11:08 +0900)]
Fix target version of 9.4 regtests, which was no harm.

9 years agoPrepare for 1.3.6
Kyotaro Horiguchi [Tue, 25 Nov 2014 08:23:19 +0000 (17:23 +0900)]
Prepare for 1.3.6

9 years agoChange release number of spec files to 2. REL1_3_5
Kyotaro Horiguchi [Mon, 17 Nov 2014 09:12:13 +0000 (18:12 +0900)]
Change release number of spec files to 2.

The previous release was based on the funcion-version of
HeapTupleGetDatum() so they cannot be loaded on the minor versions
earlier than 9.1.14, 9.2.9 and 9.3.5 with link failure of
HeapTupleHeaderGetDatum.

I confirmed that the commit(*1) does not affect pg_dbms_stats and
decided to build rpm releases on 9.1.13, 9.2.8 and 9.3.4 after this.

There has been one bug after 1.3.5 was released but it is a bug in
error message of rarely used SQL function so no increment of version
number.

*1: d3c9f9c5b57d2a8a7ab065a6b942703854ec5e97 for 9.1
    315442c01156d4f6c0f766ec51da090a613d03b8 for 9.2
    edde59db1339397ec389d45e4c0d0f86064dad1a for 9.3
    621a99a666ba1a27b852dc5ddc0e1b224c388f53 on master branch

9 years agoFix exception messages.
Kyotaro Horiguchi [Mon, 17 Nov 2014 09:03:30 +0000 (18:03 +0900)]
Fix exception messages.

Exception messages in definitions of dbms_stats.restore(bid, relname,
colname) were incorrect. This causes incomprehensive message like this,

ERROR:  too many parameters specified for RAISE

There's no harm other than the bogus message.

9 years agoEdit ChangeLogs. Fixed some misspellings.
Kyotaro Horiguchi [Thu, 13 Nov 2014 10:16:06 +0000 (19:16 +0900)]
Edit ChangeLogs. Fixed some misspellings.

9 years agoCorrect permission of dummy statistics tables.
Kyotaro Horiguchi [Wed, 12 Nov 2014 08:36:50 +0000 (17:36 +0900)]
Correct permission of dummy statistics tables.

On the current implement, when planner requested the statistics
for a column, pg_dbms_stats takes it from the dummy statistics
tables via views which gives stats only of columns that the
current user can SELECT.
Under that way of restriction, pg_dbms_stats cannot read the
dummy statistcs of objects invisible from the current user so
accessing such objects via views will done using system
statistics, even if their statistics are locked.
This commit makes the dummy stats tables visible only by the
owner, then makes pg_dbms_stats access the dummy statistics as
the owner. It also changes the visibility/usability of some other
objects such as dbms_stats schema, some functions as a result.

9 years agoFix and modify regression test.
Kyotaro Horiguchi [Thu, 13 Nov 2014 07:39:28 +0000 (16:39 +0900)]
Fix and modify regression test.

The delay of stats collector is expected up to 0.5s so 0.5s is not
enough for waiting.

9 years agoMake environment for 1.3.5
Kyotaro Horiguchi [Wed, 12 Nov 2014 07:51:32 +0000 (16:51 +0900)]
Make environment for 1.3.5

9 years agoUpdate RPM release number to 2. REL1_3_4
Kyotaro Horiguchi [Thu, 6 Nov 2014 07:54:53 +0000 (16:54 +0900)]
Update RPM release number to 2.

9 years agodefault_version of pg_dbms_stats.control is corrected.
Kyotaro Horiguchi [Thu, 6 Nov 2014 07:48:00 +0000 (16:48 +0900)]
default_version of pg_dbms_stats.control is corrected.

9 years agoVersion 1.3.4
Kyotaro Horiguchi [Tue, 16 Sep 2014 11:12:13 +0000 (20:12 +0900)]
Version 1.3.4

9 years agoFix a bug that faultily invalidates stored stats for inheritance parents.
Kyotaro Horiguchi [Tue, 16 Sep 2014 10:45:08 +0000 (19:45 +0900)]
Fix a bug that faultily invalidates stored stats for inheritance parents.

Internal on-memory cache mechanism wrongly handled stainherit
flag. This is resulted in a false response for inheritance parents,
which let the planner use the real statistic instead of the stored
one.

9 years agoEdit RPM spacfiles and ChangeLogs REL1_3_3
Kyotaro Horiguchi [Mon, 25 Aug 2014 08:20:28 +0000 (17:20 +0900)]
Edit RPM spacfiles and ChangeLogs

9 years agoFix a bug which potentially returns wrong statsitc tuple from internal
Kyotaro Horiguchi [Mon, 25 Aug 2014 06:27:19 +0000 (15:27 +0900)]
Fix a bug which potentially returns wrong statsitc tuple from internal
cache.

Altough Relation statistics cache has the key of relation id and it is
expected to hash and match it as oid, the cache control data was
created withOUT HASH_FUNCTION flag for hash_create(). This causes a
false match between oids having a intermediate 0x00 byte and identical
lower bytes (as for little endian). Returning the wrong statistics
cache can result in server crash, or at least getting unexpected
plans.

9 years agoRaise granularity of locks.
Kyotaro Horiguchi [Thu, 7 Aug 2014 12:41:50 +0000 (21:41 +0900)]
Raise granularity of locks.

Almost all sql functions of pg_dbms_stats takes "share update
exclusive" locks on internal tables before they does their work. As
the result, it serializes dbms_stats operations even if they're on
different tables. This commit replaces such giant locks with the more
narrowed locks so that operations on different tables basically can
run in parallel. As the exchange for the concurrency, multiple (first
time) statistics lock operations on the same table at the same time
may result in failure of either of them. But it does no matter under
usual usage.

9 years agoChange inappropreate variable name.
Kyotaro Horiguchi [Thu, 7 Aug 2014 10:43:13 +0000 (19:43 +0900)]
Change inappropreate variable name.

9 years agoCorrect wordings in comments.
Kyotaro Horiguchi [Thu, 7 Aug 2014 10:32:23 +0000 (19:32 +0900)]
Correct wordings in comments.

9 years agoRemove unnecessary 'OR REPLACE' from sql function definitions.
Kyotaro Horiguchi [Thu, 7 Aug 2014 10:22:40 +0000 (19:22 +0900)]
Remove unnecessary 'OR REPLACE' from sql function definitions.

9 years agoStablize regtest.
Kyotaro Horiguchi [Thu, 7 Aug 2014 07:53:31 +0000 (16:53 +0900)]
Stablize regtest.

Previous regression tests are unstable for repetitive execution.

These instability comes from mainly from unwanted auto vacuums and
locks unrelated to the test. So fix these factors of the instability
and tidied up the code.

9 years agoRewrite error messages. Fix some typos in comments.
Kyotaro Horiguchi [Thu, 7 Aug 2014 03:11:39 +0000 (12:11 +0900)]
Rewrite error messages. Fix some typos in comments.

9 years agoRearrange files for 1.3.3
Kyotaro Horiguchi [Thu, 7 Aug 2014 00:48:15 +0000 (09:48 +0900)]
Rearrange files for 1.3.3

9 years agoRearrange files REL1_3_2
Kyotaro Horiguchi [Fri, 6 Jun 2014 08:41:22 +0000 (17:41 +0900)]
Rearrange files

9 years agoAdd instruction for installcheck.
Kyotaro Horiguchi [Fri, 6 Jun 2014 07:50:41 +0000 (16:50 +0900)]
Add instruction for installcheck.

9 years agoAdd gtags files to .gitignore.
Kyotaro Horiguchi [Fri, 6 Jun 2014 07:49:03 +0000 (16:49 +0900)]
Add gtags files to .gitignore.

9 years agoAdd ChangeLog
Kyotaro Horiguchi [Fri, 6 Jun 2014 07:07:22 +0000 (16:07 +0900)]
Add ChangeLog

9 years agoRevise COPYRIGHT file in modification year.
Kyotaro Horiguchi [Fri, 6 Jun 2014 06:57:15 +0000 (15:57 +0900)]
Revise COPYRIGHT file in modification year.

9 years agoStabilize regtests aganst testing environment.
Kyotaro Horiguchi [Mon, 9 Jun 2014 06:12:53 +0000 (15:12 +0900)]
Stabilize regtests aganst testing environment.

9 years agoAdd USE_PGXS autoconfig
Kyotaro Horiguchi [Mon, 9 Jun 2014 06:11:44 +0000 (15:11 +0900)]
Add USE_PGXS autoconfig

9 years agoChange configuration for source tarballs and RPMs
Kyotaro Horiguchi [Mon, 9 Jun 2014 06:10:24 +0000 (15:10 +0900)]
Change configuration for source tarballs and RPMs

9 years agoChange the name of export script samples
Kyotaro Horiguchi [Mon, 9 Jun 2014 05:51:06 +0000 (14:51 +0900)]
Change the name of export script samples

9 years agoEnable make check. Fix some compiler warnings. Temporarily add 9.4 support.
Kyotaro Horiguchi [Thu, 5 Jun 2014 08:05:07 +0000 (17:05 +0900)]
Enable make check. Fix some compiler warnings. Temporarily add 9.4 support.

9 years agoChange assertion according to change of behavior of the function
Kyotaro Horiguchi [Wed, 4 Jun 2014 04:03:03 +0000 (13:03 +0900)]
Change assertion according to change of behavior of the function

9 years agoFix wrong error message
Kyotaro Horiguchi [Wed, 4 Jun 2014 03:44:52 +0000 (12:44 +0900)]
Fix wrong error message

9 years agoBug fix. vardata->statsTuple should be overwritten even if the result is NULL.
Kyotaro Horiguchi [Wed, 4 Jun 2014 03:43:36 +0000 (12:43 +0900)]
Bug fix. vardata->statsTuple should be overwritten even if the result is NULL.

9 years agoAdd negative cache.
Kyotaro Horiguchi [Wed, 4 Jun 2014 03:42:07 +0000 (12:42 +0900)]
Add negative cache.

9 years agoPrepare for 1.3.2. Fixing for ALTER EXTENSION
Kyotaro Horiguchi [Wed, 4 Jun 2014 03:37:44 +0000 (12:37 +0900)]
Prepare for 1.3.2. Fixing for ALTER EXTENSION

9 years agoMakefile cleans up files generated during make
Kyotaro Horiguchi [Wed, 4 Jun 2014 03:41:44 +0000 (12:41 +0900)]
Makefile cleans up files generated during make

9 years agoFix regtests
Kyotaro Horiguchi [Tue, 3 Jun 2014 01:16:28 +0000 (10:16 +0900)]
Fix regtests

9 years agoAdd COPYRIGHT file
Kyotaro Horiguchi [Tue, 3 Jun 2014 00:41:34 +0000 (09:41 +0900)]
Add COPYRIGHT file

9 years ago1.3.1 REL1_3_1
Kyotaro Horiguchi [Tue, 3 Jun 2014 00:37:53 +0000 (09:37 +0900)]
1.3.1

11 years ago1.3.0 REL1_3_0
naoki_kishi_b1 [Thu, 14 Feb 2013 04:21:19 +0000 (13:21 +0900)]
1.3.0