10 Commits

Author SHA1 Message Date
Josh Kupershmidt
080ebd3ed6 Bump up Copyright notices for 2015 2015-01-11 19:01:37 -05:00
Josh Kupershmidt
f551b56f1a Merge branch 'master' into concurrent_indexes.
Conflicts:
	bin/pg_repack.c
2012-12-14 22:17:36 -07:00
Josh Kupershmidt
7213e2fe7b Use 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().

Per discussion with Daniele.
2012-12-14 20:13:23 -07:00
Josh Kupershmidt
509e568c52 First pass at implementing concurrent index builds using multiple connections.
Adds a new --jobs command-line argument to specify how many worker
connections you want. These worker connections should stick around
while processing table(s) in a single database. For each table,
parcel out the indexes to be built among these worker conns,
submitting each CREATE INDEX ... request using PQsendQuery() i.e.
in non-blocking fashion.

Most of this is still rather crude, in particular the
while (num_active_workers) ... loop in rebuild_indexes(), but
it seems to be working, so I'm committing here.
2012-12-14 18:49:00 -07:00
Josh Kupershmidt
ad75dcfbb1 Allow multiple --table options to be specified on the command-line.
Per Issue #18. SimpleStringList code borrowed from pg_dump and a
pending patch to add similar functionality to pg_restore,
clusterdb, vacuumdb, and reindexdb.

The error handling in reorg_one_table() could still be much improved,
so that an error processing a single table doesn't cause pg_reorg to
necessarily bail out and skip further tables, but I'll leave that for
another day.
2012-11-16 15:19:35 +00:00
Josh Kupershmidt
78bae38718 Take an ACCESS SHARE LOCK on the target table, in an initial attempt to prevent concurrent DDL.
This is a first pass at Daniele's suggestion in Issue #8, although it is
definitely still buggy -- it is still possible for another transaction
to get in an AccessExclusive lock and perform DDL either before the
ACCESS SHARE lock is acquired or immediately after it is released.
2012-11-16 15:14:12 +00:00
Daniele Varrazzo
1d60a946ff Added The Reorg Development Team copyright 2012-11-11 03:00:00 +00:00
Daniele Varrazzo
db1c554f60 Dropped executable flags 2012-11-11 02:48:46 +00:00
Takahiro Itagaki
960930b645 Fixed database corruption when target tables have dropped columns, and
there are views or functions depending on columns after dropped ones.
The issue was reported by depesz, and original patch by Denish Patel.

Improved documentation how to build binaries from source.

COPYRIGHT updated.
2011-04-29 05:06:48 +00:00
Takahiro Itagaki
f3873ff55b pg_reorg version 1.1.0.
- Add wait-timeout option and use SET statement_timeout instead of NOWAIT.
  This can avoid infinite NOWAIT loops to reorganize heavily accessed tables.
- Support native build with MSVC on Windows.
2010-03-25 07:13:16 +00:00