-
Notifications
You must be signed in to change notification settings - Fork 52
Update add_data_node() API description #541
New issue 8000
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
Conversation
api.md
Outdated
@@ -260,7 +260,7 @@ error or a notice depending on the value of `if_not_exists`. | |||
|
|||
If `bootstrap` is true, the function will attempt to bootstrap the | |||
data node by: | |||
1. Connecting to the database given in `bootstrap_database`. | |||
1. Connecting to the PostgreSQL maintance database (`postgres` or `template1`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a "maintenance" database? This isn't a term we used before, and sounds like a new type of organizational role which seems confusing / not sure if we want to use?
(Regardless, spelling issue:
1. Connecting to the PostgreSQL maintance database (`postgres` or `template1`). | |
1. Connecting to the PostgreSQL maintenance database (`postgres` or `template1`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe "maintenance" is the PostgreSQL terminology, at least they are using it in the source code: https://github.com/postgres/postgres/blob/master/src/bin/scripts/common.c#L173.
It serves for bootstrapping purposes. For example when you need to create a database your client application (libpq/psql) needs to connect to some database first in order to execute CREATE DATABASE
command.
I am OK to rename it to something else or rephrase it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could also remove the first step completely to avoid confusion
@@ -295,7 +284,6 @@ An error will be given if: | |||
| `port` | Port to use on the remote data node. The default is the PostgreSQL port used by the access node on which the function is executed. | | |||
| `if_not_exists` | Do not fail if the data node already exists. The default is `FALSE`. | | |||
| `bootstrap` | Bootstrap the remote data node. The default is `TRUE`. | | |||
| `bootstrap_database` | Database to use when bootstrapping as described above. The default is `'postgres'`. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this optional at all? Or it /only/ supports postgres
or template1
? (If both postgres and template1 supported, which one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic here is equal to the way how PostgreSQL itself handles it. I think we support only those two choices for now. It will try to connect to the postgres
database first and if it fails then try template1
: https://github.com/timescale/timescaledb/blob/master/tsl/src/data_node.c#L552
Restyle and update arguments description according to the latest changes
Restyle and update arguments description according to the latest changes