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

WAL (Write ahead log) #18

Open
japananh opened this issue Oct 12, 2023 · 0 comments
Open

WAL (Write ahead log) #18

japananh opened this issue Oct 12, 2023 · 0 comments

Comments

@japananh
Copy link
Owner

japananh commented Oct 12, 2023

How does WAL work?

  • WAL (Write ahead log or Redo log) is a method used to ensure that changes to a database are recorded before the actual data is updated. It's primarily used in database management systems (DBMS) like PostgreSQL and SQLite.
  • How it works: When a change is made to the data, it's first written to a log (the WAL), and then the actual data is updated. This ensures that changes are durable and can be replayed if there's a crash or failure.
  • Configure WAL segment size in the configuration file (postgresql.conf)

Best practices

  • WAL has a size, when the WAL is full, it's time to flush changes into disk. Keep the WAL segment size as short as possible to reduce the checkpoint time, so the flushing of data from WAL to disk will be more frequent.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant