Skip to content

Conversation

@maximiliankolb
Copy link
Contributor

@maximiliankolb maximiliankolb commented Dec 8, 2025

What changes are you introducing?

Use long options for pg_isready and pg_restore

Why are you introducing these changes? (Explanation, links to references, issues, etc.)

Using long options improves readability.

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)

Verified locally on EL 9.7:

$ pg_restore --help | grep -- "--dbname\|--host=\|--port=\|--username=\|--clean" | sort -u
  -c, --clean                  clean (drop) database objects before recreating
  -d, --dbname=NAME        connect to database name
  -h, --host=HOSTNAME      database server host or socket directory
  -p, --port=PORT          database server port number
  -U, --username=NAME      connect as specified database user
$ pg_isready --help | grep -- "--dbname\|--host=\|--port=\|--username=\|--clean" | sort -u
  -d, --dbname=DBNAME      database name
  -h, --host=HOSTNAME      database server host or socket directory
  -p, --port=PORT          database server port
  -U, --username=USERNAME  user name to connect as

Contributor checklists

  • I am okay with my commits getting squashed when you merge this PR.
  • I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • Foreman 3.17/Katello 4.19
  • Foreman 3.16/Katello 4.18 (Satellite 6.18)
  • Foreman 3.15/Katello 4.17
  • Foreman 3.14/Katello 4.16 (Satellite 6.17; orcharhino 7.4)
  • Foreman 3.13/Katello 4.15 (EL9 only)
  • Foreman 3.12/Katello 4.14 (Satellite 6.16; orcharhino 7.2 on EL9 only; orcharhino 7.3)
  • We do not accept PRs for Foreman older than 3.12.

Summary by Sourcery

Standardize PostgreSQL utility examples to use long option flags for improved readability.

Documentation:

  • Update pg_isready usage examples to use long-form CLI options.
  • Update pg_restore usage examples to use long-form CLI options in migration documentation.

Using long options improves readability. Verified locally on EL 9.7:

$ pg_restore --help | grep -- "--dbname\|--host=\|--port=\|--username=\|--clean" | sort -u
  -c, --clean                  clean (drop) database objects before recreating
  -d, --dbname=NAME        connect to database name
  -h, --host=HOSTNAME      database server host or socket directory
  -p, --port=PORT          database server port number
  -U, --username=NAME      connect as specified database user
$ pg_isready --help | grep -- "--dbname\|--host=\|--port=\|--username=\|--clean" | sort -u
  -d, --dbname=DBNAME      database name
  -h, --host=HOSTNAME      database server host or socket directory
  -p, --port=PORT          database server port
  -U, --username=USERNAME  user name to connect as
@github-actions github-actions bot added Needs tech review Requires a review from the technical perspective Needs style review Requires a review from docs style/grammar perspective Needs testing Requires functional testing labels Dec 8, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 8, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates PostgreSQL command examples in the documentation to use long-form options for pg_isready and pg_restore to improve readability and consistency.

File-Level Changes

Change Details Files
Update pg_restore command examples to use long-form options instead of short flags.
  • Replace -d, -h, -p, -U, and -c flags with their corresponding --dbname, --host, --port, --username, and --clean long options in pg_restore usage examples
  • Ensure surrounding prose and descriptions still correctly match the updated command syntax
guides/common/modules/proc_installing-postgresql.adoc
Update pg_isready command examples to use long-form options instead of short flags.
  • Replace -d, -h, -p, and -U flags with their corresponding --dbname, --host, --port, and --username long options in pg_isready usage examples
  • Verify the updated examples remain valid for supported PostgreSQL versions referenced by the documentation
guides/common/modules/proc_migrating-to-external-databases.adoc

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@maximiliankolb maximiliankolb added style review done No issues from docs style/grammar perspective and removed Needs style review Requires a review from docs style/grammar perspective Needs testing Requires functional testing labels Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs tech review Requires a review from the technical perspective style review done No issues from docs style/grammar perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants