f551b56f1aMerge branch 'master' into concurrent_indexes.
Josh Kupershmidt
2012-12-14 22:17:36 -07:00
7213e2fe7bUse CLEARPGRES() macro to call PQclear() and set res to NULL. This simplifies some of the error handling blocks, as now we can unconditionally use this macro without worrying about multiple PQclear() calls causing a double-free().
Josh Kupershmidt
2012-12-14 20:13:23 -07:00
aa428b68c8Merge branch 'concurrent_indexes' of github.com:schmiddy/pg_repack into concurrent_indexes
Josh Kupershmidt
2012-12-14 18:52:16 -07:00
2e4ac733c1Fix up buggy initialization code for poll() and select(). Also some logging and variable name cleanup.
Josh Kupershmidt
2012-12-14 18:17:45 -07:00
d43ff3cd24Add description of --jobs to the docs. Also, add missing newline in --help output.
Josh Kupershmidt
2012-12-13 21:10:59 -07:00
4f25c26284restore the warning message about invalid indexes, to match old behavior and pass installcheck.
Josh Kupershmidt
2012-12-13 19:56:44 -07:00
a1821e3dcbSeveral fixes for concurrent index builds: * Use poll() if it is available, or select() otherwise, to efficiently wait on index builds in worker queries to finish. * fix off-by-one error when initially assigning workers * move PQsetnonblocking() calls to setup_workers()
Josh Kupershmidt
2012-12-13 19:12:05 -07:00
8ab54cc803Small fixes related to the concurrent_indexes changes. Move PQsetnonblocking() call to setup_workers(), and make sure we're not forgetting any workers.
Josh Kupershmidt
2012-12-11 19:46:49 -07:00
509e568c52First pass at implementing concurrent index builds using multiple connections.
Josh Kupershmidt
2012-12-10 21:08:01 -07:00
962fdff1afFix up buggy initialization code for poll() and select(). Also some logging and variable name cleanup.
Josh Kupershmidt
2012-12-14 18:17:45 -07:00
b9c7189fa9Add description of --jobs to the docs. Also, add missing newline in --help output.
Josh Kupershmidt
2012-12-13 21:10:59 -07:00
4c0c2f3618restore the warning message about invalid indexes, to match old behavior and pass installcheck.
Josh Kupershmidt
2012-12-13 19:56:44 -07:00
42357353a7Several fixes for concurrent index builds: * Use poll() if it is available, or select() otherwise, to efficiently wait on index builds in worker queries to finish. * fix off-by-one error when initially assigning workers * move PQsetnonblocking() calls to setup_workers()
Josh Kupershmidt
2012-12-13 19:12:05 -07:00
b4d8a90437Don't perform repack_cleanup() if we haven't actually set up z_repack_trigger etc.
Josh Kupershmidt
2012-12-13 18:55:19 -07:00
8c2dd16608Small fixes related to the concurrent_indexes changes. Move PQsetnonblocking() call to setup_workers(), and make sure we're not forgetting any workers.
Josh Kupershmidt
2012-12-11 19:46:49 -07:00
0d984ed3e5First pass at implementing concurrent index builds using multiple connections.
Josh Kupershmidt
2012-12-10 21:08:01 -07:00
fcd3f7eaaeAdded pg_repack runs to check the get_order_by definitions work
Daniele Varrazzo
2012-12-09 12:11:10 +00:00
13cf8679dbAdded support for COLLATE to index keys
Daniele Varrazzo
2012-12-09 12:02:49 +00:00
4bcb7641c9Function get_index_keys() renamed to get_order_by()
Daniele Varrazzo
2012-12-09 11:35:52 +00:00
9d776b3980Likely fix for Issue #4 -- make sure params[] is long enough for two strings.
Josh Kupershmidt
2012-12-08 18:57:27 -07:00
a47686a7eeAdded support for DESC and NULLS FIRST/LAST to index keys
Daniele Varrazzo
2012-12-09 01:11:39 +00:00
6fc41e9c1aFix 'installcheck', since the last commit broke the expected output when the table is missing a valid primary/unique key.
Josh Kupershmidt
2012-12-06 21:26:12 -07:00
66ae2f33a7Downgrade ERROR to WARNING in the case where a table does not have a primary key or not-null unique key.
Josh Kupershmidt
2012-12-06 21:05:54 -07:00
f6ca290fb2Support for multiple --tables, as well as Concurrent DDL Guard.
Josh Kupershmidt
2012-12-06 20:58:33 -07:00
a072cc9812Ignore other pg_repack clients which may be running concurrently for the purposes of SQL_XID_SNAPSHOT.
Josh Kupershmidt
2012-12-06 16:11:55 -07:00
1a0a28d3f8Bugtrack url changed to pg_repack's one
Daniele Varrazzo
2012-12-01 12:57:17 +00:00
c395f72a1cSome docs clarification if you find a stray trigger
Daniele Varrazzo
2012-12-01 12:19:48 +00:00
fbcd24b4e0Have the client double-check that it is connected as a database superuser before plowing through initialization steps.
Josh Kupershmidt
2012-11-30 20:09:22 -07:00
3b856623fdAdd comment explaining how race condition between CREATE TABLE ... AS SELECT and recording of log entries is avoided.
Josh Kupershmidt
2012-11-29 20:27:33 -07:00
d402a73e42No need to use strlen() with StringInfoData.
Josh Kupershmidt
2012-11-26 20:08:47 -07:00
7e4f811381Style of definitions lists in the docs improved
Daniele Varrazzo
2012-11-22 23:23:30 +00:00
06a38f4a99Typofix from last commit.
Josh Kupershmidt
2012-11-19 07:42:21 -07:00
c756d13a55Docs cleanup by Josh
Daniele Varrazzo
2012-11-19 11:13:33 +00:00
520870ca2eTry rst2html.py too to render the docs
Daniele Varrazzo
2012-11-19 11:07:00 +00:00
3c13a0d05eDon't forget to disconnect conn2 when disconnect() is called, otherwise we leave a connection hanging open for every database processed via pg_repack -a.
Josh Kupershmidt
2012-11-18 14:36:09 -07:00
8ba92a1f49Rename argument to simple_string_list_size() for consistency.
Josh Kupershmidt
2012-11-14 19:05:31 -07:00
decd822393Move simple_string_list_size() into pgut.c, with the rest of these string functions.
Josh Kupershmidt
2012-11-14 19:02:31 -07:00
40626769d8Since commit 742380f0429b6 included some of the same changes already in 6a0af679e14d1d, go ahead and include a few more of the error cleanup from 6a0af679e14d1d.
Josh Kupershmidt
2012-11-14 20:47:47 -05:00
34605aef27Fix bogus use of table name parameters.
Josh Kupershmidt
2012-11-14 15:27:54 -05:00