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

Fix get_bloat for Windows and use PGPASSFILE #560

Closed
wants to merge 0 commits into from

Conversation

marcohald
Copy link
Contributor

Bug reports

Please include:

  • Your operating system name and version
    Windows Server 2019
  • Detailed steps to reproduce the bug
  1. use more than 3 Postgres DBs
    Then the get_bloat crashes with "The command line is too long."

  2. Set a System Environment Variable for the PGPASSFILE
    It get's overwritten by an empty String

Proposed changes

This commit fixes two issue.

  1. The get_bloat executes psql for each database. This is necessary because otherwise it exceeds the maximum 8191 characters limit of windows https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation Which triggers the error "The command line is too long." I observed it with 3 databases

  2. The PGPASSFILE Env varaible is only overwritten by the instance pg_passfile when it is not empty. In this way it is possible to use a system wide PGPASSFILE evnironment variable.

@si-23
Copy link
Member

si-23 commented Sep 27, 2023

Hi,
thank you for uploading a PR.
Please resolve the merge conflicts.

@github-actions
Copy link

github-actions bot commented Sep 28, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@marcohald
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.

@si-23
Copy link
Member

si-23 commented Jun 18, 2024

Hi,
I'm very sorry that I have to ask you again: Please can you rebase your PR?
We're are currently working on a similar topic: "Argument list too long" and we may include your PR in our changes.

I'm sorry for the inconvenience!
BG

@TimotheusBachinger
Copy link
Contributor

Dear Checkmk Contributor! Unfortunately, we had to re-write our git-repo history, rendering your PR auto-closed. We will therefore rebase your PR onto the current master and reopen it again. Sorry for the inconvenience.

@TimotheusBachinger
Copy link
Contributor

Dear Contributor. Unfortunately, we learned that re-opening a PR which was force-rebased, is not possible (see isaacs/github#361). Therefore we kindly ask you to create a new PR for your change. We apologize for the circumstances and will implement technical measures to prevent such incidents in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants