tsbs icon indicating copy to clipboard operation
tsbs copied to clipboard

tsbs_load_timescaledb option 'replication-factor' was not supported for PostgreSQL versions 16, 17

Open orcarex opened this issue 9 months ago • 3 comments

https://docs.timescale.com/api/latest/distributed-hypertables/set_replication_factor/#set_replication_factor

Multi-node support is sunsetted.

TimescaleDB v2.13 is the last release that includes multi-node support for PostgreSQL versions 13, 14, and 15.

cat /tmp/timescaledb-data.gz | gunzip | ./tsbs_load_timescaledb
--postgres="sslmode=disable"
--host="localhost" --port=5431 --pass="postgres"
--replication-factor=0
--user="postgres" --admin-db-name=postgres --workers=8
--in-table-partition-tag=true --chunk-time=8h --write-profile=
--field-index-count=1 --do-create-db=false --force-text-format=false
--do-abort-on-exist=false could not execute sql: SELECT create_hypertable('diagnostics'::regclass, 'time'::name, replication_factor => NULL, chunk_time_interval => 28800000000, create_default_indexes=>FALSE)panic: ERROR: function create_hypertable(regclass, name, replication_factor => unknown, chunk_time_interval => bigint, create_default_indexes => boolean) does not exist (SQLSTATE 42883)

orcarex avatar Mar 19 '25 10:03 orcarex

goroutine 1 [running]: github.com/timescale/tsbs/pkg/targets/timescaledb.MustExec(0x1024d7ab4?, {0xc0001d4000, 0x9e}, {0x0?, 0x4?, 0x4?}) /tsbs/pkg/targets/timescaledb/creator.go:296 +0xd0 github.com/timescale/tsbs/pkg/targets/timescaledb.(*dbCreator).createTableAndIndexes(0xc0001561e0, 0xc0000f4340, {0xc000152330, 0xb}, {0xc0000afc40, 0x4, 0x4}, {0xc0000acae0, 0x1, 0x1}) /tsbs/pkg/targets/timescaledb/creator.go:224 +0x6ff github.com/timescale/tsbs/pkg/targets/timescaledb.(*dbCreator).PostCreateDB(0xc0001561e0, {0x1024b7396?, 0x9?}) /tsbs/pkg/targets/timescaledb/creator.go:105 +0x345 github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).useDBCreator(0xc000216000, {0x1026505f0, 0xc0001561e0}) /tsbs/load/loader.go:252 +0x1bf github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).preRun(0xc000216000, {0x102650e00, 0xc000114c60}) /tsbs/load/loader.go:128 +0x72 github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).RunBenchmark(0xc000216000, {0x102650e00, 0xc000114c60}) /tsbs/load/loader.go:184 +0x37 main.main() /tsbs/cmd/tsbs_load_timescaledb/main.go:102 +0x210

orcarex avatar Mar 19 '25 10:03 orcarex

  1. remove partitionsOption in /tsbs/pkg/targets/timescaledb/creator.go
Image
  1. then make again

orcarex avatar Mar 19 '25 10:03 orcarex

Does pg15 support this? I got the same error on pg15.

[postgres@bd1 ~]$ cat /tmp/timescaledb-data.gz | gunzip | tsbs_load_timescaledb --postgres="sslmode=disable" --host="localhost" --port=5432 --user="postgres" --admin-db-name=benchmark --workers=8  --in-table-partition-tag=true --chunk-time=8h --write-profile= --field-index-count=1 --do-create-db=false --force-text-format=false --do-abort-on-exist=false
could not execute sql: SELECT create_hypertable('cpu'::regclass, 'time'::name, replication_factor => NULL, chunk_time_interval => 28800000000, create_default_indexes=>FALSE)panic: ERROR: function create_hypertable(regclass, name, replication_factor => unknown, chunk_time_interval => bigint, create_default_indexes => boolean) does not exist (SQLSTATE 42883)

goroutine 1 [running]:
github.com/timescale/tsbs/pkg/targets/timescaledb.MustExec(0xc0001aa0d0, 0xc000038140, 0x96, 0x0, 0x0, 0x0, 0x96, 0xc00014ec20)
	/home/postgres/tsbs/pkg/targets/timescaledb/creator.go:296 +0x189
github.com/timescale/tsbs/pkg/targets/timescaledb.(*dbCreator).createTableAndIndexes(0xc00061c0f0, 0xc0001aa0d0, 0xc000638080, 0x3, 0xc0000ac100, 0xb, 0x10, 0xc000121bb0, 0x1, 0x1)
	/home/postgres/tsbs/pkg/targets/timescaledb/creator.go:224 +0x525
github.com/timescale/tsbs/pkg/targets/timescaledb.(*dbCreator).PostCreateDB(0xc00061c0f0, 0x996cba, 0x9, 0x0, 0x0)
	/home/postgres/tsbs/pkg/targets/timescaledb/creator.go:105 +0x3f5
github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).useDBCreator(0xc00016efd0, 0xa3d110, 0xc00061c0f0, 0x7f65a80a42a0)
	/home/postgres/tsbs/load/loader.go:252 +0x137
github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).preRun(0xc00016efd0, 0xa3dd98, 0xc00060e000, 0x0, 0x0)
	/home/postgres/tsbs/load/loader.go:128 +0x18c
github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).RunBenchmark(0xc00016efd0, 0xa3dd98, 0xc00060e000)
	/home/postgres/tsbs/load/loader.go:184 +0x5a
main.main()
	/home/postgres/tsbs/cmd/tsbs_load_timescaledb/main.go:102 +0x17b
[postgres@bd1 ~]$ psql -V
psql (PostgreSQL) 15.10

LeoLong0325 avatar May 09 '25 06:05 LeoLong0325