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

Read-Only config not working with read-only postgres database #506

Open
Nimo-19 opened this issue Aug 1, 2024 · 3 comments
Open

Read-Only config not working with read-only postgres database #506

Nimo-19 opened this issue Aug 1, 2024 · 3 comments

Comments

@Nimo-19
Copy link

Nimo-19 commented Aug 1, 2024

I am currently toying around with postgres and some strategies to backup and restore the database.
During testing I noticed that during the restore the database is in a read-only mode so I wanted to see if I can view the result by by starting my plone instance with the read-only relstorage config. But I seems something wants to write or at least set a read-write mode.

Don't know If I'm missing something or if this is even a bug. My relstorage and postgres knowledge is limited atm.

excerpt from my postgres log, when I tried to start my plone instance:

[...]
2024-08-01 08:36:19.492 GMT [56] LOG:  database system is ready to accept read-only connections
INFO: 2024/08/01 08:36:19.551463 Files will be read from storages: [default]                   
2024-08-01 08:36:19.554 GMT [80] LOG:  restored log file "000000010000000000000026" from archive
INFO: 2024/08/01 08:36:19.615954 Files will be read from storages: [default]                    
2024-08-01 08:36:19.619 GMT [80] LOG:  restored log file "000000010000000000000027" from archive
INFO: 2024/08/01 08:36:19.686305 Files will be read from storages: [default]                    
2024-08-01 08:36:19.689 GMT [80] LOG:  restored log file "000000010000000000000028" from archive
INFO: 2024/08/01 08:36:19.817807 Files will be read from storages: [default]                    
2024-08-01 08:36:19.821 GMT [80] LOG:  restored log file "000000010000000000000029" from archive
2024-08-01 08:36:19.854 GMT [80] LOG:  recovery stopping before commit of transaction 867, time 2024-07-30 06:36:30.713379+00
2024-08-01 08:36:19.855 GMT [80] LOG:  pausing at the end of recovery                                     
2024-08-01 08:36:19.855 GMT [80] HINT:  Execute pg_wal_replay_resume() to promote.
%2024-08-01 08:36:52.754 GMT [191] ERROR:  cannot set transaction read-write mode during recovery
2024-08-01 08:36:52.754 GMT [191] STATEMENT:  BEGIN ISOLATION LEVEL READ COMMITTED READ WRITE NOT DEFERRABLE
[...]
@davisagli
Copy link

Don't know If I'm missing something or if this is even a bug.

I don't know either. Can you explain in more detail what you did to try to start the plone instance with read-only relstorage config?

@Nimo-19
Copy link
Author

Nimo-19 commented Aug 5, 2024

I spun up a plone classic docker container with the RELSTORAGE_READ_ONLY=on env variable.
It even triggers a read only exception when I try to write something (Tested with a writable Database).

@jamadden
Copy link
Member

RELSTORAGE_READ_ONLY is not any part of this project, only the read-only configuration key.

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

No branches or pull requests

3 participants