- Dec 04, 2012
-
-
Bruce Momjian authored
executed.
-
Bruce Momjian authored
storage. Have pg_upgrade use it, and enable server options fsync=off and full_page_writes=off. Document that users turning fsync from off to on should run initdb --sync-only. [ Previous commit was incorrectly applied as a git merge. ]
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- Dec 03, 2012
-
-
Andrew Dunstan authored
This reverts commit e2b3c21b.
-
- Dec 02, 2012
-
-
Andrew Dunstan authored
Normally each module is tested in aq database named contrib_regression, which is dropped and recreated at the beginhning of each pg_regress run. This mode, enabled by adding USE_MODULE_DB=1 to the make command line, runs most modules in a database with the module name embedded in it. This will make testing pg_upgrade on clusters with the contrib modules a lot easier. Still to be done: adapt to the MSVC build system. Backpatch to 9.0, which is the earliest version it is reasonably possible to test upgrading from.
-
- Dec 01, 2012
-
-
Bruce Momjian authored
-
Bruce Momjian authored
In pg_upgrade, remove pg_restore's --single-transaction option, as it throws errors in certain cases.
-
Bruce Momjian authored
certain cases.
-
Bruce Momjian authored
status output for dump/restore.
-
- Nov 30, 2012
-
-
Tom Lane authored
It's not safe to examine a shared buffer without any lock.
-
Bruce Momjian authored
--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.
-
Bruce Momjian authored
consistency. Per suggestion from Tom.
-
Andrew Dunstan authored
This removes exisiting PG settings from the environment for pg_upgrade tests, just like pg_regress does.
-
- Nov 29, 2012
-
-
Tom Lane authored
Commit 8cb53654, which introduced DROP INDEX CONCURRENTLY, managed to break CREATE INDEX CONCURRENTLY via a poor choice of catalog state representation. The pg_index state for an index that's reached the final pre-drop stage was the same as the state for an index just created by CREATE INDEX CONCURRENTLY. This meant that the (necessary) change to make RelationGetIndexList ignore about-to-die indexes also made it ignore freshly-created indexes; which is catastrophic because the latter do need to be considered in HOT-safety decisions. Failure to do so leads to incorrect index entries and subsequently wrong results from queries depending on the concurrently-created index. To fix, add an additional boolean column "indislive" to pg_index, so that the freshly-created and about-to-die states can be distinguished. (This change obviously is only possible in HEAD. This patch will need to be back-patched, but in 9.2 we'll use a kluge consisting of overloading the formerly-impossible state of indisvalid = true and indisready = false.) In addition, change CREATE/DROP INDEX CONCURRENTLY so that the pg_index flag changes they make without exclusive lock on the index are made via heap_inplace_update() rather than a normal transactional update. The latter is not very safe because moving the pg_index tuple could result in concurrent SnapshotNow scans finding it twice or not at all, thus possibly resulting in index corruption. This is a pre-existing bug in CREATE INDEX CONCURRENTLY, which was copied into the DROP code. In addition, fix various places in the code that ought to check to make sure that the indexes they are manipulating are valid and/or ready as appropriate. These represent bugs that have existed since 8.2, since a failed CREATE INDEX CONCURRENTLY could leave a corrupt or invalid index behind, and we ought not try to do anything that might fail with such an index. Also fix RelationReloadIndexInfo to ensure it copies all the pg_index columns that are allowed to change after initial creation. Previously we could have been left with stale values of some fields in an index relcache entry. It's not clear whether this actually had any user-visible consequences, but it's at least a bug waiting to happen. In addition, do some code and docs review for DROP INDEX CONCURRENTLY; some cosmetic code cleanup but mostly addition and revision of comments. This will need to be back-patched, but in a noticeably different form, so I'm committing it to HEAD before working on the back-patch. Problem reported by Amit Kapila, diagnosis by Pavan Deolassee, fix by Tom Lane and Andres Freund.
-
- Nov 25, 2012
-
-
Bruce Momjian authored
centralizing error/shutdown code.
-
Bruce Momjian authored
pg_malloc/pg_free.
-
- Nov 19, 2012
-
-
Bruce Momjian authored
error and errno != ENOENT.
-
- Nov 18, 2012
-
-
Tom Lane authored
The previous definitions of these GUC variables allowed them to range up to INT_MAX, but in point of fact the underlying code would suffer overflows or other errors with large values. Reduce the maximum values to something that won't misbehave. There's no apparent value in working harder than this, since very large delays aren't sensible for any of these. (Note: the risk with archive_timeout is that if we're late checking the state, the timestamp difference it's being compared to might overflow. So we need some amount of slop; the choice of INT_MAX/2 is arbitrary.) Per followup investigation of bug #7670. Although this isn't a very significant fix, might as well back-patch.
-
- Nov 15, 2012
-
-
Bruce Momjian authored
-
- Nov 14, 2012
-
-
Bruce Momjian authored
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.
-
Bruce Momjian authored
-
- Nov 12, 2012
-
-
Heikki Linnakangas authored
As pointed out by Alvaro.
-
- Nov 06, 2012
-
-
Bruce Momjian authored
improve performance when restoring the schema from the old cluster. Backpatch to 9.2.
-
- Oct 23, 2012
-
-
Alvaro Herrera authored
... and have sepgsql use it to determine whether to check permissions during certain operations. Indexes that are being created as a result of REINDEX, for instance, do not need to have their permissions checked; they were already checked when the index was created. Author: KaiGai Kohei, slightly revised by me
-
- Oct 20, 2012
-
-
Tom Lane authored
Per Thom Brown.
-
- Oct 18, 2012
-
-
Andrew Dunstan authored
-
- Oct 12, 2012
-
-
Bruce Momjian authored
rather than just storing a pointer.
-
Tom Lane authored
Per compiler warning.
-
- Oct 11, 2012
-
-
Peter Eisentraut authored
Numerous flex and bison make rules have appeared in the source tree over time, and they are all virtually identical, so we can replace them by pattern rules with some variables for customization. Users of pgxs will also be able to benefit from this.
-
Tom Lane authored
The HINTs generated for these error cases vary across builds. We could try to work around that, but the test cases aren't really useful enough to justify taking any trouble. Per buildfarm.
-
- Oct 10, 2012
-
-
Tom Lane authored
dblink now has its own validator function dblink_fdw_validator(), which is better than the core function postgresql_fdw_validator() because it gets the list of legal options from libpq instead of having a hard-wired list. Make the dblink extension module provide a standard foreign data wrapper dblink_fdw that encapsulates use of this validator, and recommend use of that wrapper instead of making up wrappers on the fly. Unfortunately, because ad-hoc wrappers *were* recommended practice previously, it's not clear when we can get rid of postgresql_fdw_validator without causing upgrade problems. But this is a step in the right direction. Shigeru Hanada, reviewed by KaiGai Kohei
-
Bruce Momjian authored
Backpatch to 9.2.
-
- Oct 09, 2012
-
-
Simon Riggs authored
e.g. fsync 2103.613 ops/sec ( 475 microsecs/op) Peter Geoghegan
-
- Oct 03, 2012
-
-
Heikki Linnakangas authored
This allows logging only some fraction of transactions, greatly reducing the amount of log generated. Tomas Vondra, reviewed by Robert Haas and Jeff Janes.
-
Bruce Momjian authored
Backpatch to 9.2.
-
- Oct 02, 2012
-
-
Tom Lane authored
On some platforms these functions return NULL, rather than the more common practice of returning a pointer to a zero-sized block of memory. Hack our various wrapper functions to hide the difference by substituting a size request of 1. This is probably not so important for the callers, who should never touch the block anyway if they asked for size 0 --- but it's important for the wrapper functions themselves, which mistakenly treated the NULL result as an out-of-memory failure. This broke at least pg_dump for the case of no user-defined aggregates, as per report from Matthew Carrington. Back-patch to 9.2 to fix the pg_dump issue. Given the lack of previous complaints, it seems likely that there is no live bug in previous releases, even though some of these functions were in place before that.
-
Tom Lane authored
We had a number of variants on the theme of "malloc or die", with the majority named like "pg_malloc", but by no means all. Standardize on the names pg_malloc, pg_malloc0, pg_realloc, pg_strdup. Get rid of pg_calloc entirely in favor of using pg_malloc0. This is an essentially cosmetic change, so no back-patch. (I did find a couple of places where psql and pg_dump were using plain malloc or strdup instead of the pg_ versions, but they don't look significant enough to bother back-patching.)
-
Bruce Momjian authored
objects does not match between the old and new clusters. Backpatch to 9.2.
-