- Jun 24, 2016
-
-
Robert Haas authored
something.* IS NOT NULL means that every attribute of the row is not NULL, not that the row itself is non-NULL (e.g. because it's coming from below an outer join. Use (somevar.*)::pg_catalog.text IS NOT NULL instead. Ashutosh Bapat, per a report by Rushabh Lathia. Reviewed by Amit Langote and Etsuro Fujita. Schema-qualification added by me.
-
Robert Haas authored
Etsuro Fujita
-
- Jun 20, 2016
-
-
Tom Lane authored
Per buildfarm. Fortunately, it's not quite too late to squeeze this fix into the pg_trgm 1.3 update.
-
Tom Lane authored
There was some very strange code here, dating to commit b525bf77, that purported to work around an ancient gcc bug by forcing a float4 comparison to be done as int instead. Commit 5871b884 broke that when it changed one side of the comparison to "double" but left the comparison code alone. Commit f576b17c doubled down on the weirdness by introducing a "volatile" marker, which had nothing to do with the actual problem. Guess that the gcc bug, even if it's still present in the wild, was triggered by comparison of float4's and can be avoided if we store the result of cnt_sml() into a double before comparing to the double "nlimit". This will at least work correctly on non-broken compilers, and it's way more readable. Per bug #14202 from Greg Navis. Add a regression test based on his example. Report: <20160620115321.5792.10766@wrigleys.postgresql.org>
-
- Jun 18, 2016
-
-
Tom Lane authored
As shown by buildfarm reports, dblink_build_sql_insert and dblink_build_sql_update are *not* parallel safe, because they may attempt to access temporary tables of the local session. Although dblink_build_sql_delete doesn't actually touch the contents of the referenced table, it seems consistent and prudent to mark it PARALLEL RESTRICTED too.
-
- Jun 17, 2016
-
-
Robert Haas authored
This requires some core changes as well so that we can properly WAL-log the truncation. Specifically, it changes the format of the XLOG_SMGR_TRUNCATE WAL record, so bump XLOG_PAGE_MAGIC. Patch by me, reviewed but not fully endorsed by Andres Freund.
-
Robert Haas authored
Almost all functions provided by this extension are PARALLEL RESTRICTED. Mostly, that's because the leader's TCP connections won't be shared with the workers, but in some cases like dblink_get_pkey it's because they obtain locks which might be released early if taken within a parallel worker. dblink_fdw_validator probably can't be used in a query anyway, but there would be no problem from the point of view of parallel query if it were, so it's PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
Per gripe from Thomas Munro, who only complained about a more localized problem, but I couldn't resist a bit more wordsmithing.
-
- Jun 15, 2016
-
-
Robert Haas authored
The new pg_check_visible() and pg_check_frozen() functions can be used to verify that the visibility map bits for a relation's data pages match the actual state of the tuples on those pages. Amit Kapila and Robert Haas, reviewed (in earlier versions) by Andres Freund. Additional testing help by Thomas Munro.
-
- Jun 14, 2016
-
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL RESTRICTED, because they provide information about the connection state. Parallel workers don't have this information and therefore these functions can't be executed in a worker (but they can be present in a query some other part of which uses parallelism). Andreas Karlsson
-
Robert Haas authored
Commit 749a787c bumped the extension version on all of these extensions already, and we haven't had a release since then, so we can make further changes without bumping the extension version again. Take this opportunity to mark all of the functions exported by these modules PARALLEL SAFE -- except for pg_trgm's set_limit(). Mark that one PARALLEL RESTRICTED, because it makes a persistent change to a GUC value. Note that some of the markings added by this commit don't have any effect; for example, gseg_picksplit() isn't likely to be mentioned explicitly in a query and therefore it's parallel-safety marking will never be consulted. But this commit just marks everything for consistency: if it were somehow used in a query, that would be fine as far as parallel query is concerned, since it does not consult any backend-private state, attempt to write data, etc. Andreas Karlsson, with a few revisions by me.
-
Robert Haas authored
As discovered by Andreas Seltenreich via sqlsmith, it's possible for a remote join to need to generate a target list which contains a PlaceHolderVar which would need to be evaluated on the remote server. This happens when we try to push down a join tree which contains outer joins and the nullable side of the join contains a subquery which evauates some expression which can go to NULL above the level of the join. Since the deparsing logic can't build a remote query that involves subqueries, it fails while trying to produce an SQL query that can be sent to the remote side. Detect such cases and don't try to push down the join at all. It's actually fine to push down the join if the PlaceHolderVar needs to be evaluated at the current join level. This patch makes a small change to build_tlist_to_deparse so that this case will work. Amit Langote, Ashutosh Bapat, and me.
-
Tom Lane authored
Extension scripts should never use CREATE OR REPLACE for initial object creation. If there is a collision with a pre-existing (probably user-created) object, we want extension installation to fail, not silently overwrite the user's object. Bloom and sslinfo both violated this precept. Also fix a number of scripts that had no standard header (the file name comment and the \echo...\quit guard). Probably the \echo...\quit hack is less important now than it was in 9.1 days, but that doesn't mean that individual extensions get to choose whether to use it or not. And fix a couple of evident copy-and-pasteos in file name comments. No need for back-patch: the REPLACE bugs are both new in 9.6, and the rest of this is pretty much cosmetic. Andreas Karlsson and Tom Lane
-
Robert Haas authored
Andreas Seltenreich reports that it is possible for a PlaceHolderVar to creep into this tlist, and I fear that even after that's fixed we might have other, similar bugs in this area either now or in the future. There's a lot of action-at-a-distance here, because the validity of this assertion depends on core planner behavior; so, let's use elog() to make sure we catch this even in non-assert builds, rather than just crashing.
-
- Jun 12, 2016
-
-
Noah Misch authored
-
- Jun 10, 2016
-
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Given the general prohibition against write operations in parallel queries, it is perhaps a bit surprising that pg_stat_statements_reset() is parallel safe. But since it only modifies shared memory, not the database, it's OK. Andreas Karlsson
-
Robert Haas authored
Andreas Karlsson, per a gripe from Tom Lane.
-
Robert Haas authored
-
- Jun 09, 2016
-
-
Robert Haas authored
The pgrowlocks function provided by this extension is PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
The pg_prewarm function provided by this extension is PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
The pg_buffercache_pages function provided by this extension is PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Tom Lane authored
In commits 9ff60273 and dbe23289 I (tgl) fixed the signatures of a bunch of contrib's GIN and GIST support functions so that they would pass validation by the recently-added amvalidate functions. The backend does not actually consult or check those signatures otherwise, so I figured this was basically cosmetic and did not require an extension version bump. However, Alexander Korotkov pointed out that that would leave us in a pretty messy situation if we ever wanted to redefine those functions later, because there wouldn't be a unique way to name them. Since we're going to be bumping these extensions' versions anyway for parallel-query cleanups, let's take care of this now. Andreas Karlsson, adjusted for more search-path-safety by me
-
- Jun 07, 2016
-
-
Alvaro Herrera authored
COMMENT ON ACCESS METHOD was missing; add it, along psql tab-completion support for it. psql was also missing a way to list existing access methods; the new \dA command does that. Also add tab-completion support for DROP ACCESS METHOD. Author: Michael Paquier Discussion: https://www.postgresql.org/message-id/CAB7nPqTzdZdu8J7EF8SXr_R2U5bSUUYNOT3oAWBZdEoggnwhGA@mail.gmail.com
-
Robert Haas authored
The lo_oid function provided by this extension is PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
-
Robert Haas authored
All citext functions are PARALLEL SAFE, and a couple of them can benefit from having aggregate combine functions. Andreas Karlsson
-
- Jun 05, 2016
-
-
Tom Lane authored
Fix still another bug in commit 35fcb1b3: it failed to fully initialize the SortSupport states it introduced to allow the executor to re-check ORDER BY expressions containing distance operators. That led to a null pointer dereference if the sortsupport code tried to use ssup_cxt. The problem only manifests in narrow cases, explaining the lack of previous field reports. It requires a GiST-indexable distance operator that lacks SortSupport and is on a pass-by-ref data type, which among core+contrib seems to be only btree_gist's interval opclass; and it requires the scan to be done as an IndexScan not an IndexOnlyScan, which explains how btree_gist's regression test didn't catch it. Per bug #14134 from Jihyun Yu. Peter Geoghegan Report: <20160511154904.2603.43889@wrigleys.postgresql.org>
-
- Jun 04, 2016
-
- Jun 03, 2016
-
-
Tom Lane authored
Per discussion, this is a more understandable and future-proof way of exposing the setting to users. On-disk, we can still store it in words, so as to not break on-disk compatibility with beta1. Along the way, clean up the code associated with Bloom reloptions. Provide explicit macros for default and maximum lengths rather than having magic numbers buried in multiple places in the code. Drop the adjustBloomOptions() code altogether: it was useless in view of the fact that reloptions.c already performed default-substitution and range checking for the options. Rename a couple of macros and types for more clarity. Discussion: <23767.1464926580@sss.pgh.pa.us>
-
- May 25, 2016
-
-
Tom Lane authored
blbuildempty did not do even approximately the right thing: it tried to add a metapage to the relation's regular data fork, which already has one at that point. It should look like the ambuildempty methods for all the standard index types, ie, initialize a metapage image in some transient storage and then write it directly to the init fork. To support that, refactor BloomInitMetapage into two functions. In passing, fix BloomInitMetapage so it doesn't leave the rd_options field of the index's relcache entry pointing at transient storage. I'm not sure this had any visible consequence, since nothing much else is likely to look at a bloom index's rd_options, but it's certainly poor practice. Per bug #14155 from Zhou Digoal. Report: <20160524144146.22598.42558@wrigleys.postgresql.org>
-