Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-14Move pg_upgrade from contrib/ to src/bin/Peter Eisentraut
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2015-04-14Integrate pg_upgrade_support module into backendPeter Eisentraut
Previously, these functions were created in a schema "binary_upgrade", which was deleted after pg_upgrade was finished. Because we don't want to keep that schema around permanently, move them to pg_catalog but rename them with a binary_upgrade_... prefix. The provided functions are only small wrappers around global variables that were added specifically for pg_upgrade use, so keeping the module separate does not create any modularity. The functions still check that they are only called in binary upgrade mode, so it is not possible to call these during normal operation. Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
2015-01-06Update copyright for 2015Bruce Momjian
Backpatch certain files through 9.0
2014-06-30pg_upgrade: update C comments about pg_dumpallBruce Momjian
There were some C comments that hadn't been updated from the switch of using only pg_dumpall to using pg_dump and pg_dumpall, so update them. Also, don't bother using --schema-only for pg_dumpall --globals-only. Backpatch through 9.4
2014-05-06pgindent run for 9.4Bruce Momjian
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
2014-01-07Update copyright for 2014Bruce Momjian
Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
2013-10-10pg_upgrade: Split off pg_fatal() from pg_log()Peter Eisentraut
This allows decorating pg_fatal() with noreturn compiler hints, leading to better diagnostics. Reviewed-by: Marko Tiikkaja <marko@joh.to>
2013-05-14pg_upgrade: Replace tabs in output string constants by spacesPeter Eisentraut
2013-02-12Create libpgcommon, and move pg_malloc et al to itAlvaro 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.
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
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-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-12In pg_upgrade, add various logging improvements: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
2012-01-25Now that the shared library name can be adjusted in the library test,Bruce Momjian
have pg_upgrade allocate a maximum fixed size buffer for testing the library file name, rather than base the allocation on the library name. Backpatch to 9.1.
2012-01-25Improve plpython fix comment in pg_upgrade.Bruce Momjian
2012-01-25In pg_upgrade, when checking for the plpython library, we must check forBruce Momjian
"plpython2" when upgrading from pre-PG 9.1. Patch to head and 9.1. Per report from Peter.
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-11-01Allow pg_upgrade to upgrade an old cluster that doesn't have aBruce Momjian
'postgres' database.
2011-08-27Add postgres.h to *.c files for pg_upgrade, ltree, and btree_gist, andBruce Momjian
remove from local *.h files. Per suggestion from Alvaro.
2011-07-12Make pg_upgrade output more consistent with project stylePeter Eisentraut
Add errno-based output to error messages where appropriate, reformat blocks to about 72 characters per line, use spaces instead of tabs for indentation, and other style adjustments.
2011-04-10pgindent run before PG 9.1 beta 1.Bruce Momjian
2011-02-10Fix pg_upgrade to handle extensions.Tom Lane
This follows my proposal of yesterday, namely that we try to recreate the previous state of the extension exactly, instead of allowing CREATE EXTENSION to run a SQL script that might create some entirely-incompatible on-disk state. In --binary-upgrade mode, pg_dump won't issue CREATE EXTENSION at all, but instead uses a kluge function provided by pg_upgrade_support to recreate the pg_extension row (and extension-level pg_depend entries) without creating any member objects. The member objects are then restored in the same way as if they weren't members, in particular using pg_upgrade's normal hacks to preserve OIDs that need to be preserved. Then, for each member object, ALTER EXTENSION ADD is issued to recreate the pg_depend entry that marks it as an extension member. In passing, fix breakage in pg_upgrade's enum-type support: somebody didn't fix it when the noise word VALUE got added to ALTER TYPE ADD. Also, rationalize parsetree representation of COMMENT ON DOMAIN and fix get_object_address() to allow OBJECT_DOMAIN.
2011-01-08In pg_upgrade, remove functions that did sequential array scans lookingBruce Momjian
up relations, but rather order old/new relations and use the same array index value for both. This should speed up pg_upgrade for databases with many relations.
2011-01-08In pg_upgrade, clarify use of install_db_support_functions().Bruce Momjian
2011-01-08Fix C indenting in pg_upgrade function.Bruce Momjian
2011-01-08Fix pg_upgrade of large object permissions by preserving pg_auth.oid,Bruce Momjian
which is stored in pg_largeobject_metadata. No backpatch to 9.0 because you can't migrate from 9.0 to 9.0 with the same catversion (because of tablespace conflict), and a pre-9.0 migration to 9.0 has not large object permissions to migrate.
2011-01-08Force pg_upgrade's to preserve pg_class.oid, not pg_class.relfilenode.Bruce Momjian
Toast tables have identical pg_class.oid and pg_class.relfilenode, but for clarity it is good to preserve the pg_class.oid. Update comments regarding what is preserved, and do some variable/function renaming for clarity.
2011-01-06Rename pg_upgrade variables, for clarity.Bruce Momjian
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2011-01-01In pg_upgrade, remove use of whichCluster, and just pass old/new clusterBruce Momjian
pointers, which simplifies the code. This was not possible in 9.0 because everything was in a single nested struct, but is possible now. Per suggestion from Tom.
2010-10-25Allow new values to be added to an existing enum type.Tom Lane
After much expenditure of effort, we've got this to the point where the performance penalty is pretty minimal in typical cases. Andrew Dunstan, reviewed by Brendan Jurd, Dean Rasheed, and Tom Lane
2010-10-19Pgindent run on pg_upgrade source after restructuring.Bruce Momjian
2010-10-19Restructure the pg_upgrade code to use several global structures ratherBruce Momjian
than packing everything into 'ctx' and passing that to every function.
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-07-25Prevent pg_upgrade from migrating databases that use reg* data typesBruce Momjian
where the oid is not preserved by pg_upgrade (everything but pg_type). Update documentation. Per bug report from depstein@alliedtesting.com.
2010-07-03Make pg_upgrade copyrights just 2010, not 2010-2010.Bruce Momjian
2010-07-03Add copyrights to pg_upgrade and pg_upgrade_tools files, per Tom.Bruce Momjian
2010-07-03Add CVS tags to pg_upgrade and pg_upgrade_support files, per requestBruce Momjian
from Tom.
2010-06-12Have pg_upgrade create its output files in the current directory, ratherBruce Momjian
than in a subdirectory of the $HOME directory, or $TMP in Windows.
2010-05-13Move pg_upgrade shared library out into its own /contrib directoryBruce Momjian
(pg_upgrade_support).
2010-05-12Add pg_upgrade to /contrib; will be in 9.0 beta2.Bruce Momjian
Add documentation. Supports migration from PG 8.3 and 8.4.