pg_pathman icon indicating copy to clipboard operation
pg_pathman copied to clipboard

ERROR: pg_pathman is disabled

Open sangli00 opened this issue 5 years ago • 1 comments

Why cannot use pg_pathman?

detail error:

pipeline=# CREATE TABLE journal (
pipeline(#     id      SERIAL,
pipeline(#     dt      TIMESTAMP NOT NULL,
pipeline(#     level   INTEGER,
pipeline(#     msg     TEXT);
CREATE TABLE
pipeline=# CREATE INDEX ON journal(dt);
CREATE INDEX
pipeline=#
pipeline=# INSERT INTO journal (dt, level, msg)
pipeline-# SELECT g, random() * 6, md5(g::text)
pipeline-# FROM generate_series('2015-01-01'::date, '2015-12-31'::date, '1 minute') as g;
INSERT 0 524161
pipeline=# SELECT create_range_partitions('journal', 'dt', '2015-01-01'::date, '1 day'::interval);
ERROR:  pg_pathman is disabled
CONTEXT:  SQL statement "SELECT public.add_to_pathman_config(parent_relid, expression,
											  p_interval::TEXT)"
PL/pgSQL function create_range_partitions(regclass,text,anyelement,interval,integer,boolean) line 59 at PERFORM
pipeline=# show pg_pathman.enable;
 pg_pathman.enable
-------------------
 on
(1 row)

pipeline=#

sangli00 avatar Apr 22 '19 09:04 sangli00

gdb info:

(gdb) b add_to_pathman_config
Breakpoint 1 at 0x7f5c07be88fb: file src/pl_funcs.c, line 742.
(gdb) c
Continuing.

Breakpoint 1, add_to_pathman_config (fcinfo=0x2b49530) at src/pl_funcs.c:742
(gdb) p	pathman_init_state.initialization_needed
$1 = 1 '\001'
(gdb)

Why pathman_init_state.initialization_needed is TRUE? what config parameter need modify?

sangli00 avatar Apr 22 '19 11:04 sangli00