486 Commits

Author SHA1 Message Date
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
Josh Kupershmidt
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
Josh Kupershmidt
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
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
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
Josh Kupershmidt
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
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
e2c720b89c Perform sql_pop delete in bulk instead of one-at-a-time.
Prior to 506104686b these DELETEs had been done in large batches (of
DEFAULT_PEEK_COUNT size), but that naive method of choosing rows to
delete was unsafe. Here we continue to keep track of which rows must
be deleted as we process them.
2014-05-25 22:04:13 -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
f097982383 A few more fixes to the Releases doc section about 1.2. 2014-05-24 00:27:05 -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
schmiddy
69aa4f741d Merge branch 'master' into 21_dryrun 2014-05-23 23:35:25 -04:00
schmiddy
08d28df63a Add note urging users to upgrade due to Issue #23. 2014-05-22 23:36:06 -04:00
schmiddy
9916c48138 A few tweaks to the README, addressing the state of pg_reorg. 2014-05-22 15:08:39 -04:00
Daniele Varrazzo
3ca9c39dff Added documentation about the release process 2014-05-19 13:45:29 +01:00
Daniele Varrazzo
a9f3682645 Setting release status to stable
Grr... can't remove the wrong package from PGXN
2014-05-19 12:43:35 +01:00
Daniele Varrazzo
ae6638b581 Releasing version 1.2 2014-05-19 10:54:46 +01:00
Daniele Varrazzo
cdcb69a237 Source packages go in the dist directory 2014-05-19 10:54:46 +01:00
Daniele Varrazzo
3555c6b81a Added makefile target to create source distribution 2014-05-19 10:54:46 +01:00