456 Commits

Author SHA1 Message Date
Josh Kupershmidt
87dca1c85c Merge pull request #59 from bwtakacy/change_exit_code
Change exit code for --help and --version.
2015-11-30 10:14:46 -05:00
bwtakacy
70eac9ee06 Change exit code for --help and --version.
Previously, it is 1 but the reason is not clear.
It seems to be a historical one because pg_reorg
has the same exit codes.
2015-11-26 21:51:09 +09:00
amit
94232991b9 Expand a comment in repack_drop().
Previous text did not sufficiently explain why taking a lock on the
target table would be necessary.
2015-11-09 15:23:45 +09:00
amit
5317f527f4 Make repack_drop() processing robust against deadlocks.
Concurrent activity on the target table can cause deadlocks when
repack_drop() is doing its job, ie, dropping the temporary objects
created. It is highly likely to occur when pg_repack is interrupted
midway through its processing.
2015-11-06 17:10:13 +09:00
Josh Kupershmidt
20a679b7fb Merge branch 'decibel-Fix-repack_apply-count-bug' 2015-10-14 09:39:55 -04:00
Josh Kupershmidt
5476a416fc Merge branch 'Fix-repack_apply-count-bug' of https://github.com/decibel/pg_repack into decibel-Fix-repack_apply-count-bug 2015-10-14 09:39:46 -04:00
Josh Kupershmidt
f564292e6e Merge branch 'bwtakacy-remove_build_warn' 2015-10-14 09:37:34 -04:00
Josh Kupershmidt
b53b1832bc Merge branch 'remove_build_warn' of https://github.com/bwtakacy/pg_repack into bwtakacy-remove_build_warn 2015-10-14 09:34:09 -04:00
Josh Kupershmidt
f258925f23 .gitignore tweak 2015-10-14 09:11:50 -04:00
Jim Nasby
0e24283856 repack_apply(): Use default if count is negative
Per documentation, a negative value for count should result in using DEFAULT_PEEK_COUNT.
2015-10-11 16:39:35 -05:00
bwtakacy
c3960cd118 Include a new header file to build with PostgreSQL 9.5
By commit 7b1c2a0f2066672b24f6257ec9b8d78a1754f494 in PostgreSQL,
builtins.h is splitted to a new header file ruleutils.h.
The usage of pg_get_indexdef_string in lib/repack.c is affected.
2015-10-09 13:15:30 +09:00
Josh Kupershmidt
f255a4175d Bump version to 1.3.2 2015-08-13 22:15:30 -04:00
Josh Kupershmidt
facbcf90dd Wrong precedence for these chained less-than / greater-thans. 2015-07-24 07:27:30 -04:00
Josh Kupershmidt
949c0ad150 Avoid symbol conflict causing segfault when pg_statsinfo is installed.
Control symbol visibility for functions exported in the pg_repack
shared library, to avoid symbol conflicts with other libraries,
particularly those which may be loaded via shared_preload_libraries
and use conflicting function definitions of our common pgut code,
such as pg_statsinfo.

Verified this fix on my Debian x86_64 machine with PostgreSQL 9.4 and
pg_statsinfo 3.0.2. Would be nice to test this fix on a few other
platforms such as OS X, though I had some difficulty getting
pg_statsinfo to build on OS X. Hopefully closes Issue #43, thanks
to bwtakacy for the report and demonstration of the commited fix in
pg_reorg.
2015-05-31 18:59:05 -04:00
Josh Kupershmidt
70cc5769c9 Remember to free repacked_indexes. 2015-05-29 21:18:45 -04:00
Josh Kupershmidt
a8409dd624 Merge branch 'amitlan-master' 2015-05-27 21:38:26 -04:00
Josh Kupershmidt
ffb1980ce4 Remove remaining pgut_strdup() uses in favor of num_buff,
so no more of those tiny leaks.
2015-05-27 21:33:34 -04:00
amit
775a97dbd9 Get rid of hacky usage of pgut_strdup() in utoa.
From inspecting the call sites of utoa, it appears that some of them
(especially the recent cleanup patch which added the strdup there) wanted
to prevent overwriting a local variable by repeated call (to utoa) using
the same variable as argument. This commit instead makes such call sites
strdup the variable itself before passing it to utoa. That seems cleaner
considering that it does not seem utoa's contract to do so (strdup its
parameter that is).
2015-05-27 11:11:15 +09:00
Josh Kupershmidt
d3a99db9f9 Merge branch 'kotsachin-master' 2015-05-25 17:26:31 -04:00
Josh Kupershmidt
8fc8b656a2 Some comments about our new atexit handling. 2015-05-25 16:56:44 -04:00
Josh Kupershmidt
b6b6a8bfb3 Merge branch 'master' of https://github.com/kotsachin/pg_repack into kotsachin-master 2015-05-25 10:59:32 -06:00
kotsachin
8a0466e4c2 Some improvements and fixes to previously submitted pull request for cleaning temporary objects 2015-05-25 18:14:47 +09:00
Josh Kupershmidt
13e359171b Remove outdated comment about missing 9.4 support. 2015-05-23 16:27:47 -04:00
Josh Kupershmidt
618d2f4783 Merge branch 'terrorobe-patch-1' 2015-05-19 20:11:01 -04:00
Josh Kupershmidt
8fe2cf1296 Some further fixes/cleanup/wordsmithing of the doc changes. 2015-05-19 20:10:25 -04:00
Michael Renner
c375c2009d wording 2015-05-13 14:47:56 +02:00
Michael Renner
c28d6624ef Document pg_repack behavior 2015-05-13 11:59:21 +02:00
Josh Kupershmidt
39cc3b474d Use pgut_strdup() instead of strdup(). 2015-05-04 21:21:16 -04:00
Josh Kupershmidt
4e69428700 Merge branch 'master' of https://github.com/kotsachin/pg_repack into kotsachin-master 2015-05-01 15:30:34 -04:00
Josh Kupershmidt
dec54f05b0 Merge branch 'bwtakacy-change-log-level' 2015-05-01 15:27:36 -04:00
bwtakacy
6afbaaa012 Change log level as noted in documentation.
If there are two concurrent pg_repack commands are run on the same
table, the one starting later fails with error message:
Another pg_repack command may be running on the table. Please try again.
The document says this is shown as ERROR, but actualy is WARNING.
2015-04-27 15:48:38 +09:00
kotsachin
ad109edb5b This patch contains repack_cleanup_callback() which calls to repack_drop() for cleaning temporary objects. repack_cleanup_callback() will be pushed on stack using pgut_atexit_push() at beginning so that it will pop on abort or exit of program.
This patch includes one global counter (temp_obj_num) which counts number of temporary objects created by pg_repack. Correct order of deletion of temporary object as per count avoids unintentional error messages.
2015-04-17 13:07:01 +09:00
Daniele Varrazzo
f4703be524 Mention PG 9.4 support in the docs 2015-03-10 16:35:25 +00:00
Daniele Varrazzo
19d85eb997 Release number bumped to 1.3.1
To be tested with older pg versions now.
2015-03-10 15:23:10 +00:00
Daniele Varrazzo
4065470982 Merge branch 'pg94' 2015-03-10 15:22:00 +00:00
Daniele Varrazzo
f76fef94b6 More complete changes list for release 1.3.0 2015-03-10 15:21:06 +00:00
Daniele Varrazzo
74621ec3f6 Document PG 9.4 is supported 2015-03-10 14:59:52 +00:00
Daniele Varrazzo
a49bb41822 Dropped use of reltoastidxid field
The same index can be reached going through reltoastrelid and
pg_index.indrelid: checked at least on PG 9.1.
2015-03-10 14:53:49 +00:00
Daniele Varrazzo
564f061beb Use the right appendStringInfoVA interface
pgut version renamed to avoid confusion with the server version.

(I wonder why there is such a duplication of interfaces and
implementations there though...)
2015-03-10 11:48:16 +00:00
Daniele Varrazzo
5e47c4c9c0 Dropped makefile guard against PG 9.4 2015-03-10 11:23:40 +00:00
Josh Kupershmidt
779fd82ddb Bump version to 1.3.0 (stable). 2015-02-26 21:17:49 -05:00
Josh Kupershmidt
859af29061 Bump version to 1.3.0-beta1 2015-01-26 20:45:20 -05:00
Josh Kupershmidt
493e763fd7 Merge branch 'bwtakacy-develop' 2015-01-26 19:39:55 -05:00
Josh Kupershmidt
9beefb6324 Merge branch 'develop' of https://github.com/bwtakacy/pg_repack into bwtakacy-develop 2015-01-26 19:37:20 -05:00
Josh Kupershmidt
ad5ee75215 Merge branch 'bwtakacy-modify_error_message' 2015-01-26 19:26:13 -05:00
Josh Kupershmidt
de8853b241 Wordsmith error message when repack_one_database() fails. 2015-01-26 19:21:27 -05:00
bwtakacy
49e542a0b6 Improve error message when repack against non-existing table.
Previously, pg_repack shows "ERROR: ERROR: relation foo does not
exist" when specify non-existing table. Though the first ERROR
is from pg_repack and the second ERROR is from PostgreSQL server,
some users might think that pg_repack shows error level twice
wrongly.
2015-01-16 10:21:17 +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
Daniele Varrazzo
3920a5e5cd Freecode is no more
See http://freecode.com/about
2015-01-13 16:13:07 +00:00
Josh Kupershmidt
ef4dc5a1fb Tweak apply_log() loop so that we don't wait until getting
all the way down to 0 rows processed before performing the
table swap step.
2015-01-11 20:59:13 -05:00