You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if the user creates the pg_stat_statements extension in some schema other than public, assess migration command will fail with: ERROR: relation "pg_stat_statements" does not exist
This is because we check for the existence of the pg_stat_statements extension in the entire database and not in any particular schema. Once this check goes through, we run the metadata queries on the public schema. This is where the command fails.
Example:
postgres=# set search_path to schema2;
SET
postgres=# create extension pg_stat_statements;
CREATE EXTENSION
postgres=# set search_path to public;
SET
postgres=# SELECT 1 FROM pg_extension WHERE extname = 'pg_stat_statements';
?column?
----------
1
(1 row)
postgres=# CREATE TEMP TABLE temp_table AS
SELECT
queryid,
query
FROM
pg_stat_statements
WHERE
dbid = (SELECT oid FROM pg_database WHERE datname = current_database());
ERROR: relation "pg_stat_statements" does not exist
LINE 6: pg_stat_statements
^
Complete command error:
yb-voyager assess-migration --export-dir ${EXPORT_DIR} --source-db-type ${SOURCE_DB_TYPE} --source-db-host ${SOURCE_DB_HOST} --source-db-user ${SOURCE_DB_USER} --source-db-schema ${SOURCE_DB_SCHEMA} --source-db-password ${SOURCE_DB_PASSWORD} --source-db-name ${SOURCE_DB_NAME} --start-clean t --yes --iops-capture-interval 1
migrationID: 4389dc4c-f88a-4455-bac7-91f1e59179d1
gathering metadata and stats from 'postgresql' source database...
sleep interval for calculating iops: 1 seconds
Assessment metadata collection started for ''public|schema2'' schemas
Collecting db queries summary...
psql:/etc/yb-voyager/gather-assessment-metadata/postgresql/db-queries-summary.psql:8: ERROR: relation "pg_stat_statements" does not exist
LINE 6: pg_stat_statements
^
command failed: psql -q 'postgresql://postgres@localhost:5432/postgres' -f /etc/yb-voyager/gather-assessment-metadata/postgresql/db-queries-summary.psql -v schema_list='public|schema2' -v ON_ERROR_STOP=on
failed to assess migration: failed to gather assessment metadata: error gathering metadata and stats from source PG database: error waiting for gather assessment metadata script to complete: exit status 1
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
I confirm this issue does not contain any sensitive information.
The text was updated successfully, but these errors were encountered:
Jira Link: DB-13958
Description
if the user creates the pg_stat_statements extension in some schema other than public, assess migration command will fail with:
ERROR: relation "pg_stat_statements" does not exist
This is because we check for the existence of the pg_stat_statements extension in the entire database and not in any particular schema. Once this check goes through, we run the metadata queries on the public schema. This is where the command fails.
Example:
Complete command error:
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: