-
Notifications
You must be signed in to change notification settings - Fork 169
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
Add HBA config file support, add hba reload logic. #442
Conversation
Dear maintainers @reshke @usernamedt @x4m ! I wonder if you could take a look to this PR? If you have a time, of course. Despite, it might be looks "ugly", but the implementation almost the same in pgbouncer: The purpose of this PR:
p.s. IMO the performance test with/without that feature would be a nice. |
@@ -20,17 +20,23 @@ then | |||
exit 1 | |||
fi | |||
|
|||
ody-stop |
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.
Errr, does it work? I think we need to stop old instance, right?
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.
Eithrer way we can remove stop at the end of the file :)
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.
This change is ok, ody-stop is called in every test
LGTM |
if (isalnum(*parser->pos)) { | ||
token->type = OD_PARSER_KEYWORD; | ||
token->line = parser->line; | ||
token->value.string.pointer = parser->pos; | ||
while (parser->pos < parser->end && *parser->pos != ',' && | ||
(isalnum(*parser->pos) || ispunct(*parser->pos))) | ||
parser->pos++; | ||
token->value.string.size = | ||
parser->pos - token->value.string.pointer; | ||
return token->type; | ||
} |
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.
so this is keyword parsing, why is it differs from od_parser_next keyword parsing?
/* keyword */
if (isalpha(*parser->pos)) {
token->type = OD_PARSER_KEYWORD;
token->line = parser->line;
token->value.string.pointer = parser->pos;
while (parser->pos < parser->end &&
(*parser->pos == '_' || isalpha(*parser->pos) ||
isdigit(*parser->pos)))
parser->pos++;
token->value.string.size =
parser->pos - token->value.string.pointer;
return token->type;
}
for (int i = 0; i < 16; ++i) { | ||
uint8_t client_net_byte = rule_mask->sin6_addr.s6_addr[i] & | ||
sin->sin6_addr.s6_addr[i]; | ||
if (client_net_byte ^ rule_addr->sin6_addr.s6_addr[i]) { |
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.
Such a strange way to write x == y ?
Thanks to @sanyabas for initial implementation and @vadv for putting effort on this to be merged, also thanks @chobostar for review |
add hba support, based on #276.