- 27 Aug, 2012 4 commits
-
-
Heikki Linnakangas authored
This enables selectivity estimation of the <<, >>, &<, &> and && operators, as well as the normal inequality operators: <, <=, >=, >. "range @> element" is also supported, but the range-variant @> and <@ operators are not, because they cannot be sensibly estimated with lower and upper bound histograms alone. We would need to make some assumption about the lengths of the ranges for that. Alexander's patch included a separate histogram of lengths for that, but I left that out of the patch for simplicity. Hopefully that will be added as a followup patch. The fraction of empty ranges is also calculated and used in estimation. Alexander Korotkov, heavily modified by me.
-
Peter Eisentraut authored
It still thought that the --xlog-method option argument could be empty, as in a previous version of this feature.
-
Bruce Momjian authored
Brad Davis
-
Tom Lane authored
This patch takes care of a number of problems having to do with failure to choose valid join orders and incorrect handling of lateral references pulled up from subqueries. Notable changes: * Add a LateralJoinInfo data structure similar to SpecialJoinInfo, to represent join ordering constraints created by lateral references. (I first considered extending the SpecialJoinInfo structure, but the semantics are different enough that a separate data structure seems better.) Extend join_is_legal() and related functions to prevent trying to form unworkable joins, and to ensure that we will consider joins that satisfy lateral references even if the joins would be clauseless. * Fill in the infrastructure needed for the last few types of relation scan paths to support parameterization. We'd have wanted this eventually anyway, but it is necessary now because a relation that gets pulled up out of a UNION ALL subquery may acquire a reltargetlist containing lateral references, meaning that its paths *have* to be parameterized whether or not we have any code that can push join quals down into the scan. * Compute data about lateral references early in query_planner(), and save in RelOptInfo nodes, to avoid repetitive calculations later. * Assorted corner-case bug fixes. There's probably still some bugs left, but this is a lot closer to being real than it was before.
-
- 26 Aug, 2012 2 commits
-
-
Bruce Momjian authored
for CREATE TABLE LIKE ... INCLUDING INDEXES. Per report from david.sahagian@emc.com
-
Bruce Momjian authored
-
- 25 Aug, 2012 4 commits
-
-
Bruce Momjian authored
the same as \copy.
-
Bruce Momjian authored
ISO "T" timestamptz format.
-
Peter Eisentraut authored
-
Peter Eisentraut authored
-
- 24 Aug, 2012 3 commits
-
-
Tom Lane authored
The GUC check hooks for transaction_read_only and transaction_isolation tried to check RecoveryInProgress(), so as to disallow setting read/write mode or serializable isolation level (respectively) in hot standby sessions. However, GUC check hooks can be called in many situations where we're not connected to shared memory at all, resulting in a crash in RecoveryInProgress(). Among other cases, this results in EXEC_BACKEND builds crashing during child process start if default_transaction_isolation is serializable, as reported by Heikki Linnakangas. Protect those calls by silently allowing any setting when not inside a transaction; which is okay anyway since these GUCs are always reset at start of transaction. Also, add a check to GetSerializableTransactionSnapshot() to complain if we are in hot standby. We need that check despite the one in check_XactIsoLevel() because default_transaction_isolation could be serializable. We don't want to complain any sooner than this in such cases, since that would prevent running transactions at all in such a state; but a transaction can be run, if SET TRANSACTION ISOLATION is done before setting a snapshot. Per report some months ago from Robert Haas. Back-patch to 9.1, since these problems were introduced by the SSI patch. Kevin Grittner and Tom Lane, with ideas from Heikki Linnakangas
-
Peter Eisentraut authored
-
Peter Eisentraut authored
When an invalid query parameter is reported, some memory leaks. found by Coverity
-
- 23 Aug, 2012 5 commits
-
-
Tom Lane authored
If we revoke a grant option from some role X, but X still holds the option via another grant, we should not recursively revoke the privilege from role(s) Y that X had granted it to. This was supposedly fixed as one aspect of commit 4b2dafcc, but I must not have tested it, because in fact that code never worked: it forgot to shift the grant-option bits back over when masking the bits being revoked. Per bug #6728 from Daniel German. Back-patch to all active branches, since this has been wrong since 8.0.
-
Heikki Linnakangas authored
-
Peter Eisentraut authored
-
Peter Eisentraut authored
Just to check that they actually work.
-
Tom Lane authored
As of 9.2, constraint exclusion should work okay with prepared statements: the planner will try custom plans with actual values of the parameters, and observe that they are a lot cheaper than the generic plan, and thus never fall back to using the generic plan. Noted by Tatsuhito Kasahara.
-
- 22 Aug, 2012 8 commits
-
-
Tom Lane authored
This is open to debate of course, but it's past time we had *something* here.
-
Tom Lane authored
A very large number of small improvements ...
-
Tom Lane authored
The docs claimed that this mode only waits for the standby to receive WAL data, but actually it waits for the data to be written out to the standby's OS; which is a pretty significant difference because it removes the risk of crash of the walreceiver process.
-
Bruce Momjian authored
-
Bruce Momjian authored
configuration file.
-
Peter Eisentraut authored
There was a hack put into install-sh to call strip with the correct options on Mac OS X. But that never worked, because configure disabled stripping on that platform altogether. So remove that dead code, and while we're at it, update install-sh to the latest upstream source (from Automake). Instead, set up the right strip options in programs.m4, so this now actually works the way it was originally intended.
-
Peter Eisentraut authored
This avoids a warning from clang 3.2 about an uninitialized variable 'dtype' in date_in().
-
Tom Lane authored
I was unable to entirely resist the temptation to copy-edit related entries, but will save most of that for a separate pass.
-
- 21 Aug, 2012 6 commits
-
-
Tom Lane authored
This improves on commit 51fed14d by eliminating the assumption that we can form <some pointer value> + <some offset> without overflow. The entire point of those tests is that we don't trust the offset value, so coding them in a way that could wrap around if the buffer happens to be near the top of memory doesn't seem sound. Instead, track the remaining space as a size_t variable and compare offsets against that. Also, improve comment about why we need the extra early check on xl_tot_len.
-
Tom Lane authored
If a view has circular dependencies, pg_dump splits it into a CREATE TABLE and a CREATE RULE command to break the dependency loop. However, if the view has reloptions, those options cannot be applied in the CREATE TABLE command, because views and tables have different allowed reloptions so CREATE TABLE would reject them. Instead apply the reloptions after the CREATE RULE, using ALTER VIEW SET.
-
Robert Haas authored
Move discussion of why our algorithm for taking snapshots in recovery to a more appropriate location in the function, and delete incorrect mention of taking a lock.
-
Robert Haas authored
Craig Ringer, slightly edited by me.
-
Peter Eisentraut authored
When elevel >= ERROR, we add an abort() call to the ereport() macro to give the compiler a hint that the ereport() expansion will not return, but the abort() isn't actually reached because the longjmp happens in errfinish(). Because the effect of ereport() varies with the elevel, we cannot use standard compiler attributes such as noreturn for this.
-
Peter Eisentraut authored
-
- 20 Aug, 2012 5 commits
-
-
Robert Haas authored
Jeff Janes
-
Robert Haas authored
Jeff Janes
-
Tom Lane authored
Extraction of trigrams did not process LIKE escape sequences properly, leading to possible misidentification of trigrams near escapes, resulting in incorrect index search results. Fujii Masao
-
Heikki Linnakangas authored
If a WAL record header was split across pages, but xl_tot_len was 0, we would get confused and conclude that we had already read the whole record, and proceed to CRC check it. That can lead to a crash in RecordIsValid(), which isn't careful to not read beyond end-of-record, as defined by xl_tot_len. Add an explicit sanity check for xl_tot_len <= SizeOfXlogRecord. Also, make RecordIsValid() more robust by checking in each step that it doesn't try to access memory beyond end of record, even if a length field in the record's or a backup block's header is bogus. Per report and analysis by Tom Lane.
-
Tom Lane authored
-
- 19 Aug, 2012 2 commits
- 18 Aug, 2012 1 commit
-
-
Tom Lane authored
It said "XXX: The following could be improved if we had LATERAL" ... so let's do that. No catversion bump since either version of the view works fine.
-