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

Parsing pgpool.conf fails when there is no newline at the end #66

Open
thaumatoast opened this issue Aug 14, 2024 · 1 comment
Open
Assignees

Comments

@thaumatoast
Copy link

When there is no newline at the end of pgpool.conf, parsing will fail and the process exits.

This was discovered with version 4.5.2 installed via apt. When done this way, the process immediately segfaults and does a core dump and provides no additional output.

I built pgpool from source with debug symbols enabled off the latest master (SHA 734771d). When running the version built from source, I got this error:

2024-08-14 17:06:48.098: main pid 30962: FATAL:  syntax error in configuration file "/etc/pgpool2/pgpool.conf"
2024-08-14 17:06:48.098: main pid 30962: DETAIL:  parse error at line 1006 '#' token = 8

The last line of pgpool.conf in this case was line 1006 which was: # Regexp are accepted (equivalent of line 1013 in the sample config).

I added a newline to the end of pgpool.conf; the version built from source no longer displays errors and version 4.5.2 installed via apt no longer segfaults.

@pengbo0328 pengbo0328 self-assigned this Aug 20, 2024
@pengbo0328
Copy link
Collaborator

pengbo0328 commented Aug 20, 2024

If possible, could you check if the same issue occurs in PostgreSQL?
If it does, you will need to manually add a newline.
If the issue does not occur in PostgreSQL, Pgpool-II should handle it in the same way as PostgreSQL.

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

No branches or pull requests

2 participants