20 Commits

Author SHA1 Message Date
Masahiko Sawada
f6c1304c36 Change the option name to no-kill-backend.
For consistency with other slimilar option such as no-order,
no-analyze.
2017-02-22 03:49:04 +00:00
Masahiko Sawada
34c6506f54 Introduce --dont-kill-backend option.
pg_repack needs to take an exclusive lock at the end of the
reorganization. If the lock cannot be taken after duration
--wait-timeout option specified and this option is true,
pg_repack gives up to repack a target table instead of
cancelling conflicting backend. False by default.
2017-01-24 14:47:00 +09:00
Josh Kupershmidt
4002b4e18f Add a variant expected output for the 'repack' regression test
so that older versions of Postgres (pre-c7e27bec) will still
pass tests.

Also fix the 'tablespace' test the same way.
2016-01-24 17:54:48 -05:00
amit
ab70a010a5 Fix regression test output.
Upstream changes now cause reloption values to be emitted with surrounding
quotes. That breaks, for example, the output of \d commands in one of the
tests.
2016-01-19 09:30:10 +09:00
bwtakacy
aff4610d71 Add a expected out file to run the repack regression test successfully.
The 'repack' regression test fails on PostgreSQL 8.4 because the index name
assigned implicitely is different from 9.0 and after.
2015-01-14 15:47:43 +09:00
Josh Kupershmidt
080ebd3ed6 Bump up Copyright notices for 2015 2015-01-11 19:01:37 -05:00
Andrew Dunstan
db4ec04cf2 Do get_indexdef calls while the table is already locked.
These calls can require an access share lock on the table, which might
conflict with an existing or later acquires lock. So perform these calls
while we already have an exclusive lock on the table. This unfortuantely
means that we ave to remove the constness of the table parameter to
repack_one_table, as it is not modifying the table object to set up the
indexes.
2014-12-30 16:48:06 -05:00
Andrew Dunstan
9f77a2fd03 Gather index info at the same time as table info, rather than later.
This helps avoid possible problems with later strong table locks.
2014-12-30 10:48:35 -05:00
Josh Kupershmidt
649e72c0a4 Add some ORDER BYs to queries fetching lists of tables/indexes
to be repacked, in order to ensure consistent installcheck results.
2014-05-26 20:57:28 -04:00
Josh Kupershmidt
f0cd787bf5 Merge in Pull Request #20 from Steeve Lennmark.
Adds support for repacking only the tables in a specified schema. This
doesn't support --only-indexes mode, but that seems alright for now.

Fix merge conflicts, and make a few tweaks along the way:
 * bump version to 1.3-dev0
 * add Beena to list of maintainers
 * documentation wordsmithing
 * fix up the INFO message printed for each index in --index or
   --only-indexes mode, so that it is only printed once per index, and
   prints the name of the original index, not that of the transient
   index_%u name.
2014-05-24 15:42:24 -04:00
schmiddy
4eb1cef99e Make the 'repacking index ...' message be displayed
for indexes-only repacks (not just when in dry-run mode).
2014-05-24 00:09:03 -04:00
Steeve Lennmark
f094795178 Clean up tests and fix regression
It was possible to specify both --schema and --table which probably
-should- be legal but would need some code to be rewritten. This patch
adds a check that both can't be specified and returns an error telling
the user to use schema.table notation instead. A regression test
checking this behaviour was added.
2014-01-31 08:22:12 +00:00
Steeve Lennmark
d16bdc20d2 Add test for --dry-run
This should probably be rewritten to actually check OID on old/new tables so
that we don't accidentally execute repack during a dry run.
2014-01-30 12:53:48 +00:00
Steeve Lennmark
9b381f5b85 Add second test that tests multiple --schema args 2014-01-30 12:27:32 +00:00
Steeve Lennmark
e7b6719256 Add test for --schema (-c) 2014-01-30 12:19:21 +00:00
Josh Kupershmidt
27ea0fabe4 Several documentation updates for the pending 1.2 release:
* More mentions of new --only-indexes feature
 * Note we now support up to Postgres 9.3, and get rid of outdated list
   of supported operating systems. (As far as we know, pg_repack should
   build on any platforms supported by PostgreSQL itself, although no one
   has tested the Windows build in a long time.)
 * Remove most of the warnings about data corruption possible with concurrent
   DDL: this should no longer be a concern now that we hold an ACCESS SHARE
   lock during full-table repacks. Keep a short warning about old versions
   being susceptible to this problem, just to make clear that it's fixed now
   and as an enticement to upgrade.
 * A few grammar, phrasing, and typo fixes
2013-07-05 21:02:28 -04:00
Josh Kupershmidt
03015f8ee8 Regression tests for the new indexes-repacking features.
Patch from Beena Emerson.
2013-07-04 09:47:31 -04:00
Josh Kupershmidt
b804c150ac Fix existing 'tablespace' regression test so it passes again.
Changes to repack_indexdef() had broken this test.
2013-06-22 06:47:06 -04:00
Josh Kupershmidt
95ce24c2a0 More sed tweaks to Makefile for portability.
The -E flag to specify extended regular expressions apparently is
not portable to all platforms, such as CentOS 4.5. Use an uglier
but hopefully more portable basic regular expression in Makefiles.
2013-05-21 21:45:47 -04:00
Josh Kupershmidt
dc31920616 Move regression tests from ./bin/ to ./regress/ 2013-05-09 21:15:48 -04:00