Skip to content

Support for logical streaming replication#1271

Merged
brianc merged 3 commits into
brianc:masterfrom
kibae:master
Apr 24, 2017
Merged

Support for logical streaming replication#1271
brianc merged 3 commits into
brianc:masterfrom
kibae:master

Conversation

@kibae
Copy link
Copy Markdown
Contributor

@kibae kibae commented Apr 20, 2017

Hello, @brianc @charmander

Please check the codes associated with this request. #1254
After merging, I will create a new project for logical replication.

Thanks

Comment thread lib/connection-parameters.js Outdated
params.push("dbname='" + this.database + "'");
}
if(this.replication) {
params.push("replication='" + (this.database === true ? "true" : this.replication) + "'");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"Replication" can have "database", "true" and "false" values.

This is checking this.database === true, though – not this.replication === true. Is that really intended? I’m not sure why dbname='true' (not replication='true') would have any special meaning beyond a database named “true”.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry. I understand. You are right.
I'll change that code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed this issue in last commit. Check please :)

Comment thread lib/connection-parameters.js Outdated
params.push("dbname='" + this.database + "'");
}
if(this.replication) {
params.push("replication='" + (this.replication === true ? "true" : this.replication) + "'");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since true stringifies to "true", this can be "replication='" + this.replication + "'".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I push the commit that accepted your advice :)

Comment thread lib/client.js Outdated
data.application_name = appName;
}
if (params.replication) {
data.replication = params.replication === true ? 'true' : params.replication;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Similarly: '' + params.replication

Copy link
Copy Markdown
Collaborator

@charmander charmander left a comment

Choose a reason for hiding this comment

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

Some tests might be requested, but these changes look right to me.

@kibae
Copy link
Copy Markdown
Contributor Author

kibae commented Apr 24, 2017

Hi @brianc ,
I'm almost ready! :)

https://github.com/kibae/pg-logical-replication

@brianc
Copy link
Copy Markdown
Owner

brianc commented Apr 24, 2017

@kibae I'm excited for you to get your module out into the wild!! Don't forget to add it to the wiki! I'll go ahead & push a minor version bump right now with the changes in this PR.

@brianc brianc merged commit 4f790de into brianc:master Apr 24, 2017
@brianc
Copy link
Copy Markdown
Owner

brianc commented Apr 24, 2017

published @ 6.2.0!

@kibae
Copy link
Copy Markdown
Contributor Author

kibae commented Apr 25, 2017

@brianc I changed dependencies of pg to 6.2.0
Did you publish 6.2.0 in npm? I got the message when install pg-logical-replication.
Thanks for kindly advise :)

npm ERR! notarget No compatible version found: pg@6.2.0
npm ERR! notarget Valid install targets:
npm ERR! notarget 6.1.5, 6.1.4, 6.1.3, 6.1.2, 6.1.1, 6.1.0, 6.0.4, 6.0.3, 6.0.2, 6.0.1, 6.0.0, 5.1.0, 5.0.0, 4.5.6, 4.5.5, 4.5.4, 4.5.3, 4.5.2, 4.5.1, 4.5.0, 4.4.6, 4.4.5, 4.4.4, 4.4.3, 4.4.2, 4.4.1, 4.4.0, 4.3.0, 4.2.0, 4.1.1, 4.1.0, 4.0.0, 4.0.0-beta2, 3.6.3, 3.6.2, 3.6.1, 3.6.0, 3.5.0, 3.4.5, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4.0, 3.3.0, 3.2.0, 3.1.0, 3.0.3, 3.0.2, 2.11.1, 2.11.0, 2.10.0, 2.9.0, 2.8.5, 2.8.4, 2.8.3, 2.8.2, 2.8.1, 2.8.0, 2.7.0, 2.6.2, 2.6.1, 2.6.0, 2.5.1, 2.5.0, 2.4.0, 2.3.1, 2.3.0, 2.2.0, 2.1.0, 2.0.0, 1.3.0, 1.2.0, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, 0.15.1, 0.15.0, 0.14.1, 0.14.0, 0.13.3, 0.13.1, 0.13.0, 0.12.3, 0.12.1, 0.12.0, 0.11.3, 0.11.2, 0.11.1, 0.10.2, 0.10.0, 0.9.0, 0.8.8, 0.8.7, 0.8.6, 0.8.4, 0.8.3, 0.8.2, 0.8.1, 0.8.0, 0.7.2, 0.7.1, 0.7.0, 0.6.18, 0.6.17, 0.6.16, 0.6.15, 0.6.14, 0.6.13, 0.6.12, 0.6.11, 0.6.10, 0.6.9, 0.6.8, 0.6.7, 0.6.6, 0.6.5, 0.6.4, 0.6.3, 0.6.2, 0.6.1, 0.6.0, 0.5.8, 0.5.7, 0.5.6, 0.5.5, 0.5.4, 0.5.3, 0.5.2, 0.5.1, 0.5.0, 0.4.1

@kibae
Copy link
Copy Markdown
Contributor Author

kibae commented Apr 30, 2017

@brainc It looks like 6.1.5 in npm yet. Can you check it?
thanks :)

@kibae
Copy link
Copy Markdown
Contributor Author

kibae commented May 10, 2017

@brianc @charmander Please publish to npm 6.2.0~

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