summaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade
AgeCommit message (Collapse)Author
2012-09-26pg_upgrade test: Disable fsync in initdb and postgres callsPeter Eisentraut
This mirrors the behavior of pg_regress and makes the test run much faster.
2012-09-18pg_upgrade: Remove check for pg_configPeter Eisentraut
It is no longer used, but was still being checked for. bug #7548 from Reinhard Max
2012-09-05In pg_upgrade, try a few times to open a log file.Andrew Dunstan
If we call pg_ctl stop, the server might continue and thus hold a log file for a short time after it has deleted its pid file, (which is when pg_ctl will exit), and so a subsequent attempt to open the log file might fail. We therefore try to open it a few times, sleeping one second between tries, to give the server time to exit. This corrects an error that was observed on the buildfarm. Backpatched to 9.2,
2012-09-05Fix pg_upgrade test script's line end handling on Windows.Andrew Dunstan
Call pg_dumpall using -f switch instead of redirection, to avoid writing the output in text mode and generating spurious carriage returns. Remove to carriage return ignoring hack introduced by commit e442b0f0c6fd26738bafdeb5222511b586dfe4b9. Backpatch to 9.2.
2012-09-05Fix line end mishandling in pg_upgrade on Windows.Andrew Dunstan
pg_upgrade opened the output from pg_dumpall in text mode and wrote the split files in text mode. This caused unwanted eating of intended carriage returns on input and production of spurious carriage returns on output. To avoid this, open all these files in binary mode. On non-Windows platforms, this change has no effect. Backpatch to 9.0. On 9.0 and 9.1, we also switch from redirecting pg_dumpall's output to using pg_dumpall's -f switch, for the same reason.
2012-09-05Silence -Wunused-result warning in contrib/pg_upgrade.Tom Lane
This is just neatnik-ism, but since we do it for comparable code in elog.c, we may as well do it here.
2012-09-05In pg_upgrade, document why we can't issue \n\n in the command logfileBruce Momjian
on Windows. Slightly cleanup log output on Windows given this restriction. Backpatch to 9.2.
2012-09-04Fix transcription error.Andrew Dunstan
2012-09-04Fix command echoing in pg_upgade's analyze script for Windows.Andrew Dunstan
2012-09-03Indent fix_path_separator() header properly.Andrew Dunstan
2012-09-03Allow pg_upgrade "make check" to run on Windows/MSys.Andrew Dunstan
Backpatch to 9.2.
2012-09-03In pg_upgrade, pull the port number from postmaster.pid, like we do forBruce Momjian
socket location. Also, prevent putting the socket in the current directory for pre-9.1 servers in live check and non-live check mode, because pre-9.1 pg_ctl -w can't handle it. Backpatch to 9.2.
2012-09-03Use correct path separator for Windows builtin commands.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.
2012-09-03Fix bugs in exec.c that prevented pg_upgrade working in Windows.Andrew Dunstan
Backpatch to 9.2 - code before that is quite different and should not have these defects.
2012-09-03Fix pg_upgrade to cope with non-default unix_socket_directory scenarios.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
2012-08-27pg_upgrade: Fix exec_prog API to be less flakyAlvaro 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.
2012-08-27Fix thinko in commentAlvaro Herrera
It was confusing symlinks with hard links.
2012-08-27Remove analyze_new_cluster.sh on make clean, tooAlvaro Herrera
2012-08-23pg_upgrade: Run the created scripts in the test suitePeter Eisentraut
Just to check that they actually work.
2012-08-10Prevent pg_upgrade from crashing if it can't write to the currentBruce Momjian
directory. Backpatch to 9.2.
2012-08-07Fix pg_upgrade file share violation on Windows created by the commitBruce Momjian
4741e9afb93f0d769655b2d18c2b73b86f281010. 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.
2012-08-03In pg_upgrade, use pg_log() instead of prep_status() forBruce Momjian
newline-terminated messages, per suggestion from Tom. Backpatch to 9.2.
2012-07-26Simplify pg_upgrade's handling when returning directory listings.Bruce Momjian
Backpatch to 9.2.
2012-07-18Get rid of useless global variable in pg_upgrade.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.
2012-07-18Improve pg_upgrade's load_directory() function.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.
2012-07-06Update pg_upgrade comments for recent configpath fix.Bruce Momjian
2012-07-05Fix PGDATAOLD and PGDATANEW to properly set pgconfig location, perBruce Momjian
report from Tom. Backpatch to 9.2.
2012-07-05pg_upgrade: abstract out copying of files from old cluster to newAlvaro Herrera
Currently only pg_clog is copied, but some other directories could need the same treatment as well, so create a subroutine to do it. Extracted from my (somewhat larger) FOR KEY SHARE patch.
2012-06-29Make the pg_upgrade log files contain actual commandsAlvaro Herrera
Now the log file not only contains the output from commands executed by system(), but also what command it was in the first place. This arrangement makes debugging a lot simpler.
2012-06-28pg_upgrade: fix off-by-one mistake in snprintfAlvaro Herrera
snprintf counts trailing NUL towards the char limit. Failing to account for that was causing an invalid value to be passed to pg_resetxlog -l, aborting the upgrade process.
2012-06-26Fix pg_upgrade, broken by the xlogid/segno -> 64-bit int refactoring.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.
2012-06-18Make documentation of --help and --version options more consistentPeter Eisentraut
Before, some places didn't document the short options (-? and -V), some documented both, some documented nothing, and they were listed in various orders. Now this is hopefully more consistent and complete.
2012-06-15Improve pg_upgrade wording for pg_ctl start failure; could beBruce Momjian
connection failure. Backpatch to 9.2. Per report from Evan D. Hoffman
2012-06-13In pg_upgrade, verify that the install user has the same oid on bothBruce Momjian
clusters, and make sure the new cluster has no additional users. Backpatch to 9.1.
2012-06-10Run pgindent on 9.2 source tree in preparation for first 9.3Bruce Momjian
commit-fest.
2012-06-01In pg_upgrade, report pre-PG 8.1 plpython helper functions left in theBruce Momjian
public schema that no longer point to valid shared object libraries, and suggest a solution.
2012-05-27Improve pg_upgrade C comment.Bruce Momjian
2012-05-27Add C comment explaining why we can't exclude checking functions in theBruce Momjian
pg_catalog schema, even though they are not explicitly dumped (they are implicitly dumped, e.g. create language plperl).
2012-05-27Add pg_update C comment about problems with plpython_call_handler().Bruce Momjian
2012-05-25Have pg_upgrade only use one extra log file for Win32, not two.Bruce Momjian
2012-05-24On Windows, have pg_upgrade use different two files to log pg_ctlBruce Momjian
start/stop output, to fix file share error reported by Edmund Horner
2012-05-23Adjust pg_upgrade to output a separate log file for pg_ctl output onBruce Momjian
Windows, to avoid opening a file by multiple processes.
2012-05-15Remove whitespace from end of linesPeter Eisentraut
pgindent and perltidy should clean up the rest.
2012-05-08Tweak contrib --help output to match common stylePeter Eisentraut
Placeholders such as OPTION are typically kept in singular.
2012-04-23Lots of doc corrections.Robert Haas
Josh Kupershmidt
2012-04-10Fix pg_upgrade to properly upgrade a table that is stored in the clusterBruce 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.
2012-03-27Silence compiler warning about uninitialized variable.Tom Lane
2012-03-20pg_upgrade: Add new generated file to .gitignorePeter Eisentraut
2012-03-19In pg_upgrade, remove dependency on pg_config, as that might not be inBruce Momjian
the non-development install. Instead, use the LOAD mechanism to check for the pg_upgrade_support shared object, like we do for other shared object checks. Backpatch to 9.1. Report from Àlvaro
2012-03-17In pg_upgrade, move new echo quote define into include file.Bruce Momjian