- 13 Jun, 2012 3 commits
-
-
Tom Lane authored
The simplest way to handle this is just to copy-and-paste the relevant code block in fork_process.c, so that's what I did. (It's possible that something more complicated would be useful to packagers who want to work with either the old or the new API; but at this point the number of such people is rapidly approaching zero, so let's just get the minimal thing done.) Update relevant documentation as well.
-
Bruce Momjian authored
clusters, and make sure the new cluster has no additional users. Backpatch to 9.1.
-
Peter Eisentraut authored
Clarify help (s/return/print/), and explain that this option is for use by other programs, not for user-facing use (it does not print units).
-
- 12 Jun, 2012 5 commits
-
-
Tom Lane authored
Improve commenting, conform to project style for use of ++ etc. No functional changes.
-
Robert Haas authored
Per gripe from Tom Lane.
-
Robert Haas authored
Remove a couple of items that were actually back-patched bug fixes. Add additional details to a couple of items which lacked a description. Improve attributions for a couple of items I was involved with. A few other miscellaneous corrections.
-
Tom Lane authored
Commit aaa6e1de introduced multiple hazards in the case where pg_ctl is executed with neither a -D switch nor any PGDATA environment variable. It would dump core on machines which are unforgiving about printf("%s", NULL), or failing that possibly give a rather unhelpful complaint about being unable to execute "postgres -C", rather than the logically prior complaint about not being told where the data directory is. Edmund Horner's report suggests that there is another, Windows-specific hazard here, but I'm not the person to fix that; it would in any case only be significant when trying to use a config-only PGDATA pointer.
-
- 11 Jun, 2012 3 commits
-
-
Peter Eisentraut authored
getopt_long() allows abbreviating long options, so we might as well give the option the full name, and users can abbreviate it how they like. Do some general polishing of the --help output at the same time.
-
Magnus Hagander authored
This prevents a pg_basebackup backup session that just does a base backup (no xlog involved at all) from becoming the synchronous slave and thus blocking all access while it runs. Also fixes the problem when a higher priority slave shows up it would become the sync standby before it has reached the STREAMING state, by making sure we can only switch to a walsender that's actually STREAMING. Fujii Masao
-
Magnus Hagander authored
To replace it, add -X/--xlog-method that allows the specification of fetch or stream. Do this to avoid unnecessary backwards-incompatiblity. Spotted and suggested by Peter Eisentraut.
-
- 10 Jun, 2012 6 commits
-
-
Bruce Momjian authored
commit-fest.
-
Bruce Momjian authored
-
Magnus Hagander authored
Since the replication protocol deals with TimestampTz, we need to care for the floating point case as well in the frontend tools. Fujii Masao, with changes from Magnus Hagander
-
Magnus Hagander authored
-
Peter Eisentraut authored
-
Simon Riggs authored
-
- 09 Jun, 2012 1 commit
-
-
Simon Riggs authored
-
- 08 Jun, 2012 3 commits
-
-
Simon Riggs authored
When HS startup is deferred because of overflowed subtransactions, ensure that we re-initialize KnownAssignedXids for when both existing and incoming snapshots have non-zero qualifying xids. Fixes bug #6661 reported by Valentine Gogichashvili. Analysis and fix by Andres Freund
-
Robert Haas authored
Dan Farina
-
Peter Eisentraut authored
-
- 07 Jun, 2012 6 commits
-
-
Tom Lane authored
This provides a speedup of about 4X when NBuffers is large enough. There is also a useful reduction in sinval traffic, since we only do CacheInvalidateSmgr() once not once per fork. Simon Riggs, reviewed and somewhat revised by Tom Lane
-
Peter Eisentraut authored
-
Peter Eisentraut authored
-
Tom Lane authored
DropRelFileNodeBuffers, DropDatabaseBuffers, FlushRelationBuffers, and FlushDatabaseBuffers have to scan the whole shared_buffers pool because we have no index structure that would find the target buffers any more efficiently than that. This gets expensive with large NBuffers. We can shave some cycles from these loops by prechecking to see if the current buffer is interesting before we acquire the buffer header lock. Ordinarily such a test would be unsafe, but in these cases it should be safe because we are already assuming that the caller holds a lock that prevents any new target pages from being loaded into the buffer pool concurrently. Therefore, no buffer tag should be changing to a value of interest, only away from a value of interest. So a false negative match is impossible, while a false positive is safe because we'll recheck after acquiring the buffer lock. Initial testing says that this speeds these loops by a factor of 2X to 3X on common Intel hardware. Patch for DropRelFileNodeBuffers by Jeff Janes (based on an idea of Heikki's); extended to the remaining sequential scans by Tom Lane
-
Simon Riggs authored
WALSender now woken up after each background flush by WALwriter, avoiding multi-second replication delay for an all-async commit workload. Replication delay reduced from 7s with default settings to 200ms and often much less, allowing significantly reduced data loss at failover. Andres Freund and Simon Riggs
-
Robert Haas authored
In lazy_scan_heap, we could issue bogus warnings about incorrect information in the visibility map, because we checked the visibility map bit before locking the heap page, creating a race condition. Fix by rechecking the visibility map bit before we complain. Rejigger some related logic so that we rely on the possibly-outdated all_visible_according_to_vm value as little as possible. In heap_multi_insert, it's not safe to clear the visibility map bit before beginning the critical section. The visibility map is not crash-safe unless we treat clearing the bit as a critical operation. Specifically, if the transaction were to error out after we set the bit and before entering the critical section, we could end up writing the heap page to disk (with the bit cleared) and crashing before the visibility map page made it to disk. That would be bad. heap_insert has this correct, but somehow the order of operations got rearranged when heap_multi_insert was added. Also, add some more comments to visibilitymap_test, lazy_scan_heap, and IndexOnlyNext, expounding on concurrency issues. Per extensive code review by Andres Freund, and further review by Tom Lane, who also made the original report about the bogus warnings.
-
- 05 Jun, 2012 5 commits
-
-
Magnus Hagander authored
Found by Fujii Masao
-
Magnus Hagander authored
Noted by Erik Rijkers
-
Magnus Hagander authored
-
Tom Lane authored
The original coding misbehaved if "char" is signed, and also made the extremely poor decision to print control characters literally when trying to complain about them. Report and patch by Shigeru Hanada. In passing, also fix core dump risk in report_parse_error() should the parse state be something other than what it expects.
-
Tom Lane authored
It failed to check for error return from xsltApplyStylesheet(), as reported by Peter Gagarinov. (So far as I can tell, libxslt provides no convenient way to get a useful error message in failure cases. There might be some inconvenient way, but considering that this code is deprecated it's hard to get enthusiastic about putting lots of work into it. So I just made it say "failed to apply stylesheet", in line with the existing error checks.) While looking at the code I also noticed that the string returned by xsltSaveResultToString was never freed, resulting in a session-lifespan memory leak. Back-patch to all supported versions.
-
- 03 Jun, 2012 1 commit
-
-
Tom Lane authored
This is currently only cosmetic, since all the call sites just curl up and die in event of a failure return. It might be important for some future use-case, though, and in any case it quiets warnings from the clang static analyzer (as reported by Anna Zaks). Josh Kupershmidt
-
- 01 Jun, 2012 7 commits
-
-
Bruce Momjian authored
public schema that no longer point to valid shared object libraries, and suggest a solution.
-
Simon Riggs authored
When we allowed read-only transactions to skip assigning XIDs we introduced the possibility that a fully deleted btree page could be reused. This broke the index link sequence which could then lead to indexscans silently returning fewer rows than would have been correct. The actual incidence of silent errors from this is thought to be very low because of the exact workload required and locking pre-conditions. Fix is to remove pages only if index page opaque->btpo.xact precedes RecentGlobalXmin. Noah Misch, reviewed by Simon Riggs
-
Simon Riggs authored
-
Simon Riggs authored
-
Simon Riggs authored
-
Simon Riggs authored
-
Simon Riggs authored
Noted while testing Hot Standby startup.
-