Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redshift compatibility #39

Open
zeubs opened this issue Jul 5, 2021 · 1 comment
Open

Redshift compatibility #39

zeubs opened this issue Jul 5, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@zeubs
Copy link

zeubs commented Jul 5, 2021

aws redshift uses a flavour of postgres and a couple of funcoitns aren't exactly the same.
for instance:
show server_version; actually is SELECT version();
because of this error the comparison fails instantly as I'm guessing that's pretty early in the process.
please would you consider allowing us to specify redshift and alter some sys queries?

` Author: [object Object]
Version: 2.2.0
PostgreSQL: 9.6+
License: MIT
Description: PostgreSQL schema and data comparing tool

CONFIGURED OPTIONS
Script Author: your-name-or-nickname-or-anything-else
Output Directory: /home/zeubs/Downloads/pg-diff/sqlscripts
Schema Namespaces: will be retrieve dynamically from database
Data Compare: DISABLED

[|------------------] 10% - Connecting to source database ...
error: must be superuser to examine "server_version"
at Parser.parseErrorMessage (/usr/local/lib/node_modules/pg-diff-cli/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/usr/local/lib/node_modules/pg-diff-cli/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/usr/local/lib/node_modules/pg-diff-cli/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket.stream.on (/usr/local/lib/node_modules/pg-diff-cli/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
`

@michaelsogos
Copy link
Owner

michaelsogos commented Aug 5, 2021

Dear @zeubs

For redshift support i will investigate.

Your problem however is not about different kind of command between a customized version of postgresql or not; the problem is more about ACCESS DENIED to some needed tables.
This tool, in order to collect all metadata needed for comparison between databases, need a high privilege access to catalog tables.
So, the SHOW server_version; is just the first breaking point, but once resolved it in some other way (as you suggest) a new breaking point will be encountered going to query any pg_catalog table. That's the point! 😄

Here the potential breaking point.
https://docs.aws.amazon.com/redshift/latest/dg/c_join_PG.html

@michaelsogos michaelsogos self-assigned this Aug 5, 2021
@michaelsogos michaelsogos added the enhancement New feature or request label Aug 5, 2021
@michaelsogos michaelsogos added this to the Milestone 2.0 milestone Aug 5, 2021
@michaelsogos michaelsogos moved this to To do in pg-diff-cli Jun 6, 2024
@michaelsogos michaelsogos moved this from To do to Triage in pg-diff-cli Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Triage
Development

No branches or pull requests

2 participants