404 Commits

Author SHA1 Message Date
Pallavi Sontakke
95c7d480fd Remove multinode reference
From update smoke test.

Related to Issue https://github.com/timescale/eng-database/issues/565

So, we no more need update-test-patch for dev-cloud update pre-release tests.
2024-03-14 13:13:34 +05:30
Sven Klemm
fe06eddbf2 Refactor update test
Currently the update test is quite inconvenient to run locally and also
inconvenient to debug as the different update tests all run in their own
docker container. This patch refactors the update test to no longer
require docker and make it easier to debug as it will run in the
local environment as determined by pg_config.
This patch also consolidates update/downgrade and repair test since
they do very similar things and adds support for coredump stacktraces to
the github action and removes some dead code from the update tests.
Additionally the versions to be used in the update test are now
determined from existing git tags so the post release patch no longer
needs to add newly released versions.
2024-03-03 08:29:15 +01:00
Sven Klemm
a058950256 2.14.2 post release
Add 2.14.2 to update tests and adjust version configuration
2024-02-20 13:02:10 +01:00
Sven Klemm
8d8f158302 2.14.1 post release
Adjust update tests to include new version.
2024-02-15 06:15:59 +01:00
Sven Klemm
fc0e41cc13 Fix DecompressChunk path generation with per chunk settings
Adjust DecompressChunk path generation to use the per chunk settings
and not the hypertable settings when building compression info.
This patch also fixes the missing chunk configuration generation
in the update script which was masked by this bug.
2024-02-14 14:18:04 +01:00
Ante Kresic
ba3ccc46db Post-release fixes for 2.14.0
Bumping the previous version and adding tests for 2.14.0.
2024-02-12 09:32:40 +01:00
Alexander Kuzmenkov
d93aa5c8c1
Log internal program errors to CI database (#6598)
SQLSmith finds many internal program errors (`elog`, code `XX000`).
Normally these errors shouldn't be triggered by user actions and
indicate a bug in the program (like `variable not found in subplan
targetlist`). We don't have a capacity to fix all of them currently,
especially since some of them seem to be the upstream ones. This commit
adds logging for these errors so that we at least can study the current
situation.
2024-02-09 13:28:54 +01:00
Alexander Kuzmenkov
d7239f30bd Fix UBSan failure in bulk text decompression
Fix missing alignment handling, and also buffer size problems. We were
not properly reporting the failures in the compression_algo tests, so
didn't notice these problems. Add part of tests from "vector text
predicates" PR to improve coverage.
2024-02-01 14:25:08 +01:00
Sven Klemm
50c757c6f1 Adjust .gitignore for transparent_decompression test files 2024-01-29 12:57:43 +01:00
Jan Nidzwetzki
4cb7bacd17 Change GitHub token for changelog check
Since #6505, the changelog script tries to access the
secrets.ORG_AUTOMATION_TOKEN. However, accessing secrets is not possible
for PRs. This PR changes the token to the default access token, which
is available in PRs and provides read access to the issue API.
2024-01-23 11:15:52 +01:00
Alexander Kuzmenkov
2174a7188d Allow mentioning fixed issues in the changelog
Also allow mentioning the PR like now. The numbers of issues must match
the issues referenced by the PR.
2024-01-19 19:39:13 +01:00
Sven Klemm
d16bc17fe6 Remove grep based update script check
Remove the grep based update script check and add some additional
checks to the AST based one.
2024-01-15 13:33:05 +01:00
Alexander Kuzmenkov
f08dd10425 Check the spelling in our code with codespell 2024-01-11 12:18:50 +01:00
Jan Nidzwetzki
df7a8fed6f Post-release fixes for 2.13.1
Bumping the previous version and adding tests for 2.13.1
2024-01-09 16:31:07 +01:00
Sven Klemm
8f73f95c2a Remove replication_factor field from _timescaledb_catalog.hypertable 2023-12-18 10:53:27 +01:00
Sven Klemm
11dd9af847 Remove multinode catalog objects
This patch removes the following objects:

tables:
- _timescaledb_catalog.chunk_data_node
- _timescaledb_catalog.dimension_partition
- _timescaledb_catalog.hypertable_data_node
- _timescaledb_catalog.remote_txn

views:
- timescaledb_information.data_nodes

functions:
- _timescaledb_functions.hypertable_remote_size
- _timescaledb_functions.chunks_remote_size
- _timescaledb_functions.indexes_remote_size
- _timescaledb_functions.compressed_chunk_remote_stats
2023-12-18 10:53:27 +01:00
Nikhil Sontakke
987435032c Fix MacOSx build issues
The upload script needs access to the "psql" binary with its proper
path. Fix that.
2023-12-15 16:31:56 +05:30
Fabrízio de Royes Mello
78490c47b7 Remove support for creating CAggs with old format
Timescale 2.7 released a new version of Continuous Aggregate (#4269)
that store the final aggregation state instead of the byte array of
the partial aggregate state, offering multiple opportunities of
optimizations as well a more compact form.

In 2.10.0 released on February 2023 the Continuous Aggregate old format
deprecation was announced.

With this PR the ability of creating Continuous Aggregate in the old
format was removed, but we still support migrate from the old to the
new format by running the `cagg_migrate` procedure.

This is the continuation of the PR #5977 started by @pdipesh02.

References:
https://docs.timescale.com/api/latest/continuous-aggregates/cagg_migrate/
https://github.com/timescale/timescaledb/releases/tag/2.10.0
https://github.com/timescale/timescaledb/releases/tag/2.7.0
https://github.com/timescale/timescaledb/pull/5977
2023-12-13 18:48:31 -03:00
Sven Klemm
985c1d2beb fixup 2023-12-12 20:37:35 +01:00
Sven Klemm
5d3ab06295 Remove multinode from update/downgrade test 2023-12-12 20:37:35 +01:00
Fabrízio de Royes Mello
d2284c282a PG16: Enable update/downgrade tests on CI
Note that multinode support was removed from PG16 so starting now
update/downgrade tests will be executed only on singlenode setup.
2023-11-30 07:33:53 -03:00
Jan Nidzwetzki
3b59a8a774 Post-release fixes for 2.13.0
Bumping the previous version and adding tests for 2.13.0.
2023-11-29 21:49:17 +01:00
Jan Nidzwetzki
9fd6d8b817 Add missing new lines to changelog script
Our changelog contains empty lines between the version sections. These
empty lines were missing in the script output so far.
2023-11-28 21:02:03 +01:00
Jan Nidzwetzki
b423d14ef5 Adjust restore points test for PG 16
Currently, MN is not supported on PG16. Therefore, the creation of
distributed restore points fails on PG16. This patch disables the CI
test for this PG version.
2023-11-09 11:43:49 +01:00
Fabrízio de Royes Mello
fbc1fbb64b PG16: Enable CI
This commit enables PG16 in the following workflows:
* Regression Linux (including 32bit)
* ABI test
* Memory tests
* Sanitizer tests
* Coverity
2023-11-04 13:29:02 -03:00
Sven Klemm
1126b08567 2.12.2 Post-release
Add 2.12.2 to update test scripts and add update downgrade metadata.
2023-10-23 18:31:36 +02:00
Fabrízio de Royes Mello
f12ed00cec Add CI check for unecessary template tests
When the regression tests output differs between PG versions we create a
template test file (*.sql.in) and add several different output files for
each supported version.

Over time we support new PG version and deprecate older ones, for
example nowadays we're working on PG16 support and removed PG12 so we
need to check if we still need template files.
2023-10-13 11:32:43 -03:00
Konstantina Skovola
5752c33b0a Post-release fixes for 2.12.1
Bumping the previous version and adding tests for 2.12.1.
Also adjust tagging date in changelog.
2023-10-13 10:55:51 +03:00
Dipesh Pandit
0b87a069e7 Add metadata for chunk creation time
- Added creation_time attribute to timescaledb catalog table "chunk".
  Also, updated corresponding view timescaledb_information.chunks to
  include chunk_creation_time attribute.
- A newly created chunk is assigned the creation time during chunk
  creation to handle new partition range for give dimension (Time/
  SERIAL/BIGSERIAL/INT/...).
- In case of an already existing chunk, the creation time is updated as
  part of running upgrade script. The current timestamp (now()) at the
  time of upgrade has been assigned as chunk creation time.
- Similarly, downgrade script is updated to drop the attribute
  creation_time from catalog table "chunk".
- All relevant queries/views/test output have been updated accordingly.

Co-authored-by: Nikhil Sontakke <nikhil@timescale.com>
2023-10-04 14:49:05 +05:30
Konstantina Skovola
c1b500f0be Fix pylint errors 2023-10-02 20:59:08 +03:00
Konstantina Skovola
f505bd2207 Add CI check for incorrect catalog updates
There are certain modifications/commands that should not be allowed
in our update/downgrade scripts. For example, when adding or dropping
columns to timescaledb catalog tables, the right way to do this is to
drop and recreate the table with the desired definition instead of doing
ALTER TABLE ... ADD/DROP COLUMN. This is required to ensure consistent
attribute numbers across versions.
This workflow detects this and some other incorrect catalog table
modifications and fails with an error in that case.

Fixes #6049
2023-10-02 12:15:59 +03:00
Sven Klemm
b339131c68 2.12.0 Post-release adjustments 2023-09-27 09:38:11 +02:00
Jan Nidzwetzki
683e2bcf18 Schedule compression policy more often
By default, the compression policy is scheduled for every
chunk_time_interval / 2 in the current implementation, equal to three
days and twelve hours with our default settings. This schedule interval
was sufficient for previous versions of TimescaleDB. However, with the
introduction of features like mutable compression and ON CONFLICT .. DO
UPDATE queries, regular DML operations decompress data. To ensure that
modified data is compressed earlier, this patch reduces the schedule
interval of the compression policy to run at least every 12 hours.
2023-09-22 12:30:57 +02:00
Sven Klemm
183362e17b Move size_util functions to _timescaledb_functions schema
To increase schema security we do not want to mix our own internal
objects with user objects. Since chunks are created in the
_timescaledb_internal schema our internal functions should live in
a different dedicated schema. This patch make the necessary
adjustments for the following functions:

- relation_size(regclass)
- data_node_hypertable_info(name, name, name)
- data_node_chunk_info(name, name, name)
- hypertable_local_size(name, name)
- hypertable_remote_size(name, name)
- chunks_local_size(name, name)
- chunks_remote_size(name, name)
- range_value_to_pretty(bigint, regtype)
- get_approx_row_count(regclass)
- data_node_compressed_chunk_stats(name, name, name)
- compressed_chunk_local_stats(name, name)
- compressed_chunk_remote_stats(name, name)
- indexes_local_size(name, name)
- data_node_index_size(name, name, name)
- indexes_remote_size(name, name, name)
2023-08-22 12:05:23 +02:00
Sven Klemm
0a66bdb8d3 Move functions to _timescaledb_functions schema
To increase schema security we do not want to mix our own internal
objects with user objects. Since chunks are created in the
_timescaledb_internal schema our internal functions should live in
a different dedicated schema. This patch make the necessary
adjustments for the following functions:

- to_unix_microseconds(timestamptz)
- to_timestamp(bigint)
- to_timestamp_without_timezone(bigint)
- to_date(bigint)
- to_interval(bigint)
- interval_to_usec(interval)
- time_to_internal(anyelement)
- subtract_integer_from_now(regclass, bigint)
2023-08-21 15:01:35 +02:00
Sven Klemm
0dd06e919f Move get_create_command into _timescaledb_functions schema
To increase schema security we do not want to mix our own internal
objects with user objects. Since chunks are created in the
_timescaledb_internal schema our internal functions should live in
a different dedicated schema. This patch make the necessary
adjustments for the get_create_command function.
2023-08-21 11:29:37 +02:00
Konstantina Skovola
2080c3c0f0 Post-release fixes for 2.11.2
Bumping the previous version and adding tests for 2.11.2
2023-08-21 09:48:06 +03:00
Mats Kindahl
71b0168ab7 Add debug utilities to debug builds
This will move the definitions of `debug_waitpoint_enable`,
`debug_waitpoint_disable`, and `debug_waitpoint_id` to always be
defined for debug builds and modify existing tests accordingly.

This means that it is no longer necessary to generate isolation test
files from templates (in most cases), and it will be straightforward to
use these functions in debug builds.

The debug utilities can be disabled by setting the option
`ENABLE_DEBUG_UTILS` to `OFF`.
2023-08-14 14:42:47 +02:00
Lakshmi Narayanan Sreethar
e5691bee11 Cleanup PG12 specific code from source and test files
Removed the PG12 specific macros and all the now, dead code. Also updated
the testcases which had workarounds in place to make them compatible
with PG12.
2023-07-25 16:00:18 +05:30
Lakshmi Narayanan Sreethar
c3a9f90fdd Merge PG12 specific testfiles
Merged testfiles that were split out due to their output differing only
in PG12.
2023-07-25 16:00:18 +05:30
Jan Nidzwetzki
b9a58dd5c4 Exclude workflow changes from being backported
The backport script for the PRs does not have the permission to backport
PRs which include workflow changes. So, these PRs are excluded from
being automatically backported.

Failed CI run:

https://github.com/timescale/timescaledb/actions/runs/5387338161/
   jobs/9780701395

> refusing to allow a GitHub App to create or update workflow
> `.github/workflows/xxx.yaml` without `workflows` permission)
2023-07-03 12:57:12 +02:00
Jan Nidzwetzki
a7be1cc06a Fixed the ordering of merge_changelogs.sh script
The CHANGELOG.MD file contains the sections features, bugfixes, and
thanks. This patch adjusts the script merge_changelogs.sh to produce
the sections in the same order.
2023-06-30 11:33:57 +02:00
Jan Nidzwetzki
8a58101095 Post-release fixes for 2.11.1
Bumping the previous version and adding tests for 2.11.1.
2023-06-30 09:54:57 +02:00
Jan Nidzwetzki
f172679022 Added perltidy make target
This patch introduces the make target 'perltidy' to format Perl files
with perltidy. In addition, calling perltidy is added to 'make format'.
2023-06-26 10:59:19 +02:00
Zoltan Haindrich
769646bdb6 Fix issues with scripts/test_update_smoke.sh
The test was failing on first run by leaving a database behind as a
sideeffect.
Between two steps the extension was dropped; without a proper cleanup.
A non-existent sql function was called during cleanup.

This patch also removes the "debug mode" and every execution will leave
the logs/etc in the /tmp directory for further inspection.
2023-06-07 13:30:21 +02:00
Zoltan Haindrich
ac7090653e Ensure PR number is referenced in the .unreleased files
Adds a simple check to ensure that the PR number is present at least once
in the added changelog file.
Also fixes an earlier PR which introduced a typo.
2023-06-02 18:33:53 +02:00
Zoltan Haindrich
ab2cccb6e2 Post-release 2.11.0
Adjust the upgrade/downgrade scripts and add the tests.

(cherry picked from commit d5fea0a842cbd38d2d72db16e9e67f1c9b1ccf36)
2023-05-25 18:22:32 +02:00
Maheedhar PV
38ee7f49b0 Every PR to have its own changelog
The changes in this commit
1. workflow action to check if the PR has its own changelog file in
".unreleased/" folder.
2. script to merge the individual changelog entries that can be copied
into the CHANGELOG.md file.
3. script to check the format of the lines in the change log file.
4. script to delete the individual changelogs, post release.
2023-05-19 13:51:37 +05:30
Alexander Kuzmenkov
fb65086b55 Add a ubsan suppression for overflow in histogram()
It is in postgres code, and doesn't lead to bugs.
2023-05-16 21:32:52 +02:00
Fabrízio de Royes Mello
cc9c3b3431 Post-release 2.10.3
Adjust the upgrade/downgrade scripts and add the tests.
2023-04-28 10:05:11 -03:00