Commit Graph

299 Commits

Author SHA1 Message Date
f564292e6e Merge branch 'bwtakacy-remove_build_warn' 2015-10-14 09:37:34 -04:00
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
f258925f23 .gitignore tweak 2015-10-14 09:11:50 -04:00
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
f255a4175d Bump version to 1.3.2 2015-08-13 22:15:30 -04:00
facbcf90dd Wrong precedence for these chained less-than / greater-thans. 2015-07-24 07:27:30 -04:00
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
70cc5769c9 Remember to free repacked_indexes. 2015-05-29 21:18:45 -04:00
a8409dd624 Merge branch 'amitlan-master' 2015-05-27 21:38:26 -04:00
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
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
d3a99db9f9 Merge branch 'kotsachin-master' 2015-05-25 17:26:31 -04:00
8fc8b656a2 Some comments about our new atexit handling. 2015-05-25 16:56:44 -04:00
b6b6a8bfb3 Merge branch 'master' of https://github.com/kotsachin/pg_repack into kotsachin-master 2015-05-25 10:59:32 -06:00
8a0466e4c2 Some improvements and fixes to previously submitted pull request for cleaning temporary objects 2015-05-25 18:14:47 +09:00
13e359171b Remove outdated comment about missing 9.4 support. 2015-05-23 16:27:47 -04:00
618d2f4783 Merge branch 'terrorobe-patch-1' 2015-05-19 20:11:01 -04:00
8fe2cf1296 Some further fixes/cleanup/wordsmithing of the doc changes. 2015-05-19 20:10:25 -04:00
c375c2009d wording 2015-05-13 14:47:56 +02:00
c28d6624ef Document pg_repack behavior 2015-05-13 11:59:21 +02:00
39cc3b474d Use pgut_strdup() instead of strdup(). 2015-05-04 21:21:16 -04:00
4e69428700 Merge branch 'master' of https://github.com/kotsachin/pg_repack into kotsachin-master 2015-05-01 15:30:34 -04:00
dec54f05b0 Merge branch 'bwtakacy-change-log-level' 2015-05-01 15:27:36 -04:00
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
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
f4703be524 Mention PG 9.4 support in the docs 2015-03-10 16:35:25 +00:00
19d85eb997 Release number bumped to 1.3.1
To be tested with older pg versions now.
2015-03-10 15:23:10 +00:00
4065470982 Merge branch 'pg94' 2015-03-10 15:22:00 +00:00
f76fef94b6 More complete changes list for release 1.3.0 2015-03-10 15:21:06 +00:00
74621ec3f6 Document PG 9.4 is supported 2015-03-10 14:59:52 +00:00
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
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
5e47c4c9c0 Dropped makefile guard against PG 9.4 2015-03-10 11:23:40 +00:00
779fd82ddb Bump version to 1.3.0 (stable). 2015-02-26 21:17:49 -05:00
859af29061 Bump version to 1.3.0-beta1 2015-01-26 20:45:20 -05:00
493e763fd7 Merge branch 'bwtakacy-develop' 2015-01-26 19:39:55 -05:00
9beefb6324 Merge branch 'develop' of https://github.com/bwtakacy/pg_repack into bwtakacy-develop 2015-01-26 19:37:20 -05:00
ad5ee75215 Merge branch 'bwtakacy-modify_error_message' 2015-01-26 19:26:13 -05:00
de8853b241 Wordsmith error message when repack_one_database() fails. 2015-01-26 19:21:27 -05:00
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
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
3920a5e5cd Freecode is no more
See http://freecode.com/about
2015-01-13 16:13:07 +00:00
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
8f61e44efd Tweak logic for when to display:
"Waiting for %d transactions to finish. First PID: %s"

message. Display it on every loop through the SQL_XID_ALIVE check
(i.e. every second), instead of only when the number of transactions
we're waiting on changes -- previously, it was too easy for that
important message to get lost in other messages.

And don't display the message at all when running under pg_regress,
i.e. as part of `make installcheck`. We had been getting occasional
errors from pg_regress when autovacuum was running and that message
got logged.
2015-01-11 19:31:09 -05:00
0cb40b6204 Add a Makefile check to avoid building against PostgreSQL 9.4+
Better to error out early during make, rather than failing with an
obscure error during CREATE EXTENSION.
2015-01-11 19:06:20 -05:00
080ebd3ed6 Bump up Copyright notices for 2015 2015-01-11 19:01:37 -05:00
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
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
6d3c085b22 Fix up commit 4b3347, where I failed to notice that the initial
problem was really about the OID being interpreted as an integer
literal upon input, and overflowing its integer space before even making
it into pg_try_advisory_lock(). (We do still need to add -2147483648 to
make the result fit into an integer, as 4b3347 does.)

Hopefully fixes issue #30, for real this time.
2014-11-20 17:18:15 -05:00
4b334745a3 Ensure that unsigned 4-byte OIDs are able to squeeze into the signed
4-byte int accepted by the two-argument form of pg_try_advisory_lock()
we are using.

Fixes #30. Thanks to Mark Steben and Greg Sabino Mullane for the report
and diagnosis.
2014-11-13 20:54:48 -05:00