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

Excluding foreign tables #50

Closed
nobelsmith opened this issue Feb 26, 2024 · 1 comment
Closed

Excluding foreign tables #50

nobelsmith opened this issue Feb 26, 2024 · 1 comment

Comments

@nobelsmith
Copy link

I am trying to exclude foreign tables because I am getting a hypopg error when trying to create an index on them. However even if i pass them in to dexter using --exclude I get the same error.

For example:
dexter --pg-stat-statements -d mydb --exclude foo.bar --log-sql --log-level debug2

results in:

[sql] SELECT * FROM hypopg_create_index('CREATE INDEX ON "foo"."bar" ("column")')
/opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:539:in `exec_params': ERROR:  hypopg: "bar" is not a table or materialized view (PG::InternalError)
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:539:in `block in execute'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:535:in `synchronize'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:535:in `execute'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:604:in `create_hypothetical_index'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:598:in `block (2 levels) in create_hypothetical_indexes_helper'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:597:in `permutation'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:597:in `block in create_hypothetical_indexes_helper'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:595:in `each'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:595:in `create_hypothetical_indexes_helper'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:219:in `create_hypothetical_indexes'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:99:in `process_queries'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/indexer.rb:32:in `process_stat_statements'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/client.rb:27:in `perform'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/lib/dexter/client.rb:9:in `start'
	from /opt/dexter/vendor/bundle/ruby/3.1.0/gems/pgdexter-0.5.2/exe/dexter:7:in `<top (required)>'
	from /opt/dexter/bin/dexter:17:in `load'
	from /opt/dexter/bin/dexter:17:in `<main>'

I am currently running postgres 16 on ubuntu 22.04 any help would be greatly appreciated!

@ankane ankane closed this as completed in 9e93dc1 Feb 27, 2024
@ankane
Copy link
Owner

ankane commented Feb 27, 2024

Hi @nobelsmith, thanks for reporting! I'm not able to reproduce the issue with --exclude, but fixed the error with foreign tables in the commit above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants