8000 Update add_data_node() API description by pmwkaa · Pull Request #541 · timescale/docs.timescale.com-content · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
Oct 20, 2020
Merged

Update add_data_node() API description #541

merged 1 commit into from
Oct 20, 2020

Conversation

pmwkaa
Copy link
Contributor
@pmwkaa pmwkaa commented Oct 19, 2020

Restyle and update arguments description according to the latest changes

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`).
Copy link
Member
@mfreed mfreed Oct 19, 2020

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:

Suggested change
1. Connecting to the PostgreSQL maintance database (`postgres` or `template1`).
1. Connecting to the PostgreSQL maintenance database (`postgres` or `template1`).

Copy link
Contributor Author
@pmwkaa pmwkaa Oct 20, 2020

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.

Copy link
Contributor Author
@pmwkaa pmwkaa Oct 20, 2020

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'`. |
Copy link
Member

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?

Copy link
Contributor Author

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

@mfreed mfreed added the 2.0 label Oct 20, 2020
@solugebefola solugebefola added the add-to-branches PRs that need to be added to version branches label Oct 20, 2020
Restyle and update arguments description according to the latest changes
@pmwkaa pmwkaa requested a review from mfreed October 20, 2020 13:32
@pmwkaa pmwkaa merged commit 515d954 into timescale:master Oct 20, 2020
@solugebefola solugebefola added added-to-branches and removed add-to-branches PRs that need to be added to version branches labels Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6D7B
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0