- 30 4月, 2013 1 次提交
-
-
由 Simon Riggs 提交于
Previous changes misconstrued pg_upgrade internals causing build farm breakages.
-
- 22 3月, 2013 1 次提交
-
-
由 Simon Riggs 提交于
Checksums are set immediately prior to flush out of shared buffers and checked when pages are read in again. Hint bit setting will require full page write when block is dirtied, which causes various infrastructure changes. Extensive comments, docs and README. WARNING message thrown if checksum fails on non-all zeroes page; ERROR thrown but can be disabled with ignore_checksum_failure = on. Feature enabled by an initdb option, since transition from option off to option on is long and complex and has not yet been implemented. Default is not to use checksums. Checksum used is WAL CRC-32 truncated to 16-bits. Simon Riggs, Jeff Davis, Greg Smith Wide input and assistance from many community members. Thank you.
-
- 01 3月, 2013 1 次提交
-
-
由 Alvaro Herrera 提交于
Per gripe from Andres Freund
-
- 12 2月, 2013 1 次提交
-
-
由 Alvaro Herrera 提交于
libpgcommon is a new static library to allow sharing code among the various frontend programs and backend; this lets us eliminate duplicate implementations of common routines. We avoid libpgport, because that's intended as a place for porting issues; per discussion, it seems better to keep them separate. The first use case, and the only implemented by this patch, is pg_malloc and friends, which many frontend programs were already using. At the same time, we can use this to provide palloc emulation functions for the frontend; this way, some palloc-using files in the backend can also be used by the frontend cleanly. To do this, we change palloc() in the backend to be a function instead of a macro on top of MemoryContextAlloc(). This was previously believed to cause loss of performance, but this implementation has been tweaked by Tom and Andres so that on modern compilers it provides a slight improvement over the previous one. This lets us clean up some places that were already with localized hacks. Most of the pg_malloc/palloc changes in this patch were authored by Andres Freund. Zoltán Böszörményi also independently provided a form of that. libpgcommon infrastructure was authored by Álvaro.
-
- 25 1月, 2013 1 次提交
-
-
由 Bruce Momjian 提交于
If the postmaster.pid lock file exists, try starting/stopping the cluster to check if the lock file is valid. Per request from Tom.
-
- 23 1月, 2013 1 次提交
-
-
由 Alvaro Herrera 提交于
This patch introduces two additional lock modes for tuples: "SELECT FOR KEY SHARE" and "SELECT FOR NO KEY UPDATE". These don't block each other, in contrast with already existing "SELECT FOR SHARE" and "SELECT FOR UPDATE". UPDATE commands that do not modify the values stored in the columns that are part of the key of the tuple now grab a SELECT FOR NO KEY UPDATE lock on the tuple, allowing them to proceed concurrently with tuple locks of the FOR KEY SHARE variety. Foreign key triggers now use FOR KEY SHARE instead of FOR SHARE; this means the concurrency improvement applies to them, which is the whole point of this patch. The added tuple lock semantics require some rejiggering of the multixact module, so that the locking level that each transaction is holding can be stored alongside its Xid. Also, multixacts now need to persist across server restarts and crashes, because they can now represent not only tuple locks, but also tuple updates. This means we need more careful tracking of lifetime of pg_multixact SLRU files; since they now persist longer, we require more infrastructure to figure out when they can be removed. pg_upgrade also needs to be careful to copy pg_multixact files over from the old server to the new, or at least part of multixact.c state, depending on the versions of the old and new servers. Tuple time qualification rules (HeapTupleSatisfies routines) need to be careful not to consider tuples with the "is multi" infomask bit set as being only locked; they might need to look up MultiXact values (i.e. possibly do pg_multixact I/O) to find out the Xid that updated a tuple, whereas they previously were assured to only use information readily available from the tuple header. This is considered acceptable, because the extra I/O would involve cases that would previously cause some commands to block waiting for concurrent transactions to finish. Another important change is the fact that locking tuples that have previously been updated causes the future versions to be marked as locked, too; this is essential for correctness of foreign key checks. This causes additional WAL-logging, also (there was previously a single WAL record for a locked tuple; now there are as many as updated copies of the tuple there exist.) With all this in place, contention related to tuples being checked by foreign key rules should be much reduced. As a bonus, the old behavior that a subtransaction grabbing a stronger tuple lock than the parent (sub)transaction held on a given tuple and later aborting caused the weaker lock to be lost, has been fixed. Many new spec files were added for isolation tester framework, to ensure overall behavior is sane. There's probably room for several more tests. There were several reviewers of this patch; in particular, Noah Misch and Andres Freund spent considerable time in it. Original idea for the patch came from Simon Riggs, after a problem report by Joel Jacobson. Most code is from me, with contributions from Marti Raudsepp, Alexander Shulgin, Noah Misch and Andres Freund. This patch was discussed in several pgsql-hackers threads; the most important start at the following message-ids: AANLkTimo9XVcEzfiBR-ut3KVNDkjm2Vxh+t8kAmWjPuv@mail.gmail.com 1290721684-sup-3951@alvh.no-ip.org 1294953201-sup-2099@alvh.no-ip.org 1320343602-sup-2290@alvh.no-ip.org 1339690386-sup-8927@alvh.no-ip.org 4FE5FF020200002500048A3D@gw.wicourts.gov 4FEAB90A0200002500048B7D@gw.wicourts.gov
-
- 09 1月, 2013 1 次提交
-
-
由 Bruce Momjian 提交于
This patch implements parallel copying/linking of files by tablespace using the --jobs option in pg_upgrade.
-
- 03 1月, 2013 1 次提交
-
-
由 Bruce Momjian 提交于
Adjust pg_upgrade page conversion functions (which are not used) to return void so transfer_all_new_dbs can return void.
-
- 02 1月, 2013 1 次提交
-
-
由 Bruce Momjian 提交于
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
-
- 27 12月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
Add pg_upgrade --jobs, which allows parallel dump/restore of databases, which improves performance.
-
- 21 12月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
Because the client encoding might not match the server encoding, pg_upgrade can't allocate NAMEDATALEN bytes for storage of database, relation, and namespace identifiers. Instead pg_strdup() the memory and free it. Also add C comment in initdb.c about safe NAMEDATALEN usage.
-
- 08 12月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
Pg_upgrade displays file names during copy and database names during dump/restore. Andrew Dunstan identified three bugs: * long file names were being truncated to 60 _leading_ characters, which often do not change for long file names * file names were truncated to 60 characters in log files * carriage returns were being output to log files This commit fixes these --- it prints 60 _trailing_ characters to the status display, and full path names without carriage returns to log files. It also suppresses status output to the log file unless verbose mode is used.
-
- 01 12月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
--single-transaction to restore each database schema. This yields performance improvements for databases with many tables. Also, remove split_old_dump() as it is no longer needed.
-
- 15 11月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
existence via open(), rather than collecting a directory listing and looking up matching relfilenode files with sequential scans of the array. This speeds up pg_upgrade by 2x for a large number of tables, e.g. 16k. Per observation by Ants Aasma.
-
- 14 11月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 05 9月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
on Windows. Slightly cleanup log output on Windows given this restriction. Backpatch to 9.2.
-
- 04 9月, 2012 3 次提交
-
-
由 Andrew Dunstan 提交于
-
由 Andrew Dunstan 提交于
pg_upgrade produces a platform-specific script to remove the old directory, but on Windows it has not been making sure that the paths it writes as arguments for rmdir and del use the backslash path separator, which will cause these scripts to fail. The fix is backpatched to Release 9.0.
-
由 Tom Lane 提交于
When starting either an old or new postmaster, force it to place its Unix socket in the current directory. This makes it even harder for accidental connections to occur during pg_upgrade, and also works around some scenarios where the default socket location isn't usable. (For example, if the default location is something other than "/tmp", it might not exist during "make check".) When checking an already-running old postmaster, find out its actual socket directory location from postmaster.pid, if possible. This dodges problems with an old postmaster having a configured location different from the default built into pg_upgrade's libpq. We can't find that out if the old postmaster is pre-9.1, so also document how to cope with such scenarios manually. In support of this, centralize handling of the connection-related command line options passed to pg_upgrade's subsidiary programs, such as pg_dump. This should make future changes easier. Bruce Momjian and Tom Lane
-
- 28 8月, 2012 1 次提交
-
-
由 Alvaro Herrera 提交于
The previous signature made it very easy to pass something other than the printf-format specifier in the corresponding position, without any warning from the compiler. While at it, move some of the escaping, redirecting and quoting responsibilities from the callers into exec_prog() itself. This makes the callsites cleaner.
-
- 08 8月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
4741e9af. This was done by adding an optional second log file parameter to exec_prog(), and closing and reopening the log file between system() calls. Backpatch to 9.2.
-
- 26 7月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
Backpatch to 9.2.
-
- 18 7月, 2012 2 次提交
-
-
由 Tom Lane 提交于
Since the scandir() emulation was taken out of pg_upgrade, there's no longer any need for scandir_file_pattern to exist as a global variable. Replace it with a local in the one remaining function that was making use of it.
-
由 Tom Lane 提交于
Error out on out-of-memory, rather than returning -1, which the sole existing caller wasn't checking for anyway. There doesn't seem to be any use-case for making the caller check for failure here. Detect failure return from readdir(). Use a less platform-dependent method of calculating the entrysize. It's possible, but not yet confirmed, that this explains bug #6733, in which Mike Wilson reports a pg_upgrade crash that did not occur in 9.1. (Note that load_directory is effectively new code in 9.2, at least on platforms that have scandir().) Fix up comments, avoid uselessly using two counters, reduce the number of realloc calls to something sane.
-
- 26 6月, 2012 1 次提交
-
-
由 Heikki Linnakangas 提交于
The xlogid + segno representation of a particular WAL segment doesn't make much sense in pg_resetxlog anymore, now that we don't use that anywhere else. Use the WAL filename instead, since that's a convenient way to name a particular WAL segment. I did this partially for pg_resetxlog in the original xlogid/segno -> uint64 patch, but I neglected pg_upgrade and the docs. This should now be more complete.
-
- 14 6月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
clusters, and make sure the new cluster has no additional users. Backpatch to 9.1.
-
- 11 6月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
commit-fest.
-
- 25 5月, 2012 2 次提交
-
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
start/stop output, to fix file share error reported by Edmund Horner
-
- 24 5月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
Windows, to avoid opening a file by multiple processes.
-
- 11 4月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
default tablespace, but part of a database that is in a user-defined tablespace. Caused "file not found" error during upgrade. Per bug report from Ants Aasma. Backpatch to 9.1 and 9.0.
-
- 17 3月, 2012 2 次提交
-
-
由 Bruce Momjian 提交于
-
由 Bruce Momjian 提交于
optimizer statistics so the cluster can be made available sooner.
-
- 13 3月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
add ability to control permissions of created files have psql echo its queries for easier debugging output four separate log files, and delete them on success add -r/--retain option to keep log files after success make logs file append-only remove -g/-G/-l logging options sugggest tailing appropriate log file on failure enhance -v/--verbose behavior
-
- 06 3月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
right after we restore the schema (a common failure point), and right before we do the link operation. Per suggesgtions from Robert and ^!C^!^@lvaro
-
- 02 1月, 2012 1 次提交
-
-
由 Bruce Momjian 提交于
-
- 18 11月, 2011 2 次提交
-
-
由 Bruce Momjian 提交于
--- we were not using the scandir pattern filtering anyway. This also removes the scandir requirement in configure.
-
由 Bruce Momjian 提交于
-
- 10 10月, 2011 1 次提交
-
-
由 Bruce Momjian 提交于
document its use for config-only directory installs.
-
- 08 10月, 2011 1 次提交
-
-
由 Bruce Momjian 提交于
directory, for config-only directory installs. Only works for PG 9.2+ servers.
-