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

sql: added empty stubs for pg_stat* tables #67947

Merged
merged 1 commit into from
Jul 27, 2021

Conversation

mnovelodou
Copy link
Contributor

Previously, pg_catalog didn't include pg_stat* empty stubs
This was inadequate because tools try to use these tables and fail
To address this, this patch adds empty stubs for pg_stats tables

Release note (sql change): Added empty pg_stat* tables on pg_catalog

pg_stat_all_indexes
pg_stat_all_tables
pg_stat_archiver
pg_stat_bgwriter
pg_stat_gssapi
pg_stat_progress_analyze
pg_stat_progress_basebackup
pg_stat_progress_cluster
pg_stat_progress_create_index
pg_stat_progress_vacuum
pg_stat_replication
pg_stat_slru
pg_stat_ssl
pg_stat_subscription
pg_stat_sys_indexes
pg_stat_sys_tables
pg_stat_user_functions
pg_stat_user_indexes
pg_stat_user_tables
pg_stat_wal_receiver
pg_stat_xact_all_tables
pg_stat_xact_sys_tables
pg_stat_xact_user_functions
pg_stat_xact_user_tables
pg_statio_all_indexes
pg_statio_all_sequences
pg_statio_all_tables
pg_statio_sys_indexes
pg_statio_sys_sequences
pg_statio_sys_tables
pg_statio_user_indexes
pg_statio_user_sequences
pg_statio_user_tables

Fixes #67690

@mnovelodou mnovelodou requested a review from rafiss July 22, 2021 18:04
@blathers-crl
Copy link

blathers-crl bot commented Jul 22, 2021

Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added the O-community Originated from the community label Jul 22, 2021
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@blathers-crl
Copy link

blathers-crl bot commented Jul 22, 2021

Thank you for updating your pull request.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

Previously, pg_catalog didn't include pg_stat* empty stubs
This was inadequate because tools try to use these tables and fail
To address this, this patch adds empty stubs for pg_stats tables

Release note (sql change): Added empty pg_stat* tables on pg_catalog

pg_stat_all_indexes
pg_stat_all_tables
pg_stat_archiver
pg_stat_bgwriter
pg_stat_gssapi
pg_stat_progress_analyze
pg_stat_progress_basebackup
pg_stat_progress_cluster
pg_stat_progress_create_index
pg_stat_progress_vacuum
pg_stat_replication
pg_stat_slru
pg_stat_ssl
pg_stat_subscription
pg_stat_sys_indexes
pg_stat_sys_tables
pg_stat_user_functions
pg_stat_user_indexes
pg_stat_user_tables
pg_stat_wal_receiver
pg_stat_xact_all_tables
pg_stat_xact_sys_tables
pg_stat_xact_user_functions
pg_stat_xact_user_tables
pg_statio_all_indexes
pg_statio_all_sequences
pg_statio_all_tables
pg_statio_sys_indexes
pg_statio_sys_sequences
pg_statio_sys_tables
pg_statio_user_indexes
pg_statio_user_sequences
pg_statio_user_tables

Fixes cockroachdb#67690
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good! i had a question which we can address in a separate PR if needed.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @kevin-v-ngo and @mnovelodou)


pkg/sql/testdata/postgres_test_expected_diffs_on_pg_catalog.json, line 153 at r1 (raw file):

    "pg_statistic_ext_data": {},
    "pg_stats": {},
    "pg_stats_ext": {},

do you know why these 4 tables are still not able to be generates with stubs?

Copy link
Contributor Author

@mnovelodou mnovelodou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @kevin-v-ngo and @rafiss)


pkg/sql/testdata/postgres_test_expected_diffs_on_pg_catalog.json, line 153 at r1 (raw file):

Previously, rafiss (Rafi Shamim) wrote…

do you know why these 4 tables are still not able to be generates with stubs?

This is because unmapped missing datatypes, you may see:
https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/testdata/pg_catalog_tables_from_postgres.json

@mnovelodou mnovelodou requested a review from rafiss July 27, 2021 20:59
@rafiss
Copy link
Collaborator

rafiss commented Jul 27, 2021

bors r+

@craig
Copy link
Contributor

craig bot commented Jul 27, 2021

Build succeeded:

@craig craig bot merged commit c7e039f into cockroachdb:master Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-community Originated from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: add empty stubs for remaining pg_stat tables
3 participants