Closed ramusus closed 10 years ago
You probably were in either master
or v1.0testing
branch before the 98618a6918bf7df154d10ef201251efcf0914704 commit (Added forgoten LOCAL in the ALTER's SET). The master
branch is a development one and 1.0testing
is used to fix pre-release versions to find bugs by public testing. I don't recommend using either of them except if you are developing new features or perform testing. Instead use the stable
branch that currently contains thr v1.0.1 release or follow the instructions on the main page of the toolkit's repository.
Updated pgcompact from stable branch, but the error is still here:
Sat Feb 8 22:41:44 2014 manufacture, public.posts_users_activity_postuseractivitystat ERROR A database error occurred, exiting:
DatabaseError Can not executie command:
CREATE INDEX CONCURRENTLY pgcompact_index_15493 ON posts_users_activity_postuseractivitystat USING btree (date_to); -- manufacture
ERROR: canceling statement due to statement timeout
another time
Sat Feb 8 22:43:59 2014 manufacture, public.posts_users_activity_postuseractivitystat ERROR A database error occurred, exiting:
DatabaseError Can not executie command:
CREATE INDEX CONCURRENTLY pgcompact_index_15611 ON posts_users_activity_postuseractivitystat USING btree (user_object_id); -- manufacture
ERROR: canceling statement due to statement timeout
Could you please run it with -v debug0
and show me the log output?
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat INFO Skipping reindex: public.posts_users_activity_postuser
activitystat_date_from, 0.12% space to compact from 20% minimum required.
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.001s, statement:
SELECT size, ceil(size / bs) AS page_count
FROM (
SELECT
pg_catalog.pg_relation_size('public.pgcompact_index_15493'::regclass) AS size,
current_setting('block_size')::real AS bs
) AS sq
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.003s, statement:
SELECT
CASE
WHEN avg_leaf_density = 'NaN' THEN 0
ELSE
round(
(100 * (1 - avg_leaf_density / fillfactor))::numeric, 2
)
END AS free_percent,
CASE
WHEN avg_leaf_density = 'NaN' THEN 0
ELSE
ceil(
index_size * (1 - avg_leaf_density / fillfactor)
)
END AS free_space
FROM (
SELECT
coalesce(
(
SELECT (
regexp_matches(
reloptions::text, E'.*fillfactor=(\\d+).*'))[1]),
'90')::real AS fillfactor,
pgsi.*
FROM pg_catalog.pg_class
CROSS JOIN public.pgstatindex(
'public.pgcompact_index_15493') AS pgsi
WHERE pg_catalog.pg_class.oid = 'public.pgcompact_index_15493'::regclass
) AS oq
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat INFO Skipping reindex: public.pgcompact_index_15493, 0.20% space to compact from 20% minimum required.
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.001s, statement:
SELECT size, ceil(size / bs) AS page_count
FROM (
SELECT
pg_catalog.pg_relation_size('public.posts_users_activity_postuseractivitystat_date_to'::regclass) AS size,
current_setting('block_size')::real AS bs
) AS sq
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.003s, statement:
SELECT
CASE
WHEN avg_leaf_density = 'NaN' THEN 0
ELSE
round(
(100 * (1 - avg_leaf_density / fillfactor))::numeric, 2
)
END AS free_percent,
CASE
WHEN avg_leaf_density = 'NaN' THEN 0
ELSE
ceil(
index_size * (1 - avg_leaf_density / fillfactor)
)
END AS free_space
FROM (
SELECT
coalesce(
(
SELECT (
regexp_matches(
reloptions::text, E'.*fillfactor=(\\d+).*'))[1]),
'90')::real AS fillfactor,
pgsi.*
FROM pg_catalog.pg_class
CROSS JOIN public.pgstatindex(
'public.posts_users_activity_postuseractivitystat_date_to') AS pgsi
WHERE pg_catalog.pg_class.oid = 'public.posts_users_activity_postuseractivitystat_date_to'::regclass
) AS oq
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat INFO Skipping reindex: public.posts_users_activity_postuser
activitystat_date_to, 0.20% space to compact from 20% minimum required.
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.001s, statement:
SELECT size, ceil(size / bs) AS page_count
FROM (
SELECT
pg_catalog.pg_relation_size('public.posts_users_activity_postuseractivitystat_user_object_id'::regclass) AS size,
current_setting('block_size')::real AS bs
) AS sq
Sat Feb 8 23:18:12 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.007s, statement:
SELECT
CASE
WHEN avg_leaf_density = 'NaN' THEN 0
ELSE
round(
(100 * (1 - avg_leaf_density / fillfactor))::numeric, 2
)
END AS free_percent,
CASE
WHEN avg_leaf_density = 'NaN' THEN 0
ELSE
ceil(
index_size * (1 - avg_leaf_density / fillfactor)
)
END AS free_space
FROM (
SELECT
coalesce(
(
SELECT (
regexp_matches(
reloptions::text, E'.*fillfactor=(\\d+).*'))[1]),
'90')::real AS fillfactor,
pgsi.*
FROM pg_catalog.pg_class
CROSS JOIN public.pgstatindex(
'public.posts_users_activity_postuseractivitystat_user_object_id') AS pgsi
WHERE pg_catalog.pg_class.oid = 'public.posts_users_activity_postuseractivitystat_user_object_id'::regclass
) AS oq
Sat Feb 8 23:39:01 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 1248.902s, statement:
CREATE INDEX CONCURRENTLY pgcompact_index_18874 ON posts_users_activity_postuseractivitystat USING btree (user_object_id); -- manufacture
Sat Feb 8 23:39:18 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 13.150s, statement:
BEGIN; SET statement_timeout TO 1000; DROP INDEX public.posts_users_activity_postuseractivitystat_user_object_id; ALTER INDEX public.pgcompact_index_18874 RENAME TO posts_users_activity_postuseractivitystat_user_object_id; END; -- manufacture
Sat Feb 8 23:39:18 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.001s, statement:
SELECT size, ceil(size / bs) AS page_count
FROM (
SELECT
pg_catalog.pg_relation_size('public.posts_users_activity_postuseractivitystat_user_object_id'::regclass) AS size,
current_setting('block_size')::real AS bs
) AS sq
Sat Feb 8 23:39:18 2014 manufacture, public.posts_users_activity_postuseractivitystat INFO Reindex: public.posts_users_activity_postuseractivitystat_user_object_id, initial size 5447 pages (43 MB), has been reduced by 55% (24 MB), duration 1262.052 seconds, attempts 5.
Sat Feb 8 23:39:18 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.001s, statement:
SELECT size, ceil(size / bs) AS page_count
FROM (
SELECT
pg_catalog.pg_relation_size('public.posts_users_activity_postuseractivitystat_period'::regclass) AS size,
current_setting('block_size')::real AS bs
) AS sq
Sat Feb 8 23:39:18 2014 manufacture, public.posts_users_activity_postuseractivitystat DEBUG0 Executed SQL: duration 0.024s, statement:
SELECT
CASE
WHEN avg_leaf_density = 'NaN' THEN 0
ELSE
round(
(100 * (1 - avg_leaf_density / fillfactor))::numeric, 2
)
END AS free_percent,
CASE
WHEN avg_leaf_density = 'NaN' THEN 0
ELSE
ceil(
index_size * (1 - avg_leaf_density / fillfactor)
)
END AS free_space
FROM (
SELECT
coalesce(
(
SELECT (
regexp_matches(
reloptions::text, E'.*fillfactor=(\\d+).*'))[1]),
'90')::real AS fillfactor,
pgsi.*
FROM pg_catalog.pg_class
CROSS JOIN public.pgstatindex(
'public.posts_users_activity_postuseractivitystat_period') AS pgsi
WHERE pg_catalog.pg_class.oid = 'public.posts_users_activity_postuseractivitystat_period'::regclass
) AS oq
Sat Feb 8 23:39:19 2014 manufacture, public.posts_users_activity_postuseractivitystat ERROR A database error occurred, exiting:
DatabaseError Can not executie command:
CREATE INDEX CONCURRENTLY pgcompact_index_18874 ON posts_users_activity_postuseractivitystat USING btree (period); -- manufacture
ERROR: canceling statement due to statement timeout
Oh, I see. It looks like I forgot to rebuild the fatpacked version before releasing, my fault. Fixed now. Get the stable version once again. And, please, let me know if everything is okay. Thanks for the feedback.
Now it works fine, thanks a lot!
I'm starting pgcompact with command:
and it works with some tables, but crashes with error. After restarting it crashes again with the same error, but ON ANOTHER TABLE. And I don't see that table in the output between tables processed by the next call. I start to google the error and all recomendations is about setting variable _statementtimeout, which i have by default:
Output log I see (dates are different, because i copied from different execution times):
One time I receive another error, so it varies from time to time:
The non-default settings are:
Any ideas, how to solve?