- 25 Mar, 2014 2 commits
-
-
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 5 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.
-
Bruce Momjian authored
-
Bruce Momjian authored
Clear errno before calling readdir() and handle old MinGW errno bug while adding full test coverage for readdir/closedir failures. Backpatch through 8.4.
-
Heikki Linnakangas authored
The special feature the XLogInsert slots had over regular LWLocks is the insertingAt value that was updated atomically with releasing backends waiting on it. Add new functions to the LWLock API to do that, and replace the slots with LWLocks. This reduces the amount of duplicated code. (There's still some duplication, but at least it's all in lwlock.c now.) Reviewed by Andres Freund.
-
- 20 Mar, 2014 3 commits
-
-
Tom Lane authored
The previous method was overly complex and underly correct; in particular, by assigning the default value with PGC_S_OVERRIDE, it prevented later attempts to change the setting in postgresql.conf, as noted by Jeff Janes. We should just assign the default value with source PGC_S_DYNAMIC_DEFAULT, which will have the desired priority relative to the boot_val as well as user-set values. There is still a gap in this method: if there's an explicit assignment of effective_cache_size = -1 in the postgresql.conf file, and that assignment appears before shared_buffers is assigned, the code will substitute 4 times the bootstrap default for shared_buffers, and that value will then persist (since it will have source PGC_S_FILE). I don't see any very nice way to avoid that though, and it's not a case to be expected in practice. The existing comments in guc-file.l look forward to a redesign of the DYNAMIC_DEFAULT mechanism; if that ever happens, we should consider this case as one of the things we'd like to improve.
-
Bruce Momjian authored
Previously user name memory allocation failures were ignored and the default user name set to NULL.
-
Robert Haas authored
Per discussion with Tom Lane.
-
- 19 Mar, 2014 3 commits
-
-
Alvaro Herrera authored
With this in place, a session blocking behind another one because of tuple locks will get a context line mentioning the relation name, tuple TID, and operation being done on tuple. For example: LOG: process 11367 still waiting for ShareLock on transaction 717 after 1000.108 ms DETAIL: Process holding the lock: 11366. Wait queue: 11367. CONTEXT: while updating tuple (0,2) in relation "foo" STATEMENT: UPDATE foo SET value = 3; Most usefully, the new line is displayed by log entries due to log_lock_waits, although of course it will be printed by any other log message as well. Author: Christian Kruse, some tweaks by Álvaro Herrera Reviewed-by: Amit Kapila, Andres Freund, Tom Lane, Robert Haas
-
Fujii Masao authored
Also improve help message in pg_recvlogical.
-
- 18 Mar, 2014 13 commits
-
-
Heikki Linnakangas authored
Oops. Pointed out by Andres Freund.
-
Heikki Linnakangas authored
It is no longer used, none of the resource managers have multi-record actions that would make it unsafe to perform a restartpoint. Also don't allow rm_cleanup to write WAL records, it's also no longer required. Move the call to rm_cleanup routines to make it more symmetric with rm_startup.
-
Heikki Linnakangas authored
-
Robert Haas authored
Thom Brown
-
Robert Haas authored
Report from Andres Freund, but not his fix.
-
Heikki Linnakangas authored
Splitting a page consists of two separate steps: splitting the child page, and inserting the downlink for the new right page to the parent. Previously, we handled the case that you crash in between those steps with a cleanup routine after the WAL recovery had finished, which finished the incomplete split. However, that doesn't help if the page split is interrupted but the database doesn't crash, so that you don't perform WAL recovery. That could happen for example if you run out of disk space. Remove the end-of-recovery cleanup step. Instead, when a page is split, the left page is marked with a new INCOMPLETE_SPLIT flag, and when the downlink is inserted to the parent, the flag is cleared again. If an insertion sees a page with the flag set, it knows that the split was interrupted for some reason, and inserts the missing downlink before proceeding. I used the same approach to fix GIN and GiST split algorithms earlier. This was the last WAL cleanup routine, so we could get rid of that whole machinery now, but I'll leave that for a separate patch. Reviewed by Peter Geoghegan.
-
Tom Lane authored
Andres Freund and Tom Lane
-
Robert Haas authored
Commit 3bd261ca updated the API but neglected to make the corresponding edits here. Per Tom Lane and the buildfarm.
-
Robert Haas authored
Craig Ringer, Andres Freund, Christian Kruse, with edits by me.
-
Robert Haas authored
This is fairly basic at the moment, but it's at least useful for testing and debugging, and possibly more. Andres Freund
-
Robert Haas authored
The comment and the code diverged at some point before the initial commit of this feature, and I failed to notice. Noted by Tom Lane.
-
Tom Lane authored
One path through the loop over indexes forgot to do index_close(). Rather than adding a fourth call, restructure slightly so that there's only one. In passing, get rid of an unnecessary syscache lookup: the pg_index struct for the index is already available from its relcache entry. Per report from YAMAMOTO Takashi, though this is a bit different from his suggested patch. This is new code in HEAD, so no need for back-patch.
-
Robert Haas authored
Revise the original decision to expose a uint64-based interface and use Size everywhere possible. Avoid assuming that MAXIMUM_ALIGNOF is 8, or making any assumption about the relationship between that value and sizeof(Size). If MAXIMUM_ALIGNOF is bigger, we'll now insert padding after the length word; if it's smaller, we are now prepared to read and write the length word in chunks. Per discussion with Tom Lane.
-