Thread: sequence id overflow ERROR using timescaledb

sequence id overflow ERROR using timescaledb

From
abrahim abrahao
Date:


 I am using timescaledb version  2.7.2, and PostgreSQL 12.11 (Ubuntu 12.11-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit

I tried to compress a chuck using the compress_chunk function and running a job as well, and I got "sequence id overflow" message ERROR.
Any idea how to fix it or why I got this error?
Note: I compressed other chuckles without problem.

   SELECT  'set temp_file_limit =-1; SELECT compress_chunk(''' || chunk_schema|| '.' || chunk_name || ''');'  
 FROM timescaledb_information.chunks
  WHERE   is_compressed =false;
                                         ?column?                                          
-------------------------------------------------------------------------------------------
 set temp_file_limit =-1; SELECT compress_chunk('_timescaledb_internal._hyper_1_2_chunk');
 set temp_file_limit =-1; SELECT compress_chunk('_timescaledb_internal._hyper_1_3_chunk');
 set temp_file_limit =-1; SELECT compress_chunk('_timescaledb_internal._hyper_1_4_chunk');
 set temp_file_limit =-1; SELECT compress_chunk('_timescaledb_internal._hyper_1_5_chunk');
 set temp_file_limit =-1; SELECT compress_chunk('_timescaledb_internal._hyper_1_8_chunk');


SELECT compress_chunk('_timescaledb_internal._hyper_1_2_chunk');
DEBUG:  building index "pg_toast_29929263_index" on table "pg_toast_29929263" serially
DEBUG:  building index "compress_hyper_3_12_chunk__compressed_hypertable_3_ivehicleid__" on table "compress_hyper_3_12_chunk" serially
DEBUG:  building index "compress_hyper_3_12_chunk__compressed_hypertable_3_gid__ts_meta" on table "compress_hyper_3_12_chunk" serially
DEBUG:  building index "compress_hyper_3_12_chunk__compressed_hypertable_3_irowversion_" on table "compress_hyper_3_12_chunk" serially
DEBUG:  building index "compress_hyper_3_12_chunk__compressed_hypertable_3_gdiagnostici" on table "compress_hyper_3_12_chunk" serially
DEBUG:  building index "compress_hyper_3_12_chunk__compressed_hypertable_3_gcontrolleri" on table "compress_hyper_3_12_chunk" serially
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.58", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.86", size 103432192
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.85", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.84", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.83", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.82", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.81", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.80", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.79", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.78", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.77", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.76", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.75", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.74", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.73", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.72", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.71", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.70", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.69", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.68", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.67", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.66", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.65", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.64", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.63", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.62", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.61", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.60", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.59", size 1073741824
ERROR:  sequence id overflow
Time: 1105092.862 ms (18:25.093)



SET client_min_messages TO DEBUG1; CALL run_job(1000);
SET
Time: 1.120 ms
DEBUG:  Executing policy_compression with parameters {"hypertable_id": 1, "compress_after": "28 days"}
DEBUG:  building index "pg_toast_29929276_index" on table "pg_toast_29929276" serially
DEBUG:  building index "compress_hyper_3_13_chunk__compressed_hypertable_3_ivehicleid__" on table "compress_hyper_3_13_chunk" serially
DEBUG:  building index "compress_hyper_3_13_chunk__compressed_hypertable_3_gid__ts_meta" on table "compress_hyper_3_13_chunk" serially
DEBUG:  building index "compress_hyper_3_13_chunk__compressed_hypertable_3_irowversion_" on table "compress_hyper_3_13_chunk" serially
DEBUG:  building index "compress_hyper_3_13_chunk__compressed_hypertable_3_gdiagnostici" on table "compress_hyper_3_13_chunk" serially
DEBUG:  building index "compress_hyper_3_13_chunk__compressed_hypertable_3_gcontrolleri" on table "compress_hyper_3_13_chunk" serially
 LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.87", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.115", size 103432192
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.114", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.113", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.112", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.111", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.110", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.109", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.108", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.107", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.106", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.105", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.104", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.103", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.102", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.101", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.100", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.99", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.98", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.97", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.96", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.95", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.94", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.93", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.92", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.91", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.90", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.89", size 1073741824
LOG:  temporary file: path "base/pgsql_tmp/pgsql_tmp713.88", size 1073741824
ERROR:  sequence id overflow
CONTEXT:  SQL statement "SELECT public.compress_chunk( chunk_rec.oid )"
PL/pgSQL function _timescaledb_internal.policy_compression_execute(integer,integer,anyelement,integer,boolean,boolean) line 35 at PERFORM
SQL statement "CALL _timescaledb_internal.policy_compression_execute(
        job_id, htid, lag_value::INTERVAL,
        maxchunks, verbose_log, recompress_enabled
      )"
PL/pgSQL function _timescaledb_internal.policy_compression(integer,jsonb) line 51 at CALL
Time: 1113429.153 ms (18:33.429)

Re: sequence id overflow ERROR using timescaledb

From
Julien Rouhaud
Date:
Hi,

On Thu, Aug 04, 2022 at 08:47:16PM +0000, abrahim abrahao wrote:
>
>  I am using timescaledb version  2.7.2, and PostgreSQL 12.11
> [...]
> I tried to compress a chuck using the compress_chunk function and running a
> job as well, and I got "sequence id overflow" message ERROR.Any idea how to
> fix it or why I got this error?Note: I compressed other chuckles without
> problem.
> [...]
>    SELECT  'set temp_file_limit =-1; SELECT compress_chunk(''' || chunk_schema|| '.' || chunk_name || ''');'  
> [...]
> ERROR:  sequence id overflow
> CONTEXT:  SQL statement "SELECT public.compress_chunk( chunk_rec.oid )"
> PL/pgSQL function
_timescaledb_internal.policy_compression_execute(integer,integer,anyelement,integer,boolean,boolean)line 35 at PERFORM
 
> SQL statement "CALL _timescaledb_internal.policy_compression_execute(
>         job_id, htid, lag_value::INTERVAL,
>         maxchunks, verbose_log, recompress_enabled
>       )"
> PL/pgSQL function _timescaledb_internal.policy_compression(integer,jsonb) line 51 at CALL
> Time: 1113429.153 ms (18:33.429)

This error is coming from timescale, not postgres, so you should open an issue
on their repository instead.