1
0
mirror of https://github.com/timescale/timescaledb.git synced 2025-05-28 01:30:29 +08:00
Maheedhar PV 91b4a66eb9
Release 2.10.0 ()
This release contains new features and bug fixes since the 2.9.3
release.

This release is high priority for upgrade. We strongly recommend that
you upgrade as soon as possible.

**Features**
*  Allow RETURNING clause when inserting into compressed chunks
*  Manage life-cycle of connections via memory contexts
*  Make connection establishment interruptible
*  Make data node command execution interruptible
*  Enable real-time aggregation for continuous aggregates with
joins
*  Extend enabling compression on a continuous aggregrate with
'compress_segmentby' and 'compress_orderby' parameters

**Bugfixes**
*  Fix corruption when inserting into compressed chunks
*  Add role-level security to job error log
*  Fix use of prepared statement in async module
*  Compression can't be enabled on continuous aggregates when
segmentby/orderby columns need quotation
*  Fix next_start calculation for fixed schedules
2023-02-20 11:06:05 +05:30

38 lines
1.3 KiB
SQL

CREATE OR REPLACE VIEW timescaledb_information.job_errors
WITH (security_barrier = true) AS
SELECT
job_id,
error_data ->> 'proc_schema' as proc_schema,
error_data ->> 'proc_name' as proc_name,
pid,
start_time,
finish_time,
error_data ->> 'sqlerrcode' AS sqlerrcode,
CASE WHEN error_data ->>'message' IS NOT NULL THEN
CASE WHEN error_data ->>'detail' IS NOT NULL THEN
CASE WHEN error_data ->>'hint' IS NOT NULL THEN concat(error_data ->>'message', '. ', error_data ->>'detail', '. ', error_data->>'hint')
ELSE concat(error_data ->>'message', ' ', error_data ->>'detail')
END
ELSE
CASE WHEN error_data ->>'hint' IS NOT NULL THEN concat(error_data ->>'message', '. ', error_data->>'hint')
ELSE error_data ->>'message'
END
END
ELSE
'job crash detected, see server logs'
END
AS err_message
FROM
_timescaledb_internal.job_errors
LEFT JOIN
_timescaledb_config.bgw_job ON (bgw_job.id = job_errors.job_id)
WHERE
pg_catalog.pg_has_role(current_user,
(SELECT pg_catalog.pg_get_userbyid(datdba)
FROM pg_catalog.pg_database
WHERE datname = current_database()),
'MEMBER') IS TRUE
OR pg_catalog.pg_has_role(current_user, owner, 'MEMBER') IS TRUE;
REVOKE ALL ON _timescaledb_internal.job_errors FROM PUBLIC;