30 Commits

Author SHA1 Message Date
Daniele Varrazzo
914537edc7 An attempt to restrict the search path to avoid injections
An alternative way to fix #168 which is not as invasive as the changes
in #171.

This currently breaks the current behaviour of the program as the tables
specified on command line are not found.
2018-03-20 20:47:06 +00:00
Daniele Varrazzo
9e4dd00415 Dropped compiler warning
Probably only raised compiling on 32 bits platforms.
2017-09-25 02:37:29 +01:00
Daniele Varrazzo
19e34a3202 Added PG 10 compatibility wrapper to simple_prompt()
Also checking for malloc failure into previous version's simple_prompt()
calls.
2017-04-25 15:09:27 +01:00
Daniele Varrazzo
86eef300f1 Dropped C code used by unsupported PG versions 2017-04-10 11:44:17 +01:00
Masahiko Sawada
e8d6b6b97f Change format identifier %lu in pgut.c file. 2017-02-21 12:23:18 +00:00
Josh Kupershmidt
facbcf90dd Wrong precedence for these chained less-than / greater-thans. 2015-07-24 07:27:30 -04:00
kotsachin
8a0466e4c2 Some improvements and fixes to previously submitted pull request for cleaning temporary objects 2015-05-25 18:14:47 +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
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
Josh Kupershmidt
080ebd3ed6 Bump up Copyright notices for 2015 2015-01-11 19:01:37 -05:00
Josh Kupershmidt
8ba92a1f49 Rename argument to simple_string_list_size() for consistency. 2012-11-16 15:27:53 +00:00
Josh Kupershmidt
decd822393 Move simple_string_list_size() into pgut.c, with the rest of these string functions.
Also, fix an error with this function not actually using its string_list argument.
2012-11-16 15:27:53 +00: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
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
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
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
Masahiko Sakamoto
d8d39cc948 Fix memory leak and wrong usage of StringInfo in pgut_connect(). 2010-10-21 07:36:13 +00:00
Masahiko Sakamoto
7865250a19 Fixed problem with interactive authentication handling.
Previous pgut.c didn't handle any user-input during interactive authentication.
2010-09-29 07:29:29 +00:00
Takahiro Itagaki
79757ccb62 version 1.1.2. 2010-06-01 07:35:01 +00:00
Takahiro Itagaki
78b0a0e374 Fix two bugs.
#1010789 : pg_reorg 1.1.0 and "unexpected toast relations"
#1010790 : reorg.get_index_keys() does not handle composite indexes
2010-04-21 09:25:20 +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
Takahiro Itagaki
8392b9462a version 1.0.8. 2010-02-15 01:38:06 +00:00
Takahiro Itagaki
a7a42b7bbf Fix crashes when cluster indexes have storage options (fillfactor, etc). 2010-02-05 03:24:22 +00:00
Takahiro Itagaki
7084ec6de9 version 1.0.7. 2010-01-28 06:02:28 +00:00
Takahiro Itagaki
6155932b60 Fix data corruption bug reported by robjderr (#1010664).
pg_reorg broke catalog definition if the target table had any dropped columns.
Now pg_reorg removes dropped columns and renumbers valid columns.
You can use pg_reorg to shrink column definitions if you have many dropped
columns. (without pg_reorg, dropped columns are filled with zero forever)
2009-07-02 09:50:58 +00:00
Takahiro Itagaki
5fe3f037be version 1.0.5.
- Disable autovacuum for working tables and update logs.
- Do ANALYZE automatically after reorg unless -Z, --no-analyze option
  is specified.
2009-05-25 07:06:38 +00:00
Takahiro Itagaki
9a8f2e9c33 Fix ownership bug.
New toast table, toast index, and toast type should not have
been owned by the executor of pg_reorg, but by the original owner.
2009-05-14 08:19:25 +00:00
Takahiro Itagaki
0c659ed31f Fix compile errors on Linux. 2009-04-23 06:37:29 +00:00
Takahiro Itagaki
574b6dc296 Support PGXS. 2009-04-22 07:26:12 +00:00