aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Prevent a double free by not reentering be_tls_close().Noah Misch2015-05-18
| | | | | | | | | | | | 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
* Fix typo in comment.Heikki Linnakangas2015-05-18
| | | | Jim Nasby
* Put back stats-collector restarting code, removed accidentally.Heikki Linnakangas2015-05-18
| | | | | | | | Removed that code snippet accidentally in the archive_mode='always' patch. Also, use varname-tags for archive_command in the docs. Fujii Masao
* Don't classify REINDEX command as DDL in the pg_audit doc.Fujii Masao2015-05-18
| | | | The commit a936743 changed the class of REINDEX but forgot to update the doc.
* Add new files to nls.mkPeter Eisentraut2015-05-17
|
* Fix failure to copy IndexScan.indexorderbyops in copyfuncs.c.Tom Lane2015-05-17
| | | | | | | | | | | | | | | 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.
* Use += not = to set makefile variables after including base makefiles.Tom Lane2015-05-17
| | | | | | | | 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.
* Release notes for 9.4.2, 9.3.7, 9.2.11, 9.1.16, 9.0.20.Tom Lane2015-05-17
|
* Fix wording error caused by recent typo fixesMagnus Hagander2015-05-17
| | | | | It wasn't just a typo, but bad wording. This should make it more clear. Pointed out by Tom Lane.
* pg_audit Makefile, REINDEX changesStephen Frost2015-05-17
| | | | | | Clean up the Makefile, per Michael Paquier. Classify REINDEX as we do in core, use '1.0' for the version, per Fujii.
* Fix typos in commentsMagnus Hagander2015-05-17
| | | | Dmitriy Olshevskiy
* Minor docs fixes for pg_auditMagnus Hagander2015-05-17
| | | | Peter Geoghegan
* hstore_plpython: Fix regression tests under Python 3Peter Eisentraut2015-05-16
|
* Fix whitespacePeter Eisentraut2015-05-16
|
* First-draft release notes for 9.4.2 et al.Tom Lane2015-05-16
| | | | | As usual, the release notes for older branches will be made by cutting these down, but put them up for community review first.
* pg_upgrade: no need to check for matching float8_pass_by_valueBruce Momjian2015-05-16
| | | | Report by Noah Misch
* Fix docs typoTom Lane2015-05-16
| | | | I don't think "respectfully" is what was meant here ...
* More portability fixing for bipartite_match.c.Tom Lane2015-05-16
| | | | <float.h> is required for isinf() on some platforms. Per buildfarm.
* pg_upgrade: force timeline 1 in the new clusterBruce Momjian2015-05-16
| | | | | | | | | | 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
* pg_upgrade: only allow template0 to be non-connectableBruce Momjian2015-05-16
| | | | | | | | | | | | | | | | 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
* Avoid direct use of INFINITY.Tom Lane2015-05-15
| | | | It's not very portable. Per buildfarm.
* Add docs for tablesample system_time()Simon Riggs2015-05-15
|
* Support GROUPING SETS, CUBE and ROLLUP.Andres Freund2015-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add docs for tablesample system_rows()Simon Riggs2015-05-15
|
* Update time zone data files to tzdata release 2015d.Tom Lane2015-05-15
| | | | | | DST law changes in Egypt, Mongolia, Palestine. Historical corrections for Canada and Chile. Revised zone abbreviation for America/Adak (HST/HDT not HAST/HADT).
* Add BRIN infrastructure for "inclusion" opclassesAlvaro Herrera2015-05-15
| | | | | | | | | | | | | | | | 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
* Improve test for CONVERT() with GB18030 <-> UTF8.Tom Lane2015-05-15
| | | | | | Add a bit of coverage of high code points. Arjen Nienhuis
* Move strategy numbers to include/access/stratnum.hAlvaro Herrera2015-05-15
| | | | | | | | | | | | | | | | | | | | 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.)
* SQLStandard feature T613 Sampling now SupportedSimon Riggs2015-05-15
|
* Fix uninitialized variable.Tom Lane2015-05-15
| | | | Per compiler warnings.
* Tablesample method API docsSimon Riggs2015-05-15
| | | | Petr Jelinek
* Add to contrib/MakefileSimon Riggs2015-05-15
|
* contrib/tsm_system_timeSimon Riggs2015-05-15
|
* contrib/tsm_system_rowsSimon Riggs2015-05-15
|
* TABLESAMPLE system_time(limit)Simon Riggs2015-05-15
| | | | | | | | | | | 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
* TABLESAMPLE system_rows(limit)Simon Riggs2015-05-15
| | | | | | | | | | | 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
* Extend GB18030 encoding conversion to cover full Unicode range.Tom Lane2015-05-15
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* doc: CREATE FOREIGN TABLE now allows CHECK ( ... ) NO INHERITRobert Haas2015-05-15
| | | | Etsuro Fujita
* TABLESAMPLE, SQL Standard and extensibleSimon Riggs2015-05-15
| | | | | | | | | | | | | | 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
* Silence another create_index regression test failure.Heikki Linnakangas2015-05-15
| | | | | | More platform differences in the less-significant digits in output. Per buildfarm member rover_firefly, still.
* Fix outdated src/test/mb/ tests, and add a GB18030 test.Tom Lane2015-05-15
| | | | | | | | 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.
* Fix docs build. Oops.Heikki Linnakangas2015-05-15
|
* Add archive_mode='always' option.Heikki Linnakangas2015-05-15
| | | | | | | In 'always' mode, the standby independently archives all files it receives from the primary. Original patch by Fujii Masao, docs and review by me.
* docs: consistently uppercase index method and add spacingBruce Momjian2015-05-15
| | | | | Consistently uppercase index method names, e.g. GIN, and add space after the index method name and the parentheses enclosing the column names.
* Silence create_index regression test failure.Heikki Linnakangas2015-05-15
| | | | | | | | 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.
* Fix datatype confusion with the new lossy GiST distance functions.Heikki Linnakangas2015-05-15
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix insufficiently-paranoid GB18030 encoding verifier.Tom Lane2015-05-15
| | | | | | | | | | | | | | | | | | 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.
* Remove useless pg_audit.confStephen Frost2015-05-15
| | | | | | | | | 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
* Support --verbose option in reindexdb.Fujii Masao2015-05-15
| | | | Sawada Masahiko, reviewed by Fabrízio Mello
* Allow GiST distance function to return merely a lower-bound.Heikki Linnakangas2015-05-15
| | | | | | | | | | | 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