- 27 6月, 2011 1 次提交
-
-
由 Robert Haas 提交于
It's been like this since HOT was originally introduced, but the logic is complex enough that this is a recipe for bugs, as we've already found out with SSI. So refactor heap_hot_search_buffer() so that it can satisfy the needs of index_getnext(), and make index_getnext() use that rather than duplicating the logic. This change was originally proposed by Heikki Linnakangas as part of a larger refactoring oriented towards allowing index-only scans. I extracted and adjusted this part, since it seems to have independent merit. Review by Jeff Davis.
-
- 22 6月, 2011 2 次提交
-
-
由 Robert Haas 提交于
This involves two main changes from the previous behavior. First, when we set a bit in the visibility map, emit a new WAL record of type XLOG_HEAP2_VISIBLE. Replay sets the page-level PD_ALL_VISIBLE bit and the visibility map bit. Second, when inserting, updating, or deleting a tuple, we can no longer get away with clearing the visibility map bit after releasing the lock on the corresponding heap page, because an intervening crash might leave the visibility map bit set and the page-level bit clear. Making this work requires a bit of interface refactoring. In passing, a few minor but related cleanups: change the test in visibilitymap_set and visibilitymap_clear to throw an error if the wrong page (or no page) is pinned, rather than silently doing nothing; this case should never occur. Also, remove duplicate definitions of InvalidXLogRecPtr. Patch by me, review by Noah Misch.
-
由 Peter Eisentraut 提交于
-
- 16 6月, 2011 2 次提交
-
-
由 Heikki Linnakangas 提交于
Kevin Grittner
-
由 Simon Riggs 提交于
Btree pages were recycled after VACUUM deletes all records on a page and then a subsequent VACUUM occurs after the RecentXmin horizon is reached. Using RecentXmin meant that we did not respond correctly to the user controls provide to avoid Hot Standby conflicts and so spurious conflicts could be generated in some workload combinations. We now reuse pages only when we reach RecentGlobalXmin, which can be much later in the presence of long running queries and is also controlled by vacuum_defer_cleanup_age and hot_standby_feedback. Noah Misch and Simon Riggs
-
- 15 6月, 2011 1 次提交
-
-
由 Heikki Linnakangas 提交于
snapshots, like in REINDEX, are basically non-transactional operations. The DDL operation itself might participate in SSI, but there's separate functions for that. Kevin Grittner and Dan Ports, with some changes by me.
-
- 14 6月, 2011 1 次提交
-
-
由 Heikki Linnakangas 提交于
renumbered the resource managers. This should fix the buildfarm..
-
- 11 6月, 2011 1 次提交
-
-
由 Tom Lane 提交于
ReadRecord's habit of using both direct references to tmpRecPtr and references to *RecPtr (which is pointing at tmpRecPtr) triggers an optimization bug in gcc 4.6.0, which apparently has forgotten about aliasing rules. Avoid the compiler bug, and make the code more readable to boot, by getting rid of the direct references. Improve the comments while at it. Back-patch to all supported versions, in case they get built with 4.6.0. Tom Lane, with some cosmetic suggestions from Alex Hunsaker
-
- 10 6月, 2011 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 01 6月, 2011 1 次提交
-
-
由 Tom Lane 提交于
Apparently sane-looking penalty code might return small negative values, for example because of roundoff error. This will confuse places like gistchoose(). Prevent problems by clamping negative penalty values to zero. (Just to be really sure, I also made it force NaNs to zero.) Back-patch to all supported branches. Alexander Korotkov
-
- 31 5月, 2011 1 次提交
-
-
由 Heikki Linnakangas 提交于
On further analysis, it turns out that it is not needed to duplicate predicate locks to the new row version at update, the lock on the version that the transaction saw as visible is enough. However, there was a different bug in the code that checks for dangerous structures when a new rw-conflict happens. Fix that bug, and remove all the row-version chaining related code. Kevin Grittner & Dan Ports, with some comment editorialization by me.
-
- 19 5月, 2011 1 次提交
-
-
由 Peter Eisentraut 提交于
-
- 12 5月, 2011 1 次提交
-
-
由 Alvaro Herrera 提交于
-
- 11 5月, 2011 1 次提交
-
-
由 Heikki Linnakangas 提交于
just check that it's not running and PANIC if it was, but that can rightfully happen if recovery stops at recovery target.
-
- 07 5月, 2011 1 次提交
-
-
由 Tom Lane 提交于
The SSI patch inserted a call of RegisterPredicateLockingXid into GetNewTransactionId, which was a bad idea on a couple of grounds. First, it's not necessary to hold XidGenLock while manipulating that shared memory, and doing so is bad because XidGenLock is a high-contention lock that should be held for as short a time as possible. (Not to mention that it adds an entirely unnecessary deadlock hazard, since we must take SerializableXactHashLock as well.) Second, the specific place where it was put was between extending CLOG and advancing nextXid, which could result in unpleasant behavior in case of a failure there. Pull the call out to AssignTransactionId, which is much safer and arguably better from a modularity standpoint too. There is more work to do to clean up the failure-before-advancing-nextXid issue, but that is a separate change that will need to be back-patched. So for the moment I just want to make GetNewTransactionId look the same as it did in prior versions.
-
- 25 4月, 2011 1 次提交
-
-
由 Robert Haas 提交于
Bug #5899, reported by Marko Tiikkaja. Heikki Linnakangas, reviewed by Kevin Grittner and Dan Ports.
-
- 24 4月, 2011 1 次提交
-
-
由 Tom Lane 提交于
Per experimentation with contrib/citext, whose hash function assumes that it'll be passed a collation.
-
- 23 4月, 2011 2 次提交
-
-
由 Tom Lane 提交于
Experimentation with contrib/btree_gist shows that the majority of the GIST support functions potentially need collation information. Safest policy seems to be to pass it to all of them, instead of making assumptions about which ones could possibly need it.
-
由 Tom Lane 提交于
This patch is almost entirely cosmetic --- mostly cleaning up a lot of neglected comments, and fixing code layout problems in places where the patch made lines too long and then pgindent did weird things with that. I did find a bug-of-omission in equalTupleDescs().
-
- 18 4月, 2011 1 次提交
-
-
由 Robert Haas 提交于
Before commit c016ce72, this wasn't needed, but now that multiple resource manager IDs can percolate down through here, we have to make sure we know which one we've got. Otherwise, we can confuse (for example) an XLOG_XACT_COMMIT record with an XLOG_CHECKPOINT_SHUTDOWN record. Review by Jaime Casanova
-
- 17 4月, 2011 1 次提交
-
-
由 Tom Lane 提交于
This might have caught the recent embarrassment over trying to modify pg_index while its indexes were being rebuilt. Noah Misch
-
- 14 4月, 2011 1 次提交
-
-
由 Heikki Linnakangas 提交于
crash recovery, and throw an error if not. hubert depesz lubaczewski pointed out that that situation also happens in the crash recovery following a system crash that happens during an online backup. We might want to do something smarter in 9.1, like put the check back for backups taken with pg_basebackup, but that's for another patch.
-
- 13 4月, 2011 1 次提交
-
-
由 Tom Lane 提交于
Since collation is effectively an argument, not a property of the function, FmgrInfo is really the wrong place for it; and this becomes critical in cases where a cached FmgrInfo is used for varying purposes that might need different collation settings. Fix by passing it in FunctionCallInfoData instead. In particular this allows a clean fix for bug #5970 (record_cmp not working). This requires touching a bit more code than the original method, but nobody ever thought that collations would not be an invasive patch...
-
- 12 4月, 2011 1 次提交
-
-
由 Peter Eisentraut 提交于
This warning is new in gcc 4.6 and part of -Wall. This patch cleans up most of the noise, but there are some still warnings that are trickier to remove.
-
- 10 4月, 2011 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 09 4月, 2011 1 次提交
-
-
由 Tom Lane 提交于
Honor index column's collation spec if there is one, don't go to the expense of calling get_typcollation when we can reasonably assume that all GIN storage types will use default collation, and be sure to set a collation for the comparePartialFn too.
-
- 07 4月, 2011 1 次提交
-
-
由 Tom Lane 提交于
The previous functions of assign hooks are now split between check hooks and assign hooks, where the former can fail but the latter shouldn't. Aside from being conceptually clearer, this approach exposes the "canonicalized" form of the variable value to guc.c without having to do an actual assignment. And that lets us fix the problem recently noted by Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus log messages about "parameter "wal_buffers" cannot be changed without restarting the server". There may be some speed advantage too, because this design lets hook functions avoid re-parsing variable values when restoring a previous state after a rollback (they can store a pre-parsed representation of the value instead). This patch also resolves a longstanding annoyance about custom error messages from variable assign hooks: they should modify, not appear separately from, guc.c's own message about "invalid parameter value".
-
- 05 4月, 2011 2 次提交
-
-
由 Simon Riggs 提交于
Also avoid hardcoding the current default state by giving it the name "on" and replace with a meaningful name that reflects its behaviour. Coding only, no change in behaviour.
-
由 Robert Haas 提交于
This means one less thing to configure when setting up synchronous replication, and also avoids some ambiguity around what the behavior should be when the settings of these variables conflict. Fujii Masao, with additional hacking by me.
-
- 31 3月, 2011 1 次提交
-
-
由 Heikki Linnakangas 提交于
-
- 30 3月, 2011 1 次提交
-
-
由 Heikki Linnakangas 提交于
archive recovery. It's possible to restore an online backup without recovery.conf, by simply copying all the necessary WAL files to pg_xlog. "pg_basebackup -x" does that too. That's the use case where this cross-check is useful. Backpatch to 9.0. We used to do this in earlier versins, but in 9.0 the code was inadvertently changed so that the check is only performed after archive recovery. Fujii Masao.
-
- 27 3月, 2011 1 次提交
-
-
由 Tom Lane 提交于
I found actual bugs in GiST and plpgsql; the rest of this is cosmetic but meant to decrease the odds of future bugs of omission.
-
- 24 3月, 2011 1 次提交
-
-
由 Simon Riggs 提交于
Change location LOG message so it works each time we pause, not just for final pause. Ensure that we pause only if we are in Hot Standby and can connect to allow us to run resume function. This change supercedes the code to override parameter recoveryPauseAtTarget to false if not attempting to enter Hot Standby, which is now removed.
-
- 23 3月, 2011 1 次提交
-
-
由 Simon Riggs 提交于
Startup process waited for cleanup lock but when hot_standby = off the pid was not registered, so that the bgwriter would not wake the waiting process as intended.
-
- 21 3月, 2011 1 次提交
-
-
由 Heikki Linnakangas 提交于
ensure that they use different checkpoints as the starting point. We use the checkpoint redo location as a unique identifier for the base backup in the end-of-backup record, and in the backup history file name. Bug spotted by Fujii Masao.
-
- 20 3月, 2011 1 次提交
-
-
由 Tom Lane 提交于
All expression nodes now have an explicit output-collation field, unless they are known to only return a noncollatable data type (such as boolean or record). Also, nodes that can invoke collation-aware functions store a separate field that is the collation value to pass to the function. This avoids confusion that arises when a function has collatable inputs and noncollatable output type, or vice versa. Also, replace the parser's on-the-fly collation assignment method with a post-pass over the completed expression tree. This allows us to use a more complex (and hopefully more nearly spec-compliant) assignment rule without paying for it in extra storage in every expression node. Fix assorted bugs in the planner's handling of collations by making collation one of the defining properties of an EquivalenceClass and by converting CollateExprs into discardable RelabelType nodes during expression preprocessing.
-
- 18 3月, 2011 2 次提交
-
-
由 Robert Haas 提交于
Without this, the startup process goes into a tight loop, consuming 100% of one CPU and failing to respond to interrupts.
-
由 Robert Haas 提交于
Fujii Masao, but with the proposed behavior change reverted, and the rest adjusted accordingly.
-
- 11 3月, 2011 2 次提交
-
-
由 Bruce Momjian 提交于
opposed to O_DSYNC.
-
由 Robert Haas 提交于
Fujii Masao
-