-
Notifications
You must be signed in to change notification settings - Fork 249
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
[Feature]: disable WAL archiving during import bootstrap #3741
Labels
triage
Pending triage
Comments
2 tasks
Thinking more about this, we should definitely:
And then, before we conclude the job, run:
See the initdb -S option for details. |
gbartolini
added a commit
that referenced
this issue
Jan 29, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job, by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
armru
pushed a commit
that referenced
this issue
Jan 29, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job, by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
gbartolini
added a commit
that referenced
this issue
Jan 30, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job, by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
mnencia
pushed a commit
that referenced
this issue
Jan 30, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job, by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
mnencia
pushed a commit
that referenced
this issue
Jan 30, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job, by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
mnencia
added a commit
that referenced
this issue
Jan 30, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `max_wal_senders` to `0` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. This avoids unnecessary and systematic piling of WAL files during any import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
cnpg-bot
pushed a commit
that referenced
this issue
Jan 30, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `max_wal_senders` to `0` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. This avoids unnecessary and systematic piling of WAL files during any import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> (cherry picked from commit 9e58cbd)
cnpg-bot
pushed a commit
that referenced
this issue
Jan 30, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `max_wal_senders` to `0` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. This avoids unnecessary and systematic piling of WAL files during any import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> (cherry picked from commit 9e58cbd)
cnpg-bot
pushed a commit
that referenced
this issue
Jan 30, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `max_wal_senders` to `0` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. This avoids unnecessary and systematic piling of WAL files during any import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> (cherry picked from commit 9e58cbd)
armru
added a commit
that referenced
this issue
Feb 1, 2024
When using the import facility of the initdb bootstrap method in a job, optimize the PostgreSQL instance for the sole duration of the job by setting the following GUCs: - `archive_mode` to `off` - `fsync` to `off` - `full_page_writes` to `off` - `max_wal_senders` to `0` - `wal_level` to `minimal` Then, restore the configuration and invoke `initdb --sync-only` before the end of the import job. This avoids unnecessary and systematic piling of WAL files during any import job. Closes #3741 Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com> Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com> Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue already for this feature request/idea?
What problem is this feature going to solve? Why should it be added?
When using the
import
facility of theinitdb
bootstrap method in a job, the PostgreSQL instance has the following values:archive_mode
is set toon
(fixed)archive_command
is left emptywal_level
is set tological
(fixed)The empty
archive_command
is fine with both standardinitdb
andrecovery
bootstraps, as it will have the effect to accumulate WAL files for the short duration of the instance run time.However, in the
import
phase, the Postgres instance may run for quite some time and accumulate a lot of WAL files, increasing the risk of running out of disk in the WAL partition with subsequent failure of the cluster deployment.Describe the solution you'd like
In the specific
import
phase, we should set, just for the job duration:archive_mode
is set tooff
wal_level
is set tominimal
This will also improve the performance of the loading phase.
We should also consider setting
full_page_writes
tooff
in this phase.From a HA & disaster point of view, once the job is completed and the database is imported, the pod starts with WAL archiving, replicas are created from there, and - if requested - the first backup is taken. We should inform users that, depending on the size of the database, the time taken for the first backup and for replica cloning might take longer.
Describe alternatives you've considered
Look at #3731
Additional context
N/A
Backport?
Yes
Are you willing to actively contribute to this feature?
Yes
Code of Conduct
The text was updated successfully, but these errors were encountered: