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

packaging: setup: Always use formerly-engine-specific PostgreSql conf #600

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

didib
Copy link
Member

@didib didib commented Aug 18, 2022

We currently have two sets of configuration items for PG: One is common
to all DBs, another is specific to the engine. Unite them, by moving the
engine-specific set to the common one.

Cases where this is relevant:

  1. Right now, 'engine-backup --mode=restore --provision-all-databases'
    does not configure the engine-specific items. This causes a next run of
    'engine-setup' (which is mandatory) to prompt, asking whether to
    configure them.

  2. Trying to pre-create DBs using provisiondb, like I am now trying [1],
    leaves postgresql.conf without the engine-specific set. This is worse
    than in (1.), as the code prompting/asking works only with non-new
    databases. It's not a real issue for [1] specifically, because I can
    easily do this there, but decided it's better to patch engine-setup
    directly.

This has no impact on the common case, where all DBs are local, as this
configuration is PG-cluster-wide, not DB-specific.

The main impact is on DWH running on a separate machine, with the
database local to that machine. If the DWH DB is remote, our
documentation already instructs to configure all items, not separating
to two sets.

[1] oVirt/ovirt-system-tests#241

Change-Id: Ief318aa5551cec2d778cf791926518effe404da2
Signed-off-by: Yedidyah Bar David didi@redhat.com

We currently have two sets of configuration items for PG: One is common
to all DBs, another is specific to the engine. Unite them, by moving the
engine-specific set to the common one.

Cases where this is relevant:

1. Right now, 'engine-backup --mode=restore --provision-all-databases'
does not configure the engine-specific items. This causes a next run of
'engine-setup' (which is mandatory) to prompt, asking whether to
configure them.

2. Trying to pre-create DBs using provisiondb, like I am now trying [1],
leaves postgresql.conf without the engine-specific set. This is worse
than in (1.), as the code prompting/asking works only with non-new
databases. It's not a real issue for [1] specifically, because I can
easily do this there, but decided it's better to patch engine-setup
directly.

This has no impact on the common case, where all DBs are local, as this
configuration is PG-cluster-wide, not DB-specific.

The main impact is on DWH running on a separate machine, with the
database local to that machine. If the DWH DB is remote, our
documentation already instructs to configure all items, not separating
to two sets.

[1] oVirt/ovirt-system-tests#241

Change-Id: Ief318aa5551cec2d778cf791926518effe404da2
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

+1

@didib
Copy link
Member Author

didib commented Aug 22, 2022

Verified with:

  • engine-setup
  • engine-backup --file=b1
  • engine-cleanup
  • systemctl stop postgresql
  • rm -rf /var/lib/pgsql/data/*
  • engine-backup --mode=restore --file=b1 --restore-permissions
  • engine-setup

@didib didib merged commit ae1f736 into oVirt:master Aug 22, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants