8 Commits

Author SHA1 Message Date
Fabrízio de Royes Mello
a4356f342f Remove trailing whitespaces from test code 2022-11-18 16:31:47 -03:00
Bharathy
d218715d5c Fix tests which fail on PG15
When TimescaleDB 2.9.0 compiled against PG15, many tests fail due to
permissions on default public schema not getting propagated to data
nodes, although connected user has required GRANTS on access nodes.
This patch fixes failing tests by explicitly granting required permissions
for connected user or role after data nodes are added.
2022-10-19 17:57:54 +05:30
Sven Klemm
424f6f7648 Remove database port from test output
Don't include the used database ports into test output as this
will lead to failing tests when running against a local instance
or against a preconfigured cloud instance.
2022-09-15 07:56:12 +02:00
Sven Klemm
5c96d25058 Clean up multinode databases in tests
Not cleaning up created databases will prevent multiple
regresschecklocal runs against the same instance cause it will
block recreating the test users as they are still referenced in
those databases.
2022-08-17 10:30:13 +02:00
Erik Nordström
3cf9c857c4 Make errors and messages conform to style guide
Errors and messages are overhauled to conform to the official
PostgreSQL style guide. In particular, the following things from the
guide has been given special attention:

* Correct capitalization of first letter: capitalize only for hints,
  and detail messages.
* Correct handling of periods at the end of messages (should be elided
  for primary message, but not detail and hint messages).
* The primary message should be short, factual, and avoid reference to
  implementation details such as specific function names.

Some messages have also been reworded for clarity and to better
conform with the last bullet above (short primary message). In other
cases, messages have been updated to fix references to, e.g., function
parameters that used the wrong parameter name.

Closes #2364
2020-10-20 16:49:32 +02:00
Dmitry Simonenko
3f2297b173 Block reorder policy for distributed hypertables 2020-10-06 15:46:38 +03:00
Sven Klemm
a9c087eb1e Allow scheduling custom functions as bgw jobs
This patch adds functionality to schedule arbitrary functions
or procedures as background jobs.

New functions:

add_job(
  proc REGPROC,
  schedule_interval INTERVAL,
  config JSONB DEFAULT NULL,
  initial_start TIMESTAMPTZ DEFAULT NULL,
  scheduled BOOL DEFAULT true
)

Add a job that runs proc every schedule_interval. Proc can
be either a function or a procedure implemented in any language.

delete_job(job_id INTEGER)

Deletes the job.

run_job(job_id INTEGER)

Execute a job in the current session.
2020-08-20 11:23:49 +02:00
Mats Kindahl
9bc5c711f4 Fix retention policy on distributed hypertables
If a retention policy is set up on a distributed hypertable, it will
not propagate the drop chunks call to the data nodes since the drop
chunks call is done through an internal call.

This commit fixes this by creating a drop chunks call internally and
executing it as a function. This will then propagate to the data nodes.

Fixes timescale/timescaledb-private#833
Fixes #2040
2020-08-14 07:21:02 +02:00