]> granicus.if.org Git - postgresql/log
postgresql
9 years agoFix yet another bug in ON CONFLICT rule deparsing.
Andres Freund [Sat, 23 May 2015 00:16:24 +0000 (02:16 +0200)]
Fix yet another bug in ON CONFLICT rule deparsing.

Expand testing of rule deparsing a good bit, it's evidently needed.

Author: Peter Geoghegan, Andres Freund
Discussion: CAM3SWZQmXxZhQC32QVEOTYfNXJBJ_Q2SDENL7BV14Cq-zL0FLg@mail.gmail.com

9 years agoRemove the new UPSERT command tag and use INSERT instead.
Andres Freund [Fri, 22 May 2015 22:49:27 +0000 (00:49 +0200)]
Remove the new UPSERT command tag and use INSERT instead.

Previously, INSERT with ON CONFLICT DO UPDATE specified used a new
command tag -- UPSERT.  It was introduced out of concern that INSERT as
a command tag would be a misrepresentation for ON CONFLICT DO UPDATE, as
some affected rows may actually have been updated.

Alvaro Herrera noticed that the implementation of that new command tag
was incomplete; in subsequent discussion we concluded that having it
doesn't provide benefits that are in line with the compatibility breaks
it requires.

Catversion bump due to the removal of PlannedStmt->isUpsert.

Author: Peter Geoghegan
Discussion: 20150520215816.GI5885@postgresql.org

9 years agoFix recently-introduced crash in array_contain_compare().
Tom Lane [Fri, 22 May 2015 22:36:48 +0000 (18:36 -0400)]
Fix recently-introduced crash in array_contain_compare().

Silly oversight in commit 1dc5ebc9077ab742079ce5dac9a6664248d42916:
when array2 is an expanded array, it might have array2->xpn.dnulls equal
to NULL, indicating the array is known null-free.  The code wasn't
expecting that, because it formerly always used deconstruct_array() which
always delivers a nulls array.

Per bug #13334 from Regina Obe.

9 years agoUnpack jbvBinary objects passed to pushJsonbValue
Andrew Dunstan [Fri, 22 May 2015 14:21:41 +0000 (10:21 -0400)]
Unpack jbvBinary objects passed to pushJsonbValue

pushJsonbValue was accepting jbvBinary objects passed as WJB_ELEM or
WJB_VALUE data. While this succeeded, when those objects were later
encountered in attempting to convert the result to Jsonb, errors
occurred. With this change we ghuarantee that a JSonbValue constructed
from calls to pushJsonbValue does not contain any jbvBinary objects.
This cures a problem observed with jsonb_delete.

This means callers of pushJsonbValue no longer need to perform this
unpacking themselves. A subsequent patch will perform some cleanup in
that area.

The error was not triggered by any 9.4 code, but this is a publicly
visible routine, and so the error could be exercised by third party
code, therefore backpatch to 9.4.

Bug report from Peter Geoghegan, fix by me.

9 years agoMinor enhancement of readability of ALTER TABLE syntax in the doc.
Fujii Masao [Fri, 22 May 2015 12:42:15 +0000 (21:42 +0900)]
Minor enhancement of readability of ALTER TABLE syntax in the doc.

Fabrízio Mello

9 years agoAt promotion, don't leave behind a partial segment on the old timeline.
Heikki Linnakangas [Thu, 21 May 2015 12:28:22 +0000 (15:28 +0300)]
At promotion, don't leave behind a partial segment on the old timeline.

With commit de768844, a copy of the partial segment was archived with the
.partial suffix, but the original file was still left in pg_xlog, so it
didn't actually solve the problems with archiving the partial segment that
it was supposed to solve. With this patch, the partial segment is renamed
rather than copied, so we only archive it with the .partial suffix.

Also be more robust in detecting if the last segment is already being
archived. Previously I used XLogArchiveIsBusy() for that, but that's not
quite right. With archive_mode='always', there might be a .ready file for
it, and we don't want to rename it to .partial in that case.

The old segment is needed until we're fully committed to the new timeline,
i.e. until we've written the end-of-recovery WAL record and updated the
min recovery point and timeline in the control file. So move the renaming
later in the startup sequence, after all that's been done.

9 years agoMore fixes for lossy-GiST-distance-functions patch.
Tom Lane [Thu, 21 May 2015 23:47:48 +0000 (19:47 -0400)]
More fixes for lossy-GiST-distance-functions patch.

Paul Ramsey reported that commit 35fcb1b3d038a501f3f4c87c05630095abaaadab
induced a core dump on commuted ORDER BY expressions, because it was
assuming that the indexorderby expression could be found verbatim in the
relevant equivalence class, but it wasn't there.  We really don't need
anything that complicated anyway; for the data types likely to be used for
index ORDER BY operators in the foreseeable future, the exprType() of the
ORDER BY expression will serve fine.  (The case where we'd have to work
harder is where the ORDER BY expression's result is only binary-compatible
with the declared input type of the ordering operator; long before worrying
about that, one would need to get rid of GiST's hard-wired assumption that
said datatype is float8.)

Aside from fixing that crash and adding a regression test for the case,
I did some desultory code review:

nodeIndexscan.c was likewise overthinking how hard it ought to work to
identify the datatype of the ORDER BY expressions.

Add comments explaining how come nodeIndexscan.c can get away with
simplifying assumptions about NULLS LAST ordering and no backward scan.

Revert no-longer-needed changes of find_ec_member_for_tle(); while the
new definition was no worse than the old, it wasn't better either, and
it might cause back-patching pain.

Revert entirely bogus additions to genam.h.

9 years agoImprove packing/alignment annotation for ItemPointerData.
Tom Lane [Thu, 21 May 2015 21:21:46 +0000 (17:21 -0400)]
Improve packing/alignment annotation for ItemPointerData.

We want this struct to be exactly a series of 3 int16 words, no more
and no less.  Historically, at least, some ARM compilers preferred to
pad it to 8 bytes unless coerced.  Our old way of doing that was just
to use __attribute__((packed)), but as pointed out by Piotr Stefaniak,
that does too much: it also licenses the compiler to give the struct
only byte-alignment.  We don't want that because it adds access overhead,
possibly quite significant overhead.  According to the GCC manual, what
we want requires also specifying __attribute__((align(2))).  It's not
entirely clear if all the relevant compilers accept this pragma as well,
but we can hope the buildfarm will tell us if not.  We can also add a
static assertion that should fire if the compiler padded the struct.

Since the combination of these pragmas should define exactly what we
want on any compiler that accepts them, let's try using them wherever
we think they exist, not only for __arm__.  (This is likely to expose
that the conditional definitions in c.h are inadequate, but finding
that out would be a good thing.)

The immediate motivation for this is that the current definition of
ExecRowMark allows its curCtid field to be misaligned.  It is not clear
whether there are any other uses of ItemPointerData with a similar hazard.
We could change the definition of ExecRowMark if this doesn't work, but
it would be far better to have a future-proof fix.

Piotr Stefaniak, some further hacking by me

9 years agoCorrect two mistakes in the ALTER FOREIGN TABLE reference page.
Robert Haas [Thu, 21 May 2015 15:16:33 +0000 (11:16 -0400)]
Correct two mistakes in the ALTER FOREIGN TABLE reference page.

Etsuro Fujita

9 years agoCorrect the names of pgstattuple_approx output columns in the doc.
Fujii Masao [Thu, 21 May 2015 11:51:52 +0000 (20:51 +0900)]
Correct the names of pgstattuple_approx output columns in the doc.

9 years agoMake recovery_target_action = pause work.
Fujii Masao [Thu, 21 May 2015 04:56:17 +0000 (13:56 +0900)]
Make recovery_target_action = pause work.

Previously even if recovery_target_action was set to pause and
the recovery target was reached, the recovery could never be paused.
Because the setting of pause was *always* overridden with that of
shutdown unexpectedly. This override is valid and intentional
if hot_standby is not enabled because there is no way to resume
the paused recovery in this case and the setting of pause is
completely useless. But not if hot_standby is enabled.

This patch changes the code so that the setting of pause is overridden
with that of shutdown only when hot_standby is not enabled.

Bug reported by Andres Freund

9 years agoAnother typo fix.
Tom Lane [Wed, 20 May 2015 18:50:22 +0000 (14:50 -0400)]
Another typo fix.

In the spirit of the season.

9 years agoFix more typos in comments.
Heikki Linnakangas [Wed, 20 May 2015 16:44:46 +0000 (19:44 +0300)]
Fix more typos in comments.

Patch by CharSyam, plus a few more I spotted with grep.

9 years agoCollection of typo fixes.
Heikki Linnakangas [Wed, 20 May 2015 13:18:11 +0000 (16:18 +0300)]
Collection of typo fixes.

Use "a" and "an" correctly, mostly in comments. Two error messages were
also fixed (they were just elogs, so no translation work required). Two
function comments in pg_proc.h were also fixed. Etsuro Fujita reported one
of these, but I found a lot more with grep.

Also fix a few other typos spotted while grepping for the a/an typos.
For example, "consists out of ..." -> "consists of ...". Plus a "though"/
"through" mixup reported by Euler Taveira.

Many of these typos were in old code, which would be nice to backpatch to
make future backpatching easier. But much of the code was new, and I didn't
feel like crafting separate patches for each branch. So no backpatching.

9 years agoFix spelling in comment
Simon Riggs [Tue, 19 May 2015 22:37:46 +0000 (18:37 -0400)]
Fix spelling in comment

9 years agoLast-minute updates for release notes.
Tom Lane [Tue, 19 May 2015 22:33:58 +0000 (18:33 -0400)]
Last-minute updates for release notes.

Revise description of CVE-2015-3166, in line with scaled-back patch.
Change release date.

Security: CVE-2015-3166

9 years agoRevert error-throwing wrappers for the printf family of functions.
Tom Lane [Tue, 19 May 2015 22:14:52 +0000 (18:14 -0400)]
Revert error-throwing wrappers for the printf family of functions.

This reverts commit 16304a013432931e61e623c8d85e9fe24709d9ba, except
for its changes in src/port/snprintf.c; as well as commit
cac18a76bb6b08f1ecc2a85e46c9d2ab82dd9d23 which is no longer needed.

Fujii Masao reported that the previous commit caused failures in psql on
OS X, since if one exits the pager program early while viewing a query
result, psql sees an EPIPE error from fprintf --- and the wrapper function
thought that was reason to panic.  (It's a bit surprising that the same
does not happen on Linux.)  Further discussion among the security list
concluded that the risk of other such failures was far too great, and
that the one-size-fits-all approach to error handling embodied in the
previous patch is unlikely to be workable.

This leaves us again exposed to the possibility of the type of failure
envisioned in CVE-2015-3166.  However, that failure mode is strictly
hypothetical at this point: there is no concrete reason to believe that
an attacker could trigger information disclosure through the supposed
mechanism.  In the first place, the attack surface is fairly limited,
since so much of what the backend does with format strings goes through
stringinfo.c or psprintf(), and those already had adequate defenses.
In the second place, even granting that an unprivileged attacker could
control the occurrence of ENOMEM with some precision, it's a stretch to
believe that he could induce it just where the target buffer contains some
valuable information.  So we concluded that the risk of non-hypothetical
problems induced by the patch greatly outweighs the security risks.
We will therefore revert, and instead undertake closer analysis to
identify specific calls that may need hardening, rather than attempt a
universal solution.

We have kept the portion of the previous patch that improved snprintf.c's
handling of errors when it calls the platform's sprintf().  That seems to
be an unalloyed improvement.

Security: CVE-2015-3166

9 years agoVarious fixes around ON CONFLICT for rule deparsing.
Andres Freund [Tue, 19 May 2015 19:07:28 +0000 (21:07 +0200)]
Various fixes around ON CONFLICT for rule deparsing.

Neither the deparsing of the new alias for INSERT's target table, nor of
the inference clause was supported. Also fixup a typo in an error
message.

Add regression tests to test those code paths.

Author: Peter Geoghegan

9 years agoRefactor ON CONFLICT index inference parse tree representation.
Andres Freund [Tue, 19 May 2015 19:17:52 +0000 (21:17 +0200)]
Refactor ON CONFLICT index inference parse tree representation.

Defer lookup of opfamily and input type of a of a user specified opclass
until the optimizer selects among available unique indexes; and store
the opclass in the parse analyzed tree instead.  The primary reason for
doing this is that for rule deparsing it's easier to use the opclass
than the previous representation.

While at it also rename a variable in the inference code to better fit
it's purpose.

This is separate from the actual fixes for deparsing to make review
easier.

9 years agoFix off-by-one error in Assertion.
Heikki Linnakangas [Tue, 19 May 2015 16:21:46 +0000 (19:21 +0300)]
Fix off-by-one error in Assertion.

The point of the assertion is to ensure that the arrays allocated in stack
are large enough, but the check was one item short.

This won't matter in practice because MaxIndexTuplesPerPage is an
overestimate, so you can't have that many items on a page in reality.
But let's be tidy.

Spotted by Anastasia Lubennikova. Backpatch to all supported versions, like
the patch that added the assertion.

9 years agoAvoid collation dependence in indexes of system catalogs.
Tom Lane [Tue, 19 May 2015 15:47:42 +0000 (11:47 -0400)]
Avoid collation dependence in indexes of system catalogs.

No index in template0 should have collation-dependent ordering, especially
not indexes on shared catalogs.  For most textual columns we avoid this
issue by using type "name" (which sorts per strcmp()).  However there are a
few indexed columns that we'd prefer to use "text" for, and for that, the
default opclass text_ops is unsafe.  Fortunately, text_pattern_ops is safe
(it sorts per memcmp()), and it has no real functional disadvantage for our
purposes.  So change the indexes on pg_seclabel.provider and
pg_shseclabel.provider to use text_pattern_ops.

In passing, also mark pg_replication_origin.roname as using
text_pattern_ops --- for some reason it was labeled varchar_pattern_ops
which is just wrong, even though it accidentally worked.

Add regression test queries to catch future errors of these kinds.

We still can't do anything about the misdeclared pg_seclabel and
pg_shseclabel indexes in back branches :-(

9 years agoRevert "Change pg_seclabel.provider and pg_shseclabel.provider to type "name"."
Tom Lane [Tue, 19 May 2015 14:40:04 +0000 (10:40 -0400)]
Revert "Change pg_seclabel.provider and pg_shseclabel.provider to type "name"."

This reverts commit b82a7be603f1811a0a707b53c62de6d5d9431740.  There
is a better (less invasive) way to fix it, which I will commit next.

9 years agoMessage string improvements
Peter Eisentraut [Tue, 19 May 2015 03:01:48 +0000 (23:01 -0400)]
Message string improvements

9 years agoFix parse tree of DROP TRANSFORM and COMMENT ON TRANSFORM
Peter Eisentraut [Tue, 19 May 2015 02:55:14 +0000 (22:55 -0400)]
Fix parse tree of DROP TRANSFORM and COMMENT ON TRANSFORM

The plain C string language name needs to be wrapped in makeString() so
that the parse tree is copyable.  This is detectable by
-DCOPY_PARSE_PLAN_TREES.  Add a test case for the COMMENT case.

Also make the quoting in the error messages more consistent.

discovered by Tom Lane

9 years agoChange pg_seclabel.provider and pg_shseclabel.provider to type "name".
Tom Lane [Tue, 19 May 2015 00:07:44 +0000 (20:07 -0400)]
Change pg_seclabel.provider and pg_shseclabel.provider to type "name".

These were "text", but that's a bad idea because it has collation-dependent
ordering.  No index in template0 should have collation-dependent ordering,
especially not indexes on shared catalogs.  There was general agreement
that provider names don't need to be longer than other identifiers, so we
can fix this at a small waste of table space by changing from text to name.

There's no way to fix the problem in the back branches, but we can hope
that security labels don't yet have widespread-enough usage to make it
urgent to fix.

There needs to be a regression sanity test to prevent us from making this
same mistake again; but before putting that in, we'll need to get rid of
similar brain fade in the recently-added pg_replication_origin catalog.

Note: for lack of a suitable testing environment, I've not really exercised
this change.  I trust the buildfarm will show up any mistakes.

9 years agoAttach ON CONFLICT SET ... WHERE to the correct planstate.
Andres Freund [Mon, 18 May 2015 23:55:10 +0000 (01:55 +0200)]
Attach ON CONFLICT SET ... WHERE to the correct planstate.

The previous coding was a leftover from attempting to hang all the on
conflict logic onto modify table's child nodes. It appears to not have
actually caused problems except for explain.

Add test exercising the broken and some other code paths.

Author: Peter Geoghegan and Andres Freund

9 years agoPut back a backwards-compatible version of sampling support functions.
Tom Lane [Mon, 18 May 2015 22:34:37 +0000 (18:34 -0400)]
Put back a backwards-compatible version of sampling support functions.

Commit 83e176ec18d2a91dbea1d0d1bd94c38dc47cd77c removed the longstanding
support functions for block sampling without any consideration of the
impact this would have on third-party FDWs.  The new API is not notably
more functional for FDWs than the old, so forcing them to change doesn't
seem like a good thing.  We can provide the old API as a wrapper (more
or less) around the new one for a minimal amount of extra code.

9 years agoRecognize "REGRESS_OPTS += ..." syntax in MSVC build scripts.
Tom Lane [Mon, 18 May 2015 17:40:06 +0000 (13:40 -0400)]
Recognize "REGRESS_OPTS += ..." syntax in MSVC build scripts.

Necessitated by commit b14cf229f4bd7238be2e31d873dc5dd241d3871e.
Per buildfarm.

9 years agoFix error message in pre_sync_fname.
Robert Haas [Mon, 18 May 2015 16:53:09 +0000 (12:53 -0400)]
Fix error message in pre_sync_fname.

The old one didn't include %m anywhere, and required extra
translation.

Report by Peter Eisentraut. Fix by me. Review by Tom Lane.

9 years agoLast-minute updates for release notes.
Tom Lane [Mon, 18 May 2015 16:09:02 +0000 (12:09 -0400)]
Last-minute updates for release notes.

Add entries for security issues.

Security: CVE-2015-3165 through CVE-2015-3167

9 years agopgcrypto: Report errant decryption as "Wrong key or corrupt data".
Noah Misch [Mon, 18 May 2015 14:02:31 +0000 (10:02 -0400)]
pgcrypto: Report errant decryption as "Wrong key or corrupt data".

This has been the predominant outcome.  When the output of decrypting
with a wrong key coincidentally resembled an OpenPGP packet header,
pgcrypto could instead report "Corrupt data", "Not text data" or
"Unsupported compression algorithm".  The distinct "Corrupt data"
message added no value.  The latter two error messages misled when the
decrypted payload also exhibited fundamental integrity problems.  Worse,
error message variance in other systems has enabled cryptologic attacks;
see RFC 4880 section "14. Security Considerations".  Whether these
pgcrypto behaviors are likewise exploitable is unknown.

In passing, document that pgcrypto does not resist side-channel attacks.
Back-patch to 9.0 (all supported versions).

Security: CVE-2015-3167

9 years agoCheck return values of sensitive system library calls.
Noah Misch [Mon, 18 May 2015 14:02:31 +0000 (10:02 -0400)]
Check return values of sensitive system library calls.

PostgreSQL already checked the vast majority of these, missing this
handful that nearly cannot fail.  If putenv() failed with ENOMEM in
pg_GSS_recvauth(), authentication would proceed with the wrong keytab
file.  If strftime() returned zero in cache_locale_time(), using the
unspecified buffer contents could lead to information exposure or a
crash.  Back-patch to 9.0 (all supported versions).

Other unchecked calls to these functions, especially those in frontend
code, pose negligible security concern.  This patch does not address
them.  Nonetheless, it is always better to check return values whose
specification provides for indicating an error.

In passing, fix an off-by-one error in strftime_win32()'s invocation of
WideCharToMultiByte().  Upon retrieving a value of exactly MAX_L10N_DATA
bytes, strftime_win32() would overrun the caller's buffer by one byte.
MAX_L10N_DATA is chosen to exceed the length of every possible value, so
the vulnerable scenario probably does not arise.

Security: CVE-2015-3166

9 years agoAdd error-throwing wrappers for the printf family of functions.
Noah Misch [Mon, 18 May 2015 14:02:31 +0000 (10:02 -0400)]
Add error-throwing wrappers for the printf family of functions.

All known standard library implementations of these functions can fail
with ENOMEM.  A caller neglecting to check for failure would experience
missing output, information exposure, or a crash.  Check return values
within wrappers and code, currently just snprintf.c, that bypasses the
wrappers.  The wrappers do not return after an error, so their callers
need not check.  Back-patch to 9.0 (all supported versions).

Popular free software standard library implementations do take pains to
bypass malloc() in simple cases, but they risk ENOMEM for floating point
numbers, positional arguments, large field widths, and large precisions.
No specification demands such caution, so this commit regards every call
to a printf family function as a potential threat.

Injecting the wrappers implicitly is a compromise between patch scope
and design goals.  I would prefer to edit each call site to name a
wrapper explicitly.  libpq and the ECPG libraries would, ideally, convey
errors to the caller rather than abort().  All that would be painfully
invasive for a back-patched security fix, hence this compromise.

Security: CVE-2015-3166

9 years agoPermit use of vsprintf() in PostgreSQL code.
Noah Misch [Mon, 18 May 2015 14:02:31 +0000 (10:02 -0400)]
Permit use of vsprintf() in PostgreSQL code.

The next commit needs it.  Back-patch to 9.0 (all supported versions).

9 years agoPrevent a double free by not reentering be_tls_close().
Noah Misch [Mon, 18 May 2015 14:02:31 +0000 (10:02 -0400)]
Prevent a double free by not reentering be_tls_close().

Reentering this function with the right timing caused a double free,
typically crashing the backend.  By synchronizing a disconnection with
the authentication timeout, an unauthenticated attacker could achieve
this somewhat consistently.  Call be_tls_close() solely from within
proc_exit_prepare().  Back-patch to 9.0 (all supported versions).

Benkocs Norbert Attila

Security: CVE-2015-3165

9 years agoFix typo in comment.
Heikki Linnakangas [Mon, 18 May 2015 07:38:52 +0000 (10:38 +0300)]
Fix typo in comment.

Jim Nasby

9 years agoPut back stats-collector restarting code, removed accidentally.
Heikki Linnakangas [Mon, 18 May 2015 07:18:46 +0000 (10:18 +0300)]
Put back stats-collector restarting code, removed accidentally.

Removed that code snippet accidentally in the archive_mode='always' patch.

Also, use varname-tags for archive_command in the docs.

Fujii Masao

9 years agoDon't classify REINDEX command as DDL in the pg_audit doc.
Fujii Masao [Mon, 18 May 2015 05:55:07 +0000 (14:55 +0900)]
Don't classify REINDEX command as DDL in the pg_audit doc.

The commit a936743 changed the class of REINDEX but forgot to update the doc.

9 years agoAdd new files to nls.mk
Peter Eisentraut [Mon, 18 May 2015 02:55:17 +0000 (22:55 -0400)]
Add new files to nls.mk

9 years agoFix failure to copy IndexScan.indexorderbyops in copyfuncs.c.
Tom Lane [Mon, 18 May 2015 01:22:12 +0000 (21:22 -0400)]
Fix failure to copy IndexScan.indexorderbyops in copyfuncs.c.

This oversight results in a crash at executor startup if the plan has
been copied.  outfuncs.c was missed as well.

While we could probably have taught both those files to cope with the
originally chosen representation of an Oid array, it would have been
painful, not least because there'd be no easy way to verify the array
length.  An Oid List is far easier to work with.  And AFAICS, there is
no particular notational benefit to using an array rather than a list
in the existing parts of the patch either.  So just change it to a list.

Error in commit 35fcb1b3d038a501f3f4c87c05630095abaaadab, which is new,
so no need for back-patch.

9 years agoUse += not = to set makefile variables after including base makefiles.
Tom Lane [Mon, 18 May 2015 00:04:42 +0000 (20:04 -0400)]
Use += not = to set makefile variables after including base makefiles.

The previous coding in hstore_plpython and ltree_plpython wiped out any
values set by the base makefiles.  This at least had the effect of running
the tests in "regression" not "contrib_regression" as expected.  These
being pretty new modules, there might be other bad effects we'd not
noticed yet.

9 years agoRelease notes for 9.4.2, 9.3.7, 9.2.11, 9.1.16, 9.0.20.
Tom Lane [Sun, 17 May 2015 19:54:20 +0000 (15:54 -0400)]
Release notes for 9.4.2, 9.3.7, 9.2.11, 9.1.16, 9.0.20.

9 years agoFix wording error caused by recent typo fixes
Magnus Hagander [Sun, 17 May 2015 17:06:08 +0000 (19:06 +0200)]
Fix wording error caused by recent typo fixes

It wasn't just a typo, but bad wording. This should make it
more clear. Pointed out by Tom Lane.

9 years agopg_audit Makefile, REINDEX changes
Stephen Frost [Sun, 17 May 2015 13:56:57 +0000 (09:56 -0400)]
pg_audit Makefile, REINDEX changes

Clean up the Makefile, per Michael Paquier.

Classify REINDEX as we do in core, use '1.0' for the version, per Fujii.

9 years agoFix typos in comments
Magnus Hagander [Sun, 17 May 2015 12:57:30 +0000 (14:57 +0200)]
Fix typos in comments

Dmitriy Olshevskiy

9 years agoMinor docs fixes for pg_audit
Magnus Hagander [Sun, 17 May 2015 09:07:19 +0000 (11:07 +0200)]
Minor docs fixes for pg_audit

Peter Geoghegan

9 years agohstore_plpython: Fix regression tests under Python 3
Peter Eisentraut [Sun, 17 May 2015 03:35:29 +0000 (23:35 -0400)]
hstore_plpython: Fix regression tests under Python 3

9 years agoFix whitespace
Peter Eisentraut [Sun, 17 May 2015 00:43:32 +0000 (20:43 -0400)]
Fix whitespace

9 years agoFirst-draft release notes for 9.4.2 et al.
Tom Lane [Sat, 16 May 2015 22:09:39 +0000 (18:09 -0400)]
First-draft release notes for 9.4.2 et al.

As usual, the release notes for older branches will be made by cutting
these down, but put them up for community review first.

9 years agopg_upgrade: no need to check for matching float8_pass_by_value
Bruce Momjian [Sat, 16 May 2015 19:27:14 +0000 (15:27 -0400)]
pg_upgrade:  no need to check for matching float8_pass_by_value

Report by Noah Misch

9 years agoFix docs typo
Tom Lane [Sat, 16 May 2015 17:28:26 +0000 (13:28 -0400)]
Fix docs typo

I don't think "respectfully" is what was meant here ...

9 years agoMore portability fixing for bipartite_match.c.
Tom Lane [Sat, 16 May 2015 15:35:42 +0000 (11:35 -0400)]
More portability fixing for bipartite_match.c.

<float.h> is required for isinf() on some platforms.  Per buildfarm.

9 years agopg_upgrade: force timeline 1 in the new cluster
Bruce Momjian [Sat, 16 May 2015 04:40:18 +0000 (00:40 -0400)]
pg_upgrade:  force timeline 1 in the new cluster

Previously, this prevented promoted standby servers from being upgraded
because of a missing WAL history file.  (Timeline 1 doesn't need a
history file, and we don't copy WAL files anyway.)

Report by Christian Echerer(?), Alexey Klyukin

Backpatch through 9.0

9 years agopg_upgrade: only allow template0 to be non-connectable
Bruce Momjian [Sat, 16 May 2015 04:10:03 +0000 (00:10 -0400)]
pg_upgrade:  only allow template0 to be non-connectable

This patch causes pg_upgrade to error out during its check phase if:

(1) template0 is marked connectable
or
(2) any other database is marked non-connectable

This is done because, in the first case, pg_upgrade would fail because
the pg_dumpall --globals restore would fail, and in the second case, the
database would not be restored, leading to data loss.

Report by Matt Landry (1), Stephen Frost (2)

Backpatch through 9.0

9 years agoAvoid direct use of INFINITY.
Tom Lane [Sat, 16 May 2015 02:15:01 +0000 (22:15 -0400)]
Avoid direct use of INFINITY.

It's not very portable.  Per buildfarm.

9 years agoAdd docs for tablesample system_time()
Simon Riggs [Sat, 16 May 2015 01:54:18 +0000 (21:54 -0400)]
Add docs for tablesample system_time()

9 years agoSupport GROUPING SETS, CUBE and ROLLUP.
Andres Freund [Sat, 16 May 2015 01:40:59 +0000 (03:40 +0200)]
Support GROUPING SETS, CUBE and ROLLUP.

This SQL standard functionality allows to aggregate data by different
GROUP BY clauses at once. Each grouping set returns rows with columns
grouped by in other sets set to NULL.

This could previously be achieved by doing each grouping as a separate
query, conjoined by UNION ALLs. Besides being considerably more concise,
grouping sets will in many cases be faster, requiring only one scan over
the underlying data.

The current implementation of grouping sets only supports using sorting
for input. Individual sets that share a sort order are computed in one
pass. If there are sets that don't share a sort order, additional sort &
aggregation steps are performed. These additional passes are sourced by
the previous sort step; thus avoiding repeated scans of the source data.

The code is structured in a way that adding support for purely using
hash aggregation or a mix of hashing and sorting is possible. Sorting
was chosen to be supported first, as it is the most generic method of
implementation.

Instead of, as in an earlier versions of the patch, representing the
chain of sort and aggregation steps as full blown planner and executor
nodes, all but the first sort are performed inside the aggregation node
itself. This avoids the need to do some unusual gymnastics to handle
having to return aggregated and non-aggregated tuples from underlying
nodes, as well as having to shut down underlying nodes early to limit
memory usage.  The optimizer still builds Sort/Agg node to describe each
phase, but they're not part of the plan tree, but instead additional
data for the aggregation node. They're a convenient and preexisting way
to describe aggregation and sorting.  The first (and possibly only) sort
step is still performed as a separate execution step. That retains
similarity with existing group by plans, makes rescans fairly simple,
avoids very deep plans (leading to slow explains) and easily allows to
avoid the sorting step if the underlying data is sorted by other means.

A somewhat ugly side of this patch is having to deal with a grammar
ambiguity between the new CUBE keyword and the cube extension/functions
named cube (and rollup). To avoid breaking existing deployments of the
cube extension it has not been renamed, neither has cube been made a
reserved keyword. Instead precedence hacking is used to make GROUP BY
cube(..) refer to the CUBE grouping sets feature, and not the function
cube(). To actually group by a function cube(), unlikely as that might
be, the function name has to be quoted.

Needs a catversion bump because stored rules may change.

Author: Andrew Gierth and Atri Sharma, with contributions from Andres Freund
Reviewed-By: Andres Freund, Noah Misch, Tom Lane, Svenne Krap, Tomas
    Vondra, Erik Rijkers, Marti Raudsepp, Pavel Stehule
Discussion: CAOeZVidmVRe2jU6aMk_5qkxnB7dfmPROzM7Ur8JPW5j8Y5X-Lw@mail.gmail.com

9 years agoAdd docs for tablesample system_rows()
Simon Riggs [Sat, 16 May 2015 01:44:53 +0000 (21:44 -0400)]
Add docs for tablesample system_rows()

9 years agoUpdate time zone data files to tzdata release 2015d.
Tom Lane [Fri, 15 May 2015 23:35:29 +0000 (19:35 -0400)]
Update time zone data files to tzdata release 2015d.

DST law changes in Egypt, Mongolia, Palestine.
Historical corrections for Canada and Chile.
Revised zone abbreviation for America/Adak (HST/HDT not HAST/HADT).

9 years agoAdd BRIN infrastructure for "inclusion" opclasses
Alvaro Herrera [Fri, 15 May 2015 21:05:22 +0000 (18:05 -0300)]
Add BRIN infrastructure for "inclusion" opclasses

This lets BRIN be used with R-Tree-like indexing strategies.

Also provided are operator classes for range types, box and inet/cidr.
The infrastructure provided here should be sufficient to create operator
classes for similar datatypes; for instance, opclasses for PostGIS
geometries should be doable, though we didn't try to implement one.

(A box/point opclass was also submitted, but we ripped it out before
commit because the handling of floating point comparisons in existing
code is inconsistent and would generate corrupt indexes.)

Author: Emre Hasegeli.  Cosmetic changes by me
Review: Andreas Karlsson

9 years agoImprove test for CONVERT() with GB18030 <-> UTF8.
Tom Lane [Fri, 15 May 2015 21:03:18 +0000 (17:03 -0400)]
Improve test for CONVERT() with GB18030 <-> UTF8.

Add a bit of coverage of high code points.

Arjen Nienhuis

9 years agoMove strategy numbers to include/access/stratnum.h
Alvaro Herrera [Fri, 15 May 2015 20:03:16 +0000 (17:03 -0300)]
Move strategy numbers to include/access/stratnum.h

For upcoming BRIN opclasses, it's convenient to have strategy numbers
defined in a single place.  Since there's nothing appropriate, create
it.  The StrategyNumber typedef now lives there, as well as existing
strategy numbers for B-trees (from skey.h) and R-tree-and-friends (from
gist.h).  skey.h is forced to include stratnum.h because of the
StrategyNumber typedef, but gist.h is not; extensions that currently
rely on gist.h for rtree strategy numbers might need to add a new

A few .c files can stop including skey.h and/or gist.h, which is a nice
side benefit.

Per discussion:
https://www.postgresql.org/message-id/20150514232132.GZ2523@alvh.no-ip.org

Authored by Emre Hasegeli and Álvaro.

(It's not clear to me why bootscanner.l has any #include lines at all.)

9 years agoSQLStandard feature T613 Sampling now Supported
Simon Riggs [Fri, 15 May 2015 19:51:31 +0000 (15:51 -0400)]
SQLStandard feature T613 Sampling now Supported

9 years agoFix uninitialized variable.
Tom Lane [Fri, 15 May 2015 19:45:20 +0000 (15:45 -0400)]
Fix uninitialized variable.

Per compiler warnings.

9 years agoTablesample method API docs
Simon Riggs [Fri, 15 May 2015 19:40:52 +0000 (15:40 -0400)]
Tablesample method API docs

Petr Jelinek

9 years agoAdd to contrib/Makefile
Simon Riggs [Fri, 15 May 2015 19:33:37 +0000 (15:33 -0400)]
Add to contrib/Makefile

9 years agocontrib/tsm_system_time
Simon Riggs [Fri, 15 May 2015 19:31:50 +0000 (15:31 -0400)]
contrib/tsm_system_time

9 years agocontrib/tsm_system_rows
Simon Riggs [Fri, 15 May 2015 19:31:14 +0000 (15:31 -0400)]
contrib/tsm_system_rows

9 years agoTABLESAMPLE system_time(limit)
Simon Riggs [Fri, 15 May 2015 19:18:57 +0000 (15:18 -0400)]
TABLESAMPLE system_time(limit)

Contrib module implementing a tablesample method
that allows you to limit the sample by a hard time
limit.

Petr Jelinek

Reviewed by Michael Paquier, Amit Kapila and
Simon Riggs

9 years agoTABLESAMPLE system_rows(limit)
Simon Riggs [Fri, 15 May 2015 19:14:22 +0000 (15:14 -0400)]
TABLESAMPLE system_rows(limit)

Contrib module implementing a tablesample method
that allows you to limit the sample by a hard row
limit.

Petr Jelinek

Reviewed by Michael Paquier, Amit Kapila and
Simon Riggs

9 years agoExtend GB18030 encoding conversion to cover full Unicode range.
Tom Lane [Fri, 15 May 2015 19:01:59 +0000 (15:01 -0400)]
Extend GB18030 encoding conversion to cover full Unicode range.

Our previous code for GB18030 <-> UTF8 conversion only covered Unicode code
points up to U+FFFF, but the actual spec defines conversions for all code
points up to U+10FFFF.  That would be rather impractical as a lookup table,
but fortunately there is a simple algorithmic conversion between the
additional code points and the equivalent GB18030 byte patterns.  Make use
of the just-added callback facility in LocalToUtf/UtfToLocal to perform the
additional conversions.

Having created the infrastructure to do that, we can use the same code to
map certain linearly-related subranges of the Unicode space below U+FFFF,
allowing removal of the corresponding lookup table entries.  This more
than halves the lookup table size, which is a substantial savings;
utf8_and_gb18030.so drops from nearly a megabyte to about half that.

In support of doing that, replace ISO10646-GB18030.TXT with the data file
gb-18030-2000.xml (retrieved from
http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/ )
in which these subranges have been deleted from the simple lookup entries.

Per bug #12845 from Arjen Nienhuis.  The conversion code added here is
based on his proposed patch, though I whacked it around rather heavily.

9 years agodoc: CREATE FOREIGN TABLE now allows CHECK ( ... ) NO INHERIT
Robert Haas [Fri, 15 May 2015 18:38:27 +0000 (14:38 -0400)]
doc: CREATE FOREIGN TABLE now allows CHECK ( ... ) NO INHERIT

Etsuro Fujita

9 years agoTABLESAMPLE, SQL Standard and extensible
Simon Riggs [Fri, 15 May 2015 18:37:10 +0000 (14:37 -0400)]
TABLESAMPLE, SQL Standard and extensible

Add a TABLESAMPLE clause to SELECT statements that allows
user to specify random BERNOULLI sampling or block level
SYSTEM sampling. Implementation allows for extensible
sampling functions to be written, using a standard API.
Basic version follows SQLStandard exactly. Usable
concrete use cases for the sampling API follow in later
commits.

Petr Jelinek

Reviewed by Michael Paquier and Simon Riggs

9 years agoSilence another create_index regression test failure.
Heikki Linnakangas [Fri, 15 May 2015 18:24:23 +0000 (21:24 +0300)]
Silence another create_index regression test failure.

More platform differences in the less-significant digits in output.

Per buildfarm member rover_firefly, still.

9 years agoFix outdated src/test/mb/ tests, and add a GB18030 test.
Tom Lane [Fri, 15 May 2015 17:47:42 +0000 (13:47 -0400)]
Fix outdated src/test/mb/ tests, and add a GB18030 test.

The expected-output files for these tests were broken by the recent
addition of a warning for hash indexes.  Update them.

Also add a test case for GB18030 encoding, similar to the other ones.
This is a pretty weak test, but it's better than nothing.

9 years agoFix docs build. Oops.
Heikki Linnakangas [Fri, 15 May 2015 16:58:56 +0000 (19:58 +0300)]
Fix docs build. Oops.

9 years agoAdd archive_mode='always' option.
Heikki Linnakangas [Fri, 15 May 2015 15:55:24 +0000 (18:55 +0300)]
Add archive_mode='always' option.

In 'always' mode, the standby independently archives all files it receives
from the primary.

Original patch by Fujii Masao, docs and review by me.

9 years agodocs: consistently uppercase index method and add spacing
Bruce Momjian [Fri, 15 May 2015 15:42:29 +0000 (11:42 -0400)]
docs:  consistently uppercase index method and add spacing

Consistently uppercase index method names, e.g. GIN, and add space after
the index method name and the parentheses enclosing the column names.

9 years agoSilence create_index regression test failure.
Heikki Linnakangas [Fri, 15 May 2015 15:20:16 +0000 (18:20 +0300)]
Silence create_index regression test failure.

The expected output contained some floating point values which might get
rounded slightly differently on different platforms. The exact output isn't
very interesting in this test, so just round it.

Per buildfarm member rover_firefly.

9 years agoFix datatype confusion with the new lossy GiST distance functions.
Heikki Linnakangas [Fri, 15 May 2015 14:59:46 +0000 (17:59 +0300)]
Fix datatype confusion with the new lossy GiST distance functions.

We can only support a lossy distance function when the distance function's
datatype is comparable with the original ordering operator's datatype.
The distance function always returns a float8, so we are limited to float8,
and float4 (by a hard-coded cast of the float8 to float4).

In light of this limitation, it seems like a good idea to have a separate
'recheck' flag for the ORDER BY expressions, so that if you have a non-lossy
distance function, it still works with lossy quals. There are cases like
that with the build-in or contrib opclasses, but it's plausible.

There was a hidden assumption that the ORDER BY values returned by GiST
match the original ordering operator's return type, but there are plenty
of examples where that's not true, e.g. in btree_gist and pg_trgm. As long
as the distance function is not lossy, we can tolerate that and just not
return the distance to the executor (or rather, always return NULL). The
executor doesn't need the distances if there are no lossy results.

There was another little bug: the recheck variable was not initialized
before calling the distance function. That revealed the bigger issue,
as the executor tried to reorder tuples that didn't need reordering, and
that failed because of the datatype mismatch.

9 years agoFix insufficiently-paranoid GB18030 encoding verifier.
Tom Lane [Fri, 15 May 2015 15:03:54 +0000 (11:03 -0400)]
Fix insufficiently-paranoid GB18030 encoding verifier.

The previous coding effectively only verified that the second byte of a
multibyte character was in the expected range; moreover, it wasn't careful
to make sure that the second byte even exists in the buffer before touching
it.  The latter seems unlikely to cause any real problems in the field
(in particular, it could never be a problem with null-terminated input),
but it's still a bug.

Since GB18030 is not a supported backend encoding, the only thing we'd
really be doing with GB18030 text is converting it to UTF8 in LocalToUtf,
which would fail anyway on any invalid character for lack of a match in
its lookup table.  So the only user-visible consequence of this change
should be that you'll get "invalid byte sequence for encoding" rather than
"character has no equivalent" for malformed GB18030 input.  However,
impending changes to the GB18030 conversion code will require these tighter
up-front checks to avoid producing bogus results.

9 years agoRemove useless pg_audit.conf
Stephen Frost [Fri, 15 May 2015 14:41:53 +0000 (10:41 -0400)]
Remove useless pg_audit.conf

No need to have pg_audit.conf any longer since the regression tests are
just loading the module at the start of each session (to simulate being
in shared_preload_libraries, which isn't something we can actually make
happen on the buildfarm itself, it seems).

Pointed out by Tom

9 years agoSupport --verbose option in reindexdb.
Fujii Masao [Fri, 15 May 2015 12:45:55 +0000 (21:45 +0900)]
Support --verbose option in reindexdb.

Sawada Masahiko, reviewed by Fabrízio Mello

9 years agoAllow GiST distance function to return merely a lower-bound.
Heikki Linnakangas [Fri, 15 May 2015 11:26:51 +0000 (14:26 +0300)]
Allow GiST distance function to return merely a lower-bound.

The distance function can now set *recheck = false, like index quals. The
executor will then re-check the ORDER BY expressions, and use a queue to
reorder the results on the fly.

This makes it possible to do kNN-searches on polygons and circles, which
don't store the exact value in the index, but just a bounding box.

Alexander Korotkov and me

9 years agoSupport VERBOSE option in REINDEX command.
Fujii Masao [Fri, 15 May 2015 11:09:57 +0000 (20:09 +0900)]
Support VERBOSE option in REINDEX command.

When this option is specified, a progress report is printed as each index
is reindexed.

Per discussion, we agreed on the following syntax for the extensibility of
the options.

    REINDEX (flexible options) { INDEX | ... } name

Sawada Masahiko.
Reviewed by Robert Haas, Fabrízio Mello, Alvaro Herrera, Kyotaro Horiguchi,
Jim Nasby and me.

Discussion: CAD21AoA0pK3YcOZAFzMae+2fcc3oGp5zoRggDyMNg5zoaWDhdQ@mail.gmail.com

9 years agoHonor traditional SGML NAMELEN limit.
Tom Lane [Fri, 15 May 2015 02:34:28 +0000 (22:34 -0400)]
Honor traditional SGML NAMELEN limit.

We've conformed to this limit in the past, so might as well continue to.

Aaron Swenson

9 years agoTeach UtfToLocal/LocalToUtf to support algorithmic encoding conversions.
Tom Lane [Fri, 15 May 2015 02:27:07 +0000 (22:27 -0400)]
Teach UtfToLocal/LocalToUtf to support algorithmic encoding conversions.

Until now, these functions have only supported encoding conversions using
lookup tables, which is fine as long as there's not too many code points
to convert.  However, GB18030 expects all 1.1 million Unicode code points
to be convertible, which would require a ridiculously-sized lookup table.
Fortunately, a large fraction of those conversions can be expressed through
arithmetic, ie the conversions are one-to-one in certain defined ranges.
To support that, provide a callback function that is used after consulting
the lookup tables.  (This patch doesn't actually change anything about the
GB18030 conversion behavior, just provide infrastructure for fixing it.)

Since this requires changing the APIs of UtfToLocal/LocalToUtf anyway,
take the opportunity to rearrange their argument lists into what seems
to me a saner order.  And beautify the call sites by using lengthof()
instead of error-prone sizeof() arithmetic.

In passing, also mark all the lookup tables used by these calls "const".
This moves an impressive amount of stuff into the text segment, at least
on my machine, and is safer anyhow.

9 years agoSeparate block sampling functions
Simon Riggs [Fri, 15 May 2015 02:02:54 +0000 (04:02 +0200)]
Separate block sampling functions

Refactoring ahead of tablesample patch

Requested and reviewed by Michael Paquier

Petr Jelinek

9 years agopg_upgrade: make controldata checks more consistent
Bruce Momjian [Fri, 15 May 2015 01:56:10 +0000 (21:56 -0400)]
pg_upgrade:  make controldata checks more consistent

Also add missing float8_pass_by_value check.

9 years agoAdd pg_settings.pending_restart column
Peter Eisentraut [Fri, 15 May 2015 00:08:51 +0000 (20:08 -0400)]
Add pg_settings.pending_restart column

with input from David G. Johnston, Robert Haas, Michael Paquier

9 years agodoc: list bigint as mapping to int8 and int64
Bruce Momjian [Thu, 14 May 2015 21:37:53 +0000 (17:37 -0400)]
doc:  list bigint as mapping to int8 and int64

Report by Paul Jungwirth

9 years agoMake repeated 'make installcheck' runs work
Stephen Frost [Thu, 14 May 2015 19:41:39 +0000 (15:41 -0400)]
Make repeated 'make installcheck' runs work

In pg_audit, set client_min_messages up to warning, then reset the role
attributes, to completely reset the session while not making the
regression tests depend on being run by any particular user.

9 years agoImprove pg_audit regression tests
Stephen Frost [Thu, 14 May 2015 19:16:27 +0000 (15:16 -0400)]
Improve pg_audit regression tests

Instead of creating a new superuser role, extract out what the current
user is and use that user instead.  Further, clean up and drop all
objects created by the regression test.

Pointed out by Tom.

9 years agoDocs: fix erroneous claim about max byte length of GB18030.
Tom Lane [Thu, 14 May 2015 18:59:00 +0000 (14:59 -0400)]
Docs: fix erroneous claim about max byte length of GB18030.

This encoding has characters up to 4 bytes long, not 2.

9 years agoFix portability issue in pg_audit.
Tom Lane [Thu, 14 May 2015 17:19:26 +0000 (13:19 -0400)]
Fix portability issue in pg_audit.

"%ld" is not a portable way to print int64's.  This may explain the
buildfarm crashes we're seeing --- it seems to make dromedary happy,
at least.

9 years agoSuppress uninitialized-variable warning.
Tom Lane [Thu, 14 May 2015 16:16:06 +0000 (12:16 -0400)]
Suppress uninitialized-variable warning.

9 years agoSupport "expanded" objects, particularly arrays, for better performance.
Tom Lane [Thu, 14 May 2015 16:08:40 +0000 (12:08 -0400)]
Support "expanded" objects, particularly arrays, for better performance.

This patch introduces the ability for complex datatypes to have an
in-memory representation that is different from their on-disk format.
On-disk formats are typically optimized for minimal size, and in any case
they can't contain pointers, so they are often not well-suited for
computation.  Now a datatype can invent an "expanded" in-memory format
that is better suited for its operations, and then pass that around among
the C functions that operate on the datatype.  There are also provisions
(rudimentary as yet) to allow an expanded object to be modified in-place
under suitable conditions, so that operations like assignment to an element
of an array need not involve copying the entire array.

The initial application for this feature is arrays, but it is not hard
to foresee using it for other container types like JSON, XML and hstore.
I have hopes that it will be useful to PostGIS as well.

In this initial implementation, a few heuristics have been hard-wired
into plpgsql to improve performance for arrays that are stored in
plpgsql variables.  We would like to generalize those hacks so that
other datatypes can obtain similar improvements, but figuring out some
appropriate APIs is left as a task for future work.  (The heuristics
themselves are probably not optimal yet, either, as they sometimes
force expansion of arrays that would be better left alone.)

Preliminary performance testing shows impressive speed gains for plpgsql
functions that do element-by-element access or update of large arrays.
There are other cases that get a little slower, as a result of added array
format conversions; but we can hope to improve anything that's annoyingly
bad.  In any case most applications should see a net win.

Tom Lane, reviewed by Andres Freund

9 years agoFurther fixes for the buildfarm for pg_audit
Stephen Frost [Thu, 14 May 2015 15:55:36 +0000 (11:55 -0400)]
Further fixes for the buildfarm for pg_audit

Also, use a function to load the extension ahead of all other calls,
simulating load from shared_libraries_preload, to make sure the
hooks are in place before logging start.

9 years agoFurther fixes for the buildfarm for pg_audit
Stephen Frost [Thu, 14 May 2015 15:44:16 +0000 (11:44 -0400)]
Further fixes for the buildfarm for pg_audit

The database built by the buildfarm is specific to the extension, use
\connect - instead.

9 years agoFix buildfarm with regard to pg_audit
Stephen Frost [Thu, 14 May 2015 14:57:12 +0000 (10:57 -0400)]
Fix buildfarm with regard to pg_audit

Remove the check that pg_audit be installed by
shared_preload_libraries as that's not going to work when running the
regressions tests in the buildfarm.  That check was primairly a nice to
have and isn't required anyway.