Comments (5)
Hi. pg_subscription.subconninfo
column is not used by any of the gem queries. Also I've used this gem with multiple RDS database and never seen this error.
Can you rerun the raw SQL query from https://github.com/pawurb/ruby-pg-extras/blob/main/lib/ruby_pg_extras/queries/null_indexes.sql (you have to substitute %{min_relation_size_mb}) and check if the problem persists? I think it could be related to your AR connection setup.
from ruby-pg-extras.
Did any of those RDS databases have logical replication enabled? We're running PostgreSQL version 16.3R2 on RDS, by the way.
I already ran the raw SQL query, same error. I also managed to reproduce the issue with the following, more limited, query:
SELECT *
FROM
pg_class c
JOIN pg_index i ON i.indexrelid = c.oid
JOIN pg_attribute a ON a.attrelid = c.oid
JOIN pg_class c_table ON c_table.oid = i.indrelid
LEFT JOIN pg_stats s ON s.tablename = c_table.relname AND a.attname = s.attname;
ERROR: permission denied for attribute pg_subscription.subconninfo
Note that if I leave out the LEFT JOIN pg_stats s ON s.tablename = c_table.relname AND a.attname = s.attname;
bit, it works fine. Apparently sensitive information may be stored in the pg_stats
catalog for that column.
from ruby-pg-extras.
@gstokkink I don't think I've used it with logical replication only read replicas. I don't know how to resolve this issue, and currently don't have time to reproduce and debug it. I'm open to any PRs that would fix it.
Maybe a workaround for you is to run this query on a read replica which does not have replication enabled?
from ruby-pg-extras.
@pawurb would it be an acceptable fix for you to explicitly leave out system catalogs in the various queries? This can be done, for example, by ignoring all namespaces that start with pg_
. See https://www.postgresql.org/docs/current/catalogs.html for more details. I don't think people are particularly interested in the indexes that PG maintains itself on the system catalogs.
from ruby-pg-extras.
I'm not sure I understand, how filtering out the indexes would resolve this issue? Can you provide a sample PR? Also is only null_indexes
not working with your current setup or other queries as well?
from ruby-pg-extras.
Related Issues (11)
- pg_buffercache inspection HOT 3
- License issue? HOT 2
- All Locks "age" accuracy and including `pg_stat_activity.application_name` HOT 1
- support tables as strings instead of putsing HOT 7
- Customizing queries, ignore schemas HOT 1
- Dependency on unsupported filesize gem HOT 1
- Feature request: Partial indexes for columns with high % of the same value HOT 1
- Exception: undefined method `fetch' for nil:NilClass (when no sslinfo installed) HOT 2
- Incorporating pg_stat_monitor support? HOT 1
- auto_explain feature support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-pg-extras.