- 26 Sep, 2013 4 commits
-
-
Robert Haas authored
David Rowley, after a suggestion from Heikki Linnakangas. Reviewed by Albe Laurenz, and further edited by me.
-
Andrew Dunstan authored
The behaviour in json_populate_record() and json_populate_recordset() was changed during development but the docs were not.
-
Heikki Linnakangas authored
There is a rare race condition, when a transaction that inserted a tuple aborts while vacuum is processing the page containing the inserted tuple. Vacuum prunes the page first, which normally removes any dead tuples, but if the inserting transaction aborts right after that, the loop after pruning will see a dead tuple and remove it instead. That's OK, but if the page is on a table with no indexes, and the page becomes completely empty after removing the dead tuple (or tuples) on it, it will be immediately marked as all-visible. That's OK, but the sanity check in vacuum would throw a warning because it thinks that the page contains dead tuples and was nevertheless marked as all-visible, even though it just vacuumed away the dead tuples and so it doesn't actually contain any. Spotted this while reading the code. It's difficult to hit the race condition otherwise, but can be done by putting a breakpoint after the heap_page_prune() call. Backpatch all the way to 8.4, where this code first appeared.
-
Noah Misch authored
Previous code gave a mean delay 0.44% below target. This change also has the effect of increasing the maximum possible delay. Fabien COELHO
-
- 25 Sep, 2013 1 commit
-
-
Heikki Linnakangas authored
B-tree operators are not allowed to leak memory into the current memory context. Range_cmp leaked detoasted copies of the arguments. That caused a quick out-of-memory error when creating an index on a range column. Reported by Marian Krucina, bug #8468.
-
- 24 Sep, 2013 1 commit
-
-
Alvaro Herrera authored
-
- 23 Sep, 2013 8 commits
-
-
Noah Misch authored
Though @libdir@ almost always matches @abs_builddir@ in this context, the test could only fail if they differed. Back-patch to 9.1, where the test was introduced. Hamid Quddus Akhtar
-
Noah Misch authored
Fabien COELHO
-
Robert Haas authored
Mike Blackwell and Robert Haas
-
Robert Haas authored
Previously, arbitray system columns could be mentioned in table constraints, but they were not correctly checked at runtime, because the values weren't actually set correctly in the tuple. Since it seems easy enough to initialize the table OID properly, do that, and continue allowing that column, but disallow the rest unless and until someone figures out a way to make them work properly. No back-patch, because this doesn't seem important enough to take the risk of destabilizing the back branches. In fact, this will pose a dump-and-reload hazard for those upgrading from previous versions: constraints that were accepted before but were not correctly enforced will now either be enforced correctly or not accepted at all. Either could result in restore failures, but in practice I think very few users will notice the difference, since the use case is pretty marginal anyway and few users will be relying on features that have not historically worked. Amit Kapila, reviewed by Rushabh Lathia, with doc changes by me.
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Stephen Frost authored
In libpq, we set up and pass to OpenSSL callback routines to handle locking. When we run out of SSL connections, we try to clean things up by de-registering the hooks. Unfortunately, we had a few calls into the OpenSSL library after these hooks were de-registered during SSL cleanup which lead to deadlocking. This moves the thread callback cleanup to be after all SSL-cleanup related OpenSSL library calls. I've been unable to reproduce the deadlock with this fix. In passing, also move the close_SSL call to be after unlocking our ssl_config mutex when in a failure state. While it looks pretty unlikely to be an issue, it could have resulted in deadlocks if we ended up in this code path due to something other than SSL_new failing. Thanks to Heikki for pointing this out. Back-patch to all supported versions; note that the close_SSL issue only goes back to 9.0, so that hunk isn't included in the 8.4 patch. Initially found and reported by Vesa-Matti J Kari; many thanks to both Heikki and Andres for their help running down the specific issue and reviewing the patch.
-
Heikki Linnakangas authored
When a timeline history file is fetched from server, it is initially created with a temporary file name, and renamed to place. However, the temporary file name was constructed using an uninitialized buffer. Usually that meant that the file was created in current directory instead of the target, which usually goes unnoticed, but if the target is on a different filesystem than the current dir, the rename() would fail. Fix that. The second issue is that pg_receivexlog would not take .partial files into account when determining when scanning the target directory for existing WAL files. If the timeline has switched in the server several times in the last WAL segment, and pg_receivexlog is restarted, it would choose a too old starting point. That's not a problem as long as the old WAL segment exists in the server and can be streamed over, but will cause a failure if it's not. Backpatch to 9.3, where this timeline handling code was written. Analysed by Andrew Gierth, bug #8453, based on a bug report on IRC.
-
- 19 Sep, 2013 1 commit
-
-
Robert Haas authored
Per complaint from Andrew Gierth.
-
- 18 Sep, 2013 3 commits
-
-
Fujii Masao authored
Ian Lawrence Barwick
-
Robert Haas authored
Etsuro Fujita
-
Robert Haas authored
Etsuro Fujita
-
- 17 Sep, 2013 1 commit
-
-
Alvaro Herrera authored
This has been unused since commit 8563ccae. Noted by Antonin Houska
-
- 16 Sep, 2013 2 commits
-
-
Alvaro Herrera authored
It seems to make more sense to use "cutoff multixact" terminology throughout the backend code; "freeze" is associated with replacing of an Xid with FrozenTransactionId, which is not what we do for MultiXactIds. Andres Freund Some adjustments by Álvaro Herrera
-
Heikki Linnakangas authored
Bernd Helmle
-
- 15 Sep, 2013 1 commit
-
-
Peter Eisentraut authored
-
- 12 Sep, 2013 1 commit
-
-
Noah Misch authored
Once the administrator has called for an immediate shutdown or a backend crash has triggered a reinitialization, no mere SIGINT or SIGTERM should change that course. Such derailment remains possible when the signal arrives before quickdie() blocks signals. That being a narrow race affecting most PostgreSQL signal handlers in some way, leave it for another patch. Back-patch this to all supported versions.
-
- 11 Sep, 2013 4 commits
-
-
Kevin Grittner authored
Comments and the tests make clear that the intent is to test with and without an index, but there was no index.
-
Bruce Momjian authored
Albe Laurenz
-
Bruce Momjian authored
Josh Kupershmidt
-
Bruce Momjian authored
Gurjeet Singh
-
- 10 Sep, 2013 4 commits
-
-
Bruce Momjian authored
Previously a trailing space was required for \copy ... stdin: copy foo from stdin ; Etsuro Fujita
-
Bruce Momjian authored
"No rows" previously only honored the tuples-only option. Per report from Eli Mesika
-
Fujii Masao authored
The prototype for inval_twophase_postcommit wasn't removed when it's definition was removed in efc16ea5 / the initial HS commit. Andres Freund
-
Peter Eisentraut authored
Before, it would only show schemas that the current user owns. Per discussion, the new behavior is more useful and consistent for PostgreSQL.
-
- 09 Sep, 2013 1 commit
-
-
Robert Haas authored
This allows a 32-bit field to represent an *optional* command ID without a separate flag bit. Andres Freund
-
- 08 Sep, 2013 2 commits
-
-
Michael Meskes authored
Found by Coverity.
-
Michael Meskes authored
-
- 07 Sep, 2013 1 commit
-
-
Bruce Momjian authored
Previously a one-dimensional empty array was returned, but its text representation matched a zero-dimensional array, and there is no way to dump/reload a one-dimensional empty array. BACKWARD INCOMPATIBILITY Per report from elein
-
- 06 Sep, 2013 1 commit
-
-
Noah Misch authored
Doing so was helpful for some Valgrind usage and distracting for other usage. One can achieve the same effect by changing log_statement and pointing both PostgreSQL and Valgrind logging to stderr. Per gripe from Andres Freund.
-
- 05 Sep, 2013 4 commits
-
-
Kevin Grittner authored
Commit 95ef6a34 removed the ability to create rules on an individual column as of 7.3, but left some residual code which has since been useless. This cleans up that dead code without any change in behavior other than dropping the useless column from the catalog.
-
Heikki Linnakangas authored
If the hash table backing a catalog cache becomes too full (fillfactor > 2), enlarge it. A new buckets array, double the size of the old, is allocated, and all entries in the old hash are moved to the right bucket in the new hash. This has two benefits. First, cache lookups don't get so expensive when there are lots of entries in a cache, like if you access hundreds of thousands of tables. Second, we can make the (initial) sizes of the caches much smaller, which saves memory. This patch dials down the initial sizes of the catcaches. The new sizes are chosen so that a backend that only runs a few basic queries still won't need to enlarge any of them.
-
Jeff Davis authored
This reverts commit 269e7808 and commit 5b571bb8. Unfortunately, the initial patch had insufficient performance testing, and resulted in a regression. Per report by Thom Brown.
-
Jeff Davis authored
Make the examples self-contained to avoid confusion. Per bug report 8367 from KOIZUMI Satoru.
-