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: disable WAL archiving during import bootstrap #3743

Merged
merged 8 commits into from Jan 30, 2024
Merged

fix: disable WAL archiving during import bootstrap #3743

merged 8 commits into from Jan 30, 2024

Conversation

gbartolini
Copy link
Contributor

@gbartolini gbartolini commented 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
  • 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

@github-actions github-actions bot added the backport-requested ◀️ This pull request should be backported to all supported releases label Jan 29, 2024
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@mnencia
Copy link
Member

mnencia commented Jan 29, 2024

@gbartolini gbartolini changed the title feat: disable WAL archiving during import bootstrap fix: disable WAL archiving during import bootstrap Jan 29, 2024
@gbartolini
Copy link
Contributor Author

Rerun E2E tests after fixing wal senders GUC. See https://github.com/EnterpriseDB/cloudnative-pg/actions/runs/7699971017

@gbartolini
Copy link
Contributor Author

gbartolini and others added 7 commits January 30, 2024 17:25
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>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@mnencia
Copy link
Member

mnencia commented Jan 30, 2024

/ok-to-merge

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Jan 30, 2024
@mnencia mnencia merged commit 9e58cbd into main Jan 30, 2024
31 of 32 checks passed
@mnencia mnencia deleted the dev/3741 branch January 30, 2024 16:35
cnpg-bot pushed a commit that referenced this pull request 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 pull request 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 pull request 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 pull request 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
Labels
backport-requested ◀️ This pull request should be backported to all supported releases ok to merge 👌 This PR can be merged release-1.20 release-1.21 release-1.22
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: disable WAL archiving during import bootstrap
4 participants