486 Commits

Author SHA1 Message Date
Daniele Varrazzo
4f9269cab8 Improvements to the install section of the docs
Fixed cleanup procedure with EXTENSION, added uninstall section.
2012-11-13 14:07:43 +00:00
Daniele Varrazzo
673a8ea100 The repack schema is contained in the pg_repack extension
...not the other way around. This allows DROP EXTENSION ... CASCADE to
remove temporary directories, simplifying the cleanup procedure after an
error, and getting rid of the schema on uninstall.
2012-11-13 14:02:45 +00:00
Daniele Varrazzo
dd72e2ae99 Clarifying the pg_repack scope and its relation with pg_reorg 2012-11-12 12:46:51 +00:00
Daniele Varrazzo
6f8a8bab6d support for ENABLE TRIGGER renamed to enable_trigger from alter_table 2012-11-12 11:51:20 +00:00
Daniele Varrazzo
532be6ea25 Provide a single way to install pg_repack
Provide only CREATE EXTENSION support on PG >= 9.1 and only the sql script on
PG < 9.1.

Also dropped the /echo cruft in the extension script: it is broken on pg 9.1
and 9.1.1, and because the script is not installed on versions that don't
support CREATE EXTENSION it is just not terribly useful.
2012-11-12 01:04:46 +00:00
Daniele Varrazzo
ac068cc69b Script to create extension from loose objects dropped altogether
pg_repack doesn't create any object to depend on, so it is always possible drop
it and install a new version instead of upgrading. Creating a robust upgrade
path from loose objects which can be of any version to a target version is
hopelessly brittle, so I'd suggest the user just to drop a previous pg_repack
version and install the new one.
2012-11-12 00:20:41 +00:00
Daniele Varrazzo
390feca0e1 Dropped the last compatibility macros for PG 8.2 2012-11-11 23:51:46 +00:00
Daniele Varrazzo
a92fefab8a Silence error message during test
It is different across server versions.
2012-11-11 23:38:38 +00:00
Josh Kupershmidt
95c196dd33 Have get_quoted_relname(), get_quoted_nspname(), and reorg_drop() sanity check arguments to prevent NULL pointer dereferencing and backend crash.
Fix for Issue #20.
2012-11-11 23:09:59 +00:00
Daniele Varrazzo
7b84eeb010 Get the program and library version from the META file 2012-11-11 18:30:27 +00:00
Daniele Varrazzo
71af7f20be Dropped support for building "in tree": always use PGXS 2012-11-11 17:17:41 +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
Daniele Varrazzo
cc622aefae Project homepage set to http://reorg.github.com/pg_repack/ 2012-11-11 02:38:09 +00:00
Daniele Varrazzo
1707d3add2 Dropped mention to PG 8.2 in master 2012-11-11 01:30:12 +00:00
Daniele Varrazzo
b3a86e3fee Documentation converted to reST
I had to drop the Japanese doc, but I'd be happy to restore it in reST format.
2012-11-11 01:30:05 +00:00
Daniele Varrazzo
8bd08c4f73 README updated with the pg_repack info 2012-11-11 01:10:24 +00:00
Daniele Varrazzo
107a8b1324 Uppercase help metavars 2012-11-10 23:45:56 +00:00
Daniele Varrazzo
1852775c48 email and meta updated to pg_repack
For the moment we are advertising the pg_reorg email.
2012-11-10 22:57:22 +00:00
Daniele Varrazzo
b7799c1782 Fork the pg_repack extension 2012-11-10 22:33:57 +00:00
Daniele Varrazzo
0f8c33f72f Don't use a generic 'unpackaged' version
The behaviour of the script is not really predictable if it is run on the
loose objects of pg_reorg >= 1.1.8. So let's be explicit about what version
we expect as starting point.
2012-11-10 22:02:10 +00:00
Daniele Varrazzo
bd06ec0091 Program metadata version moved to 1.2dev0 2012-11-10 19:59:19 +00:00
Daniele Varrazzo
41f3c5c0f3 Ignore temporary test files 2012-11-10 19:52:50 +00:00
Daniele Varrazzo
16adb3359e Fixed cleanup of init test script 2012-11-10 19:52:43 +00:00
Daniele Varrazzo
883b9b5b28 Don't add the schema to the extension
It is an error to do so.
2012-11-10 19:52:35 +00:00
Daniele Varrazzo
8b8b859ad3 Create both the standalone and extension sql scripts from the same .in 2012-11-10 19:52:28 +00:00
Daniele Varrazzo
fd2d231b2c Added META.json for PGXN submission 2012-11-10 19:51:53 +00:00
Daniele Varrazzo
a2fa346eff Fixed create extension from unpackaged
Fixed syntax of create aggregate and an extra brace.
Schema added to the extension.
2012-11-10 19:51:47 +00:00
Masahiko Sakamoto
69cc976b39 Updated regression tests to use CREATE EXTENSION for PostgreSQL 9.1 or higher. 2012-11-10 19:51:40 +00:00
Masahiko Sakamoto
e9d4ef2557 Supports CREATE EXTENSION.
I've changed lib/Makefile to support CREATE EXTENSION.
In order to work with previeous PostgreSQL version (i.e. < 9.1),
this implementation installs both pg_reorg--1.0.sql and pg_reorg.sql.

This patch lacks regression testcases for CREATE EXTENSION, which I will commit soon.
2012-11-10 19:51:30 +00:00
Josh Kupershmidt
d603c49b40 Get rid of unused getint16() function to quiet compiler.
Also, small whitespace fixup.
2012-11-06 20:30:49 -07:00
Daniele Varrazzo
841f656012 Skip bgwriter's lock on newly promoted standby servers
Fixes ticket #1.
2012-11-06 01:49:00 +00:00
Josh Kupershmidt
05111376c8 Remove TODO comment about ASC/DESC and NULLS FIRST/LAST index options.
As far as I can tell, the code already supports these index options, so
put in a small installcheck test exercising these index options and call
it good.
2012-10-21 16:54:33 -07:00
Josh Kupershmidt
0942141245 Fix compiler warnings about appendStringInfoVA and appendStringInfoVA_s.
gcc was correctly complaining that these functions should be
declared with the `printf` format attribute. Addresses Issue #14.
2012-10-18 20:32:18 -07:00
Josh Kupershmidt
6c8c532701 Enforce version restriction (8.3+) in the Makefile, and further macro pruning.
Per Issue #12, have the Makefile bail out if the user is trying to build
on an unsupported Postgres version. Also, some further removal of macros
purportedly handling older PG versions which are no longer needed, and
were missed in 370e572.
2012-10-17 08:00:47 -07:00
Daniele Varrazzo
0a87822ee4 Avoid choosing an invalid index as primary key
Fixing the other functions selecting pg_index (as in Josh original patch)
doesn't seem necessary as they are only called with an index oid, and we
should only call them with a valid index as argument.
2012-10-17 00:01:00 +01:00
Daniele Varrazzo
9f5c4f55c7 Don't try to rebuild invalid indexes
Closes ticket #9
2012-10-16 23:29:36 +01:00
Josh Kupershmidt
df12c37edf Add in a call to:
ALTER TABLE [table_name] ENABLE ALWAYS TRIGGER z_reorg_trigger

so that pg_reorg and the z_reorg_trigger can properly work in "replica" mode,
as when using pg_reorg on a Slony slave.

Bug report and patch by Norman Yamada.
2012-10-14 10:50:05 -07:00
Josh Kupershmidt
370e572cfc Get rid of support for PG versions 8.2 and earlier. These have been unsupported for some time, and the #defines do clutter up the codebase. 2012-09-22 20:00:53 +01:00
Daniele Varrazzo
2226f2011d Documentation fixes for the English and Japanese HTML doc pages
* Get rid of duplicate documentation for "-Z" option
  * standardize which section "--all" appears under
  * note that 9.2 is a supported Postgres version
  * turn HTML docs into valid HTML 4.01

Commit by Josh Kupershmidt. Performed by me as git am was failing to apply
this patch.
2012-09-22 20:00:53 +01:00
Josh Kupershmidt
59db5d4630 Make ordering of 'Options' printed by pg_reorg --help alphabetical. 2012-09-22 19:33:40 +01:00
Josh Kupershmidt
bc20ace32b Use quote_identifier() to properly escape column names in UPDATE statement, per report from Dimitrije Radojevic. 2012-09-22 19:33:40 +01:00
Josh Kupershmidt
612495ecd6 Print a status message while waiting on old transactions to finish, including a backend PID we are waiting on, so that the user knows pg_reorg is hung and can do something about it. 2012-09-22 19:33:40 +01:00
Josh Kupershmidt
2ba1a575ac Add missing PQclear(), and comment touchups.
Fixed by Daniele: PQclear already committed, only left the comments touchups.
2012-09-22 19:33:40 +01:00
Daniele Varrazzo
957e5ed109 Original maintainers have been invited or added. 2012-09-22 12:43:45 +01:00
Daniele Varrazzo
dfb30aa496 Added README with description of github.com/reorg 2012-09-22 12:43:40 +01:00
Michael Paquier
153d81f50a Take care of warnings for unused parameters 2012-09-22 12:43:32 +01:00
Michael Paquier
805c3bb1f7 Add gitignore entries to ensure folder consistency 2012-09-22 12:43:26 +01:00
Masahiko Sakamoto
55ee42bebf Added missing PQclear().
reported by josh.
2012-09-20 07:17:26 +00:00
Masahiko Sakamoto
5e48cf02f9 Fixes to work with 9.3dev.
- included "access/htup_details.h", a newly introduced header for tuple.
- included "lib/stringinfo.h".
reported by josh.
2012-09-20 03:48:53 +00:00