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

Can't set initial or max size in limits file #129

Closed
dtseiler opened this issue Jan 14, 2021 · 2 comments
Closed

Can't set initial or max size in limits file #129

dtseiler opened this issue Jan 14, 2021 · 2 comments
Assignees
Labels
enhancement Improvement to an existing feature

Comments

@dtseiler
Copy link

Describe the bug

When I create a pgagroal_databases.conf and set values for initial and max size, pgagroal fails to start and the log has this error:

FATAL configuration.c:1293 Unknown user 'all' for limit entry 0

If I don't use the limits file, or if I just take the limits out so the contents are all all all per the example at https://github.com/agroal/pgagroal/blob/master/doc/CONFIGURATION.md#pgagroal_databases-configuration, it starts just fine.

To Reproduce

Create /usr/local/etc/pgagroal/pgagroal_databases.conf with these contents (tab delimited fields):

#
# DATABASE USER  MAX_SIZE INITIAL_SIZE MIN_SIZE
#
all     all     all     50      25

Start pgagroal like so:

$ sudo -u pgagroal /usr/local/bin/pgagroal -d -c /usr/local/etc/pgagroal/pgagroal.conf -a /usr/local/etc/pgagroal/pgagroal_hba.conf -l /usr/local/etc/pgagroal/pgagroal_databases.conf

Version

1.1.0

@dtseiler dtseiler added the bug Something isn't working label Jan 14, 2021
@jesperpedersen
Copy link
Collaborator

jesperpedersen commented Jan 25, 2021

The limits functionality needs more work for corner-cases like this. Maybe all should be a reserved word for max_size.

For now, you can set the limits for the specific users that you have like

username database all initial min

@jesperpedersen jesperpedersen self-assigned this Jan 25, 2021
jesperpedersen added a commit that referenced this issue Feb 2, 2021
@jesperpedersen
Copy link
Collaborator

I have updated the way limits are parsed, so new docs. I think it works better this way, but not going to back patch to 1.1.x.

Thanks for the feedback Don !

@jesperpedersen jesperpedersen added enhancement Improvement to an existing feature and removed bug Something isn't working labels Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants