486 Commits

Author SHA1 Message Date
Masahiko Sawada
33f4c30563 Fix reorganize table without sorting.
Commit 5adff6ff0b88d6f162719eff7176069730537c2a separated the
data copy from creating table. This is a cause of bug that
pg_repack doesn't actually sort table during reorganization.
This commit fixes this issue by adding ORDER BY clause to Copy
SQL rather than CREATE TABLE SQL.

Reported by acmzero on issue #138.
2017-08-05 02:31:47 +09:00
7705e3c298
Add note to readme 2017-07-30 17:32:48 +04:30
Masahiko Sawada
cac8179299 Merge pull request #136 from MasahikoSawada/fix_memory_leak
Fix a small memory leak in repack_one_database function.
2017-07-13 19:26:27 +09:00
Masahiko Sawada
c2ed98a85b Fix a small memory leak in repack_one_database function.
Noticed by coverity scan.
2017-07-12 17:04:33 -07:00
098f569eb8 Add "-X" option to avoid waiting for other transactions
There was a conservative wait[1] for all existing transaction to
finish before repacking a table. This may not be desired on a busy
database on which you have long running transaction, which may block
pg_repack to do the job. This option will display a warning message,
but continues the process in such cases.

[1] http://lists.pgfoundry.org/pipermail/reorg-general/2015-October/000318.html
2017-06-03 11:07:23 +04:30
Daniele Varrazzo
cbb3b7f916 Minimum postgres version supported fixed in META.json 2017-04-26 11:30:02 +01:00
Daniele Varrazzo
5b1001d620 Fixed info to refresh website, suggest to tag after deployment 2017-04-25 17:58:09 +01:00
Daniele Varrazzo
2d11efea18 Fixed reST error in Japanese docs 2017-04-25 16:13:53 +01:00
Daniele Varrazzo
910d5fd86a Fixed version number
1.4 would have been good for me too... But semver requires 1.4.0
2017-04-25 16:11:27 +01:00
Daniele Varrazzo
a7e0b6748e Added identifier to recognize the test output file 2017-04-25 15:50:33 +01:00
Daniele Varrazzo
8bdba99642 Fixed hba configuration to test on PG 10
Use env vars instead of hardcoded PG version to select config options.
2017-04-25 15:09:43 +01:00
Daniele Varrazzo
a5a5f3447a Added expected test for postgres 10
The \d output format changed
2017-04-25 15:09:27 +01:00
Daniele Varrazzo
773dc5349d Work around CatalogIndexInsert no more exported in PG 10
The CatalogTupleUpdateWithInfo performs the two operation
simple_heap_update and CatalogIndexInsert.
2017-04-25 15:09:27 +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
b9b8e60bda Set up travis tests to run with postgres 10 2017-04-25 15:09:27 +01:00
Masahiko Sawada
285675f836 Bump version to 1.4.0 (stable). 2017-04-25 15:25:42 +09:00
Masahiko Sawada
00e66eb735 Fix a typo in pg_repack.rst 2017-04-25 15:21:18 +09:00
Masahiko Sawada
317eb849ad Add a new feature -I option to release note. 2017-04-25 15:18:21 +09:00
Masahiko Sawada
5f2904362a Update Japanese doc for -I option. 2017-04-25 15:15:04 +09:00
Masahiko Sawada
1055b06a89 Merge pull request #117 from funbringer/support_table_inheritance
Support table inheritance
2017-04-25 02:39:39 +09:00
Dmitry Ivanov
94679ee83a add a comment regarding AccessShareLocks in repack_get_table_and_inheritors() 2017-04-24 13:26:28 +03:00
Dmitry Ivanov
0901b82588 acquire AccessShareLock on parent and children in repack_get_table_and_inheritors() 2017-04-23 21:22:54 +03:00
Dmitry Ivanov
4df065891c add missing results to repack_1.out 2017-04-19 14:14:26 +03:00
Dmitry Ivanov
7dca19d7e0 add docs for repack_get_table_and_inheritors() 2017-04-19 14:09:30 +03:00
Dmitry Ivanov
e1f362e831 resolve conflicts 2017-04-19 14:05:53 +03:00
Nicola Murino
05fac2dac3 fix compilation with msvc
__attribute__ macro is not defined in msvc and it is not essential to
the implementation. All it does  is tell the compiler that this function
is similar to printf, and  expects a printf-like format string
So for MSVC we define __attribute__ as a macro that do nothing
2017-04-19 11:54:46 +01:00
Masahiko Sawada
4d59be0a66 Merge pull request #123 from MasahikoSawada/toast_storage_param
Specify the storage option for TOAST table when create table.
2017-04-13 11:34:49 +09:00
Masahiko Sawada
6de31a1249 Add new item in Japanese doc. 2017-04-11 23:49:10 +09:00
Masahiko Sawada
a6b2b0e82e Fix a mistake of merging.
Also fix regression test failure.
2017-04-11 23:43:21 +09:00
Masahiko Sawada
d55a08fc1e Merge branch 'master' into toast_storage_param 2017-04-11 23:30:27 +09:00
Masahiko Sawada
df96f35345 Merge pull request #122 from MasahikoSawada/col_storage
Set column storage type before first copying table.
2017-04-11 23:13:23 +09:00
Masahiko Sawada
c75a55d229 Update new item in Japanese doc. 2017-04-11 23:10:08 +09:00
Daniele Varrazzo
467389abd6 Report column storage issue fixed in docs
Close #94.
2017-04-10 23:31:52 +01:00
Masahiko Sawada
b6ea2ca3c9 Fix the mix of tabs and space. 2017-04-10 23:26:58 +01:00
Masahiko Sawada
789e819d74 Fix regression test failure. 2017-04-10 23:26:58 +01:00
Masahiko Sawada
5adff6ff0b Set column storage type before first copying table.
Previously, even if the table whose column storage type has been
changed the pg_repack did first copy the data to table without changing
column storage paramater. This cause of that the existing data is
pushed out to its toast table even if actual column storage type is
"main".

Issue #94.
2017-04-10 23:25:49 +01:00
Daniele Varrazzo
3afe19e7c4 Report issue fixed in docs
Close #10
2017-04-10 23:21:26 +01:00
Masahiko Sawada
c44306ba74 Fix regression test failure. 2017-04-10 23:21:26 +01:00
Masahiko Sawada
ca5ca11d4d Specify the storage option for TOAST table when create table.
The storage option such as AUTOVACUUM_VACUUM_SCALE_FACTOR can be
set to both heap table and TOAST table. But the storage parameter
for TOAST table had gone after repacked. This change create new
function get_storage_param which returns all storage paramters
including for TOAST table and OID setting.

Issue #10.
2017-04-10 23:20:50 +01:00
Daniele Varrazzo
6d7b1dbca4 Added test to verify the attribute options are respected 2017-04-10 23:07:40 +01:00
Daniele Varrazzo
cf6fe7d4cf Dropped redundant/wrong pg_config definition
Fix issue #24. The OP reported that the issue is solved by dropping this
assignment. The one in regress has been already dropped in the
refactoring to drop pre-9.1 support.
2017-04-10 22:04:28 +01:00
Daniele Varrazzo
53e8b9ede3 Merge branch 'drop-old-versions' 2017-04-10 20:58:51 +01:00
Daniele Varrazzo
a297acc3b3 Dropped piece of no more relevant news from README 2017-04-10 12:06:26 +01:00
Daniele Varrazzo
7d752f2b4e Dropped C file now unused 2017-04-10 11:58:41 +01:00
Daniele Varrazzo
86eef300f1 Dropped C code used by unsupported PG versions 2017-04-10 11:44:17 +01:00
Daniele Varrazzo
ac1333f9f3 Declare supported versions are 9.1-9.6 2017-04-09 19:23:06 +01:00
Dmitry Ivanov
48c42e1a87 fix regression tests for PostgreSQL <= 9.4 2017-03-30 14:09:59 +03:00
Dmitry Ivanov
9f54321e32 Merge branch 'master' into support_table_inheritance 2017-03-30 13:37:54 +03:00
Daniele Varrazzo
acb73b5a20 Dropped unneeded test results variants 2017-03-29 04:55:44 +01:00
Daniele Varrazzo
ecb07f1e3f Force Postgres 9.1 in makefile 2017-03-29 04:39:02 +01:00