function "pg_track_settings_snapshot_settings" failed
Ikrar-k opened this issue · 8 comments
I am getting the below error for remote server.
powa_take_snapshot(1): function "pg_track_settings_snapshot_settings" failed: null value in column "ts" violates not-null constraint
Hello,
I think you already reported this problem. It was fixed in rjuju/pg_track_settings@bc0c061, though I didn't release v2.0.0 yet. I can go ahead and tag the release now, especially if you can confirm that the commit does solve your problem?
I forgot to recreate the extension. This can be closed. Thanks a lot for helping.
It was working and I started the seeing issue again.
powa=# select powa_take_snapshot(1);
powa_take_snapshot
0
(1 row)
powa=# select powa_take_snapshot(1);
WARNING: powa_take_snapshot(1): function "pg_track_settings_snapshot_settings" failed:
state : 23502
message: null value in column "ts" violates not-null constraint
detail : Failing row contains (1, null, allow_system_table_mods, null, t, null).
hint :
context: SQL statement "WITH src AS (
SELECT * FROM public.pg_track_settings_settings_src(_srvid)
),
dropped AS (
SELECT s.ts, l.srvid, l.name
FROM public.pg_track_settings_list l
LEFT JOIN src s ON s.name = l.name
WHERE l.srvid = _srvid
AND s.name IS NULL
),
mark_dropped AS (
INSERT INTO public.pg_track_settings_history (srvid, ts, name, setting,
setting_pretty, is_dropped)
SELECT srvid, ts, name, NULL, NULL, true
FROM dropped
)
DELETE FROM public.pg_track_settings_list l
USING dropped d
WHERE d.name = l.name
AND d.srvid = l.srvid
AND l.srvid = _srvid"
PL/pgSQL function pg_track_settings_snapshot_settings(integer) line 16 at SQL statement
SQL statement "SELECT pg_track_settings_snapshot_settings(1)"
PL/pgSQL function powa_take_snapshot(integer) line 63 at EXECUTE
powa_take_snapshot
1
(1 row)
powa=#
Did you recreate the extension on the repository server too?
Yes, I did. But the issue is persistent.
Ah I see, I indeed made an embarassing mistake when fixing the original problem.
I just pushed a commit (rjuju/pg_track_settings@4cea113) that should fix (again) this issue! Let me know if that's now ok.
Yes, Not seeing any issue now. This can be closed.
Great, thanks for testing and feedback!