SELECT 'authentication.eventlog' AS table_name, COUNT(*) AS row_count
FROM authentication.eventlog
UNION ALL
SELECT 'authentication.eventlog_plain' AS table_name, COUNT(*) AS row_count
FROM authentication.eventlog_plain;
Drop and rename table
DROP TABLE authentication.eventlog CASCADE;
ALTER TABLE authentication.eventlog_plain RENAME TO eventlog;
authz.eventlog
View colums in the table
SELECT column_name
FROM information_schema.columns
WHERE table_schema = 'authz'
AND table_name = 'eventlog';
SELECT 'authz.eventlog' AS table_name, COUNT(*) AS row_count
FROM authz.eventlog
UNION ALL
SELECT 'authz.eventlog_plain' AS table_name, COUNT(*) AS row_count
FROM authz.eventlog_plain;
Drop and rename table
DROP TABLE authz.eventlog CASCADE;
ALTER TABLE authz.eventlog_plain RENAME TO eventlog;
Before upgrading to version 16
Check if extension is dropped
SELECT * FROM pg_extension WHERE extname = 'timescaledb';
Analyze how to convert data from TimescaleDB to normal tables.
Procedure:
Time to copy data from timescaldb to plain:
Scripts
Run script as auth_auditlog_admin
authentication-eventlog
View colums in the table
Create new table
Copy data
Verify data
Drop and rename table
authz.eventlog
View colums in the table
Create new table
Copy data
Verify data
Drop and rename table
Before upgrading to version 16
Check if extension is dropped
Drop extension is it still present