Skip to content

Document how to pack the ZODB when using containers#1886

Merged
stevepiercy merged 6 commits into6.0from
erral-zodbpack
Mar 6, 2025
Merged

Document how to pack the ZODB when using containers#1886
stevepiercy merged 6 commits into6.0from
erral-zodbpack

Conversation

@erral
Copy link
Member

@erral erral commented Mar 3, 2025

First-time contributors

You must read and follow our First-time contributors.


Submit a pull request

Thank you for your contribution to the Plone Documentation.

Before submitting this pull request, please make sure you follow our guides:

Issue number

  • Fixes #

Description

To be merged after #1874 and plone/plone-backend#179

Add screenshots or links to a preview of the changes


📚 Documentation preview 📚: https://plone6--1886.org.readthedocs.build/

Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

This is good stuff. I think it belongs in another location, though. See comments, and let me know.

Otherwise just some grammar and enhancements with references.

It will no longer output the access log, but will continue to output the event log.


## Pack the ZODB
Copy link
Contributor

Choose a reason for hiding this comment

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

@erral @davisagli would this section be more appropriate under the existing Advanced usage in plone/plone-backend?

erral and others added 2 commits March 6, 2025 08:26
Co-authored-by: Steve Piercy <web@stevepiercy.com>
Co-authored-by: Steve Piercy <web@stevepiercy.com>
@erral erral changed the title Erral zodbpack Document how to pack the database when using containers Mar 6, 2025
@erral erral changed the title Document how to pack the database when using containers Document how to pack the ZODB when using containers Mar 6, 2025
Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Thanks, @erral! This is OK to merge, pending the resolution of https://github.com/plone/documentation/pull/1886/files#r1982636531. Do you have an opinion one way or the other?

@erral
Copy link
Member Author

erral commented Mar 6, 2025

Thanks, @erral! This is OK to merge, pending the resolution of https://github.com/plone/documentation/pull/1886/files#r1982636531. Do you have an opinion one way or the other?

I would simplify the overall structure and let "advanced usage" to be recipes.

@stevepiercy
Copy link
Contributor

I would simplify the overall structure and let "advanced usage" to be recipes.

OK. That may be what @davisagli also has in mind. I trust that y'all will sort out the best path forward.

Merging!

@stevepiercy stevepiercy merged commit 9969fcd into 6.0 Mar 6, 2025
4 checks passed
@stevepiercy stevepiercy deleted the erral-zodbpack branch March 6, 2025 14:53
@github-project-automation github-project-automation bot moved this from In Progress to Done in Plone Documentation Mar 6, 2025
Packing removes old revisions of objects.
It is similar to [routine vacuuming in PostgreSQL](https://www.postgresql.org/docs/8.3/routine-vacuuming.html).

The official {doc}`/install/containers/images/backend` container and project containers based on them have a `pack` command to pack the ZODB.
Copy link
Member

@davisagli davisagli Mar 6, 2025

Choose a reason for hiding this comment

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

This should have a versionadded note. I just merged the PR which adds this command today, and it won't actually be available in the images until the next Plone releases are made. The backport PR for Plone 6.0 is still pending.

It is similar to [routine vacuuming in PostgreSQL](https://www.postgresql.org/docs/8.3/routine-vacuuming.html).

The official {doc}`/install/containers/images/backend` container and project containers based on them have a `pack` command to pack the ZODB.
The command will work in standalone mode, ZEO mode, and RelStorage mode but only with PostgreSQL.
Copy link
Member

Choose a reason for hiding this comment

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

This sentence is confusing. "but only with PostgreSQL" is meant to be a qualifier only when using it with Relstorage, but it sounds like it applies to all the options, which makes no sense (it's only possible to use postgres if you're doing via Relstorage).


```shell
docker run -e RELSTORAGE_DSN="dbname='plone' user='plone' host='db' password='password' port='5432'" pack
```
Copy link
Member

Choose a reason for hiding this comment

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

In Docker Swarm, it's also necessary to specify the network if the database is only available on an internal network. It might be easier to use docker exec to run the pack command in an existing plone-backend container.

@stevepiercy
Copy link
Contributor

@davisagli I created a new PR #1899 to address your suggestions. Sorry for the itchy trigger finger.

stevepiercy added a commit that referenced this pull request Mar 9, 2025
* Addendum to pack the ZODB in containers
- Refs #1886 (review)

* Apply suggestions from @erral

* Apply suggestions from @erral

* Update docs/install/containers/recipes/index.md

Co-authored-by: Mikel Larreategi <mlarreategi@codesyntax.com>

* Update docs/install/containers/recipes/index.md

* Update index.md

---------

Co-authored-by: Mikel Larreategi <mlarreategi@codesyntax.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants