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

Append IF NOT EXISTS to deparsed CREATE SERVER commands #3875

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

onurctirtir
Copy link
Member

@onurctirtir onurctirtir commented Jun 5, 2020

Append IF NOT EXISTS to CREATE SERVER commands generated by pg_get_serverdef_string
function when deparsing an existing server object that a foreign table depends in order to
provide possible errors if we will execute the returned DDL command in the same node.

@onurctirtir onurctirtir self-assigned this Jun 5, 2020
@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #3875 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3875   +/-   ##
=======================================
  Coverage   91.57%   91.57%           
=======================================
  Files         185      185           
  Lines       36553    36554    +1     
=======================================
+ Hits        33473    33475    +2     
+ Misses       3080     3079    -1     

1 similar comment
@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #3875 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3875   +/-   ##
=======================================
  Coverage   91.57%   91.57%           
=======================================
  Files         185      185           
  Lines       36553    36554    +1     
=======================================
+ Hits        33473    33475    +2     
+ Misses       3080     3079    -1     

Copy link
Contributor

@SaitTalhaNisanci SaitTalhaNisanci left a comment

Choose a reason for hiding this comment

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

This change seems okay to me but I am not sure about if this could be problematic for some scenarios, could be useful to get a review from someone else too

@onderkalaci
Copy link
Member

I cannot foresee any problems with that (also we seem to considered this earlier as well).

I guess on local citus tables, we're going to have both the shell table and the shard point to the same server. Is this the reason for this change? If that's the case, I need think a bit more on that (though we can merge this anyway)

@onurctirtir
Copy link
Member Author

onurctirtir commented Jun 5, 2020

I actually thought in that way:

we're going to have both the shell table and the shard point to the same server. Is this the reason for this change?

We should think a bit more on this in #3852. But I guess even if we decide to create another server object for the shard there, changes done in this pr shouldn't do any harm I think.

Append IF NOT EXISTS to CREATE SERVER commands generated by
pg_get_serverdef_string function when deparsing an existing
server object that a foreign table depends.
@onurctirtir onurctirtir force-pushed the create-server-append-if-not-exists branch from 98a52d8 to 5634cbb Compare June 5, 2020 14:42
@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #3875 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3875      +/-   ##
==========================================
- Coverage   91.57%   91.57%   -0.01%     
==========================================
  Files         185      185              
  Lines       36555    36554       -1     
==========================================
- Hits        33477    33475       -2     
- Misses       3078     3079       +1     

@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #3875 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3875      +/-   ##
==========================================
- Coverage   91.57%   91.55%   -0.03%     
==========================================
  Files         185      185              
  Lines       36555    36556       +1     
==========================================
- Hits        33477    33468       -9     
- Misses       3078     3088      +10     

3 similar comments
@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #3875 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3875      +/-   ##
==========================================
- Coverage   91.57%   91.55%   -0.03%     
==========================================
  Files         185      185              
  Lines       36555    36556       +1     
==========================================
- Hits        33477    33468       -9     
- Misses       3078     3088      +10     

@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #3875 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3875      +/-   ##
==========================================
- Coverage   91.57%   91.55%   -0.03%     
==========================================
  Files         185      185              
  Lines       36555    36556       +1     
==========================================
- Hits        33477    33468       -9     
- Misses       3078     3088      +10     

@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #3875 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3875      +/-   ##
==========================================
- Coverage   91.57%   91.55%   -0.03%     
==========================================
  Files         185      185              
  Lines       36555    36556       +1     
==========================================
- Hits        33477    33468       -9     
- Misses       3078     3088      +10     

@onurctirtir onurctirtir merged commit 8b39d12 into master Jun 5, 2020
@onurctirtir onurctirtir deleted the create-server-append-if-not-exists branch June 5, 2020 15:04
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.

None yet

3 participants