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

Ensure worker_save_query_explain_analyze always fully qualifies types #5776

Merged
merged 7 commits into from
Mar 10, 2022

Conversation

marcocitus
Copy link
Member

DESCRIPTION: Fixes a bug that could cause worker_save_query_explain_analyze to fail on custom types

We've seen cases where EXPLAIN ANALYZE fails when the query returns a type that is on the search_path on the coordinator, but not on the worker, because format_type does not qualify the name in that case.

@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #5776 (d6a3eef) into master (2cb02bf) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head d6a3eef differs from pull request most recent head 80b9c09. Consider uploading reports for the commit 80b9c09 to get more accurate results

@@            Coverage Diff             @@
##           master    #5776      +/-   ##
==========================================
- Coverage   92.64%   92.61%   -0.03%     
==========================================
  Files         228      227       -1     
  Lines       47474    47379      -95     
==========================================
- Hits        43980    43880     -100     
- Misses       3494     3499       +5     

@onurctirtir
Copy link
Member

A nice test case suggestion:

create schema my_schema;
create type my_schema.my_type as (int_field int);
create table tbl (a my_schema.my_type);
SELECT create_distributed_table('tbl', 'a');
set search_path to my_schema,public;

explain analyze select * from tbl ; --worker query crashes
WARNING: SSL SYSCALL error: EOF detected
connection not open
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
ERROR: type "my_type" does not exist
CONTEXT: while executing command on localhost:10700
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

@onurctirtir onurctirtir force-pushed the marcocitus/fix-explain branch from 31cdd15 to ec839f4 Compare March 9, 2022 16:18
@marcocitus
Copy link
Member Author

marcocitus commented Mar 10, 2022

🚢 looks good to me

@onurctirtir onurctirtir enabled auto-merge (squash) March 10, 2022 15:07
@onurctirtir onurctirtir self-requested a review March 10, 2022 15:08
@onurctirtir onurctirtir merged commit 49467e2 into master Mar 10, 2022
@onurctirtir onurctirtir deleted the marcocitus/fix-explain branch March 10, 2022 15:30
marcocitus added a commit that referenced this pull request Mar 11, 2022
…#5776)

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
Co-authored-by: Marco Slot <marco.slot@gmail.com>
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

Successfully merging this pull request may close these issues.

3 participants