- 29 Mar, 2014 3 commits
-
-
Noah Misch authored
Any OS user able to access the socket can connect as the bootstrap superuser and in turn execute arbitrary code as the OS user running the test. Protect against that by placing the socket in the temporary data directory, which has mode 0700 thanks to initdb. Back-patch to 8.4 (all supported versions). The hazard remains wherever the temporary cluster accepts TCP connections, notably on Windows. Attempts to run "make check" from a directory with a long name will now fail. An alternative not sharing that problem was to place the socket in a subdirectory of /tmp, but that is only secure if /tmp is sticky. The PG_REGRESS_SOCK_DIR environment variable is available as a workaround when testing from long directory paths. As a convenient side effect, this lets testing proceed smoothly in builds that override DEFAULT_PGSOCKET_DIR. Popular non-default values like /var/run/postgresql are often unwritable to the build user. Security: CVE-2014-0067
-
Noah Misch authored
Back-patch to 8.4 (all supported versions).
-
Noah Misch authored
-
- 28 Mar, 2014 4 commits
-
-
Tom Lane authored
Make it print the details in case there's a failure. Andres Freund, slightly modified by me
-
Bruce Momjian authored
This adjusts patch 613c6d26.
-
Tom Lane authored
The original coding of EquivalenceClasses didn't foresee that appendrel child relations might themselves be appendrels; but this is possible for example when a UNION ALL subquery scans a table with inheritance children. The oversight led to failure to optimize ordering-related issues very well for the grandchild tables. After some false starts involving explicitly flattening the appendrel representation, we found that this could be fixed easily by removing a few implicit assumptions about appendrel parent rels not being children themselves. Kyotaro Horiguchi and Tom Lane, reviewed by Noah Misch
-
Tom Lane authored
Commit 613c6d26 sloppily replaced a lookup of the UID obtained from getpeereid() with a lookup of the server's own user name, thus totally destroying peer authentication. Revert. Per report from Christoph Berg. In passing, make sure get_user_name() zeroes *errstr on success on Windows as well as non-Windows. I don't think any callers actually depend on this ATM, but we should be consistent across platforms.
-
- 27 Mar, 2014 4 commits
-
-
Tom Lane authored
Explain exactly what fails (ie, function arguments of type numeric) if you don't have it.
-
Bruce Momjian authored
Expected output has changed because of psql replica identity output changes. Reported by Christoph Berg
-
Heikki Linnakangas authored
Amit Kapila.
-
Tom Lane authored
This has been true for some time, but we were leaving users to discover it the hard way. Back-patch to 9.2. It might've been true before that, but we were claiming Python 2.2 compatibility before that, so I won't guess at the exact requirements back then.
-
- 26 Mar, 2014 10 commits
-
-
Andrew Dunstan authored
Peter Geoghegan.
-
Tom Lane authored
We must increment the refcount on "plntup" as soon as we have the reference, not sometime later. Otherwise, if an error is thrown in between, the Py_XDECREF(plntup) call in the PG_CATCH block removes a refcount we didn't add, allowing the object to be freed even though it's still part of the plpython function's parsetree. This appears to be the cause of crashes seen on buildfarm member prairiedog. It's a bit surprising that we've not seen it fail repeatably before, considering that the regression tests have been exercising the faulty code path since 2009. The real-world impact is probably minimal, since it's unlikely anyone would be provoking the "TD["new"] is not a dictionary" error in production, and that's the only case that is actually wrong. Still, it's a bug affecting the regression tests, so patch all supported branches. In passing, remove dead variable "plstr", and demote "platt" to a local variable inside the PG_TRY block, since we don't need to clean it up in the PG_CATCH path.
-
Heikki Linnakangas authored
If you compile with WAL_DEBUG and enable it with wal_debug=on, we used to only pass the first XLogRecData entry to the rm_desc routine. I think the original assumprion was that the first XLogRecData entry contains all the necessary information for the rm_desc routine, but that's a pretty shaky assumption. At least standby_redo didn't get the memo. To fix, piece together all the data in a temporary buffer, and pass that to the rm_desc routine. It's been like this forever, but the patch didn't apply cleanly to back-branches. Probably wouldn't be hard to fix the conflicts, but it's not worth the trouble.
-
Bruce Momjian authored
Display "replica identity" only for \d plus mode, exclude system schema objects, and display all possible values, not just non-default, non-index ones.
-
Bruce Momjian authored
-
Andrew Dunstan authored
Set function parameter names and defaults. Add jsonb versions (which the code already provided for so the actual new code is trivial). Add jsonb regression tests and docs. Bump catalog version (which I apparently forgot to do when jsonb was committed).
-
Heikki Linnakangas authored
Per buildfarm.
-
Heikki Linnakangas authored
This is useful for seeing what WAL records are inserted in real-time, by pointing pg_xlogdump to a live server.
-
Heikki Linnakangas authored
It needs to be initialized, like in the boolean gin_tsquery_consistent version. Peter Geoghegan.
-
Andrew Dunstan authored
In the process fix a small bug.
-
- 25 Mar, 2014 3 commits
-
-
Fujii Masao authored
Backpatch to 9.0 where XLOG_PARAMETER_CHANGE record was instroduced.
-
Magnus Hagander authored
Joshua Tolley
-
Bruce Momjian authored
-
- 24 Mar, 2014 8 commits
-
-
Bruce Momjian authored
Assert errors were thrown for functions being passed invalid encodings, while the main code handled it just fine. Also document that libpq's PQclientEncoding() returns -1 for an encoding lookup failure. Per report from Peter Geoghegan
-
Bruce Momjian authored
Also, previous commit 1420f3a9 to fix ts_rank_cd() for stripped lexemes was from a patch created by Alex Hill.
-
Bruce Momjian authored
Previously, stripped lexemes got a default location and could be considered if mixed with non-stripped lexemes. BACKWARD INCOMPATIBILITY CHANGE
-
Heikki Linnakangas authored
That seems nicer than making it the caller's responsibility to pass a suitable-sized array. All the callers were just palloc'ing an array anyway.
-
Fujii Masao authored
Enclose "TIMELINE tli" part with brackets because it's optional. Backport to 9.3 where TIMELINE option was introduced. Noted by Marko Tiikkaja
-
Heikki Linnakangas authored
'cbuffer' variable was left over from an earlier version of the patch to rewrite the incomplete split handling.
-
Heikki Linnakangas authored
Erik Rijkers
-
Andrew Dunstan authored
This should make the buildfarm happier.
-
- 23 Mar, 2014 6 commits
-
-
Andrew Dunstan authored
Per Thom Brown.
-
Andrew Dunstan authored
The new format accepts exactly the same data as the json type. However, it is stored in a format that does not require reparsing the orgiginal text in order to process it, making it much more suitable for indexing and other operations. Insignificant whitespace is discarded, and the order of object keys is not preserved. Neither are duplicate object keys kept - the later value for a given key is the only one stored. The new type has all the functions and operators that the json type has, with the exception of the json generation functions (to_json, json_agg etc.) and with identical semantics. In addition, there are operator classes for hash and btree indexing, and two classes for GIN indexing, that have no equivalent in the json type. This feature grew out of previous work by Oleg Bartunov and Teodor Sigaev, which was intended to provide similar facilities to a nested hstore type, but which in the end proved to have some significant compatibility issues. Authors: Oleg Bartunov, Teodor Sigaev, Peter Geoghegan and Andrew Dunstan. Review: Andres Freund
-
Noah Misch authored
Their values are unspecified and system-dependent. Per buildfarm member kouprey.
-
Noah Misch authored
This covers all the SQL-standard trigger types supported for regular tables; it does not cover constraint triggers. The approach for acquiring the old row mirrors that for view INSTEAD OF triggers. For AFTER ROW triggers, we spool the foreign tuples to a tuplestore. This changes the FDW API contract; when deciding which columns to populate in the slot returned from data modification callbacks, writable FDWs will need to check for AFTER ROW triggers in addition to checking for a RETURNING clause. In support of the feature addition, refactor the TriggerFlags bits and the assembly of old tuples in ModifyTable. Ronan Dunklau, reviewed by KaiGai Kohei; some additional hacking by me.
-
Noah Misch authored
-
Noah Misch authored
equalTupleDescs() neglected both of these ConstrCheck fields, and CreateTupleDescCopyConstr() neglected ccnoinherit. At this time, the only known behavior defect resulting from these omissions is constraint exclusion disregarding a CHECK constraint validated by an ALTER TABLE VALIDATE CONSTRAINT statement issued earlier in the same transaction. Back-patch to 9.2, where these fields were introduced.
-
- 21 Mar, 2014 2 commits
-
-
Heikki Linnakangas authored
It was incorrectly declared as global variable, not an enum type, and the comments for GIN_FALSE and GIN_TRUE were backwards.
-
Heikki Linnakangas authored
Also fix the name of the dtrace probe for LWLockAcquireOrWait(). The function was renamed from LWLockWaitUntilFree to LWLockAqcuireOrWait, but the dtrace probe was neglected. Pointed out by Andres Freund and the buildfarm.
-