There is a certain amount of memory that is shared between different processes or threads in which client connections are processed. The thread has its own memory size, where the SQL query comes. In this amount of memory, the SQL query (or a query in another language) is precompiled, interpreted, rebuilt in some way.
Then he goes for the data that he needs to read and change. This data is stored on the disk in a special way. If you look deeper into storage, they lie in fixed chunks (pages) in PostgreSQL is 8Kb, in Oracle you can use different sizes. Different databases are different.
This page is very convenient because it contains a bunch of different data (in fact, it contains tuples) That is, a table, and in it the lines, these lines are packed into large pages.
If a request needs data from one of the pages, it simply raises this page into memory and all workers, threads and database processes will have access to it. If you need a lot, then he will raise a few. They will be cached – this is convenient, productive – memory is faster than disks, that’s all.
In fact, the database can also block at a more granular level, including a single record.
But now we are talking about more theoretical things, and not about the intricacies of deep implementation.
If you need to change at least one record on at least one page, the entire page will be marked as so-called “dirty”. This is done because it is more convenient that way. We drew resources x and y on the diagram – here they are pages. Therefore, you need to do the following operation: somewhere on a piece of paper, write down what changes we made, so that when we go up, read this piece of paper and, using the information from it, restore the page to the state in which we brought it with this update.
Accordingly, the page is marked as “dirty”, and we have a problem, which is that now the snapshot in memory is different from the one on disk. If we fall now, the memory is not persistent, we will lose information about “dirty” pages.
We recorded information about the page in the log and then returned control – everything is fine. If at some point they have fallen, then we read back the Write Ahead Log and using information about these changes, we can roll clean pages to the level of “dirty”. We have a new database again.
This allows us to perform the very recovery that we needed to provide, based on data storage problems, and allows you to recover to the most recent transaction, to the very last action that happened before Mary Ivanna pulled the server out of the socket.
This algorithm is called ARIES and was made in its modern form a long time ago. A fundamental article on its structure and method of recovery in relational databases was published by Mohan in 1992.
Since then, the theory has not been added much – the Write Ahead Log has since remained Write Ahead Log. They all use the concept of pages and the concept of logging changes. The log can be called differently and located in different places:
In MySQL, it's inside InnoDB,
In PostgreSQL, this is a separate directory, which finally became WAL in version 10 instead of PGX-Log;
Oracle calls this Redo Log;
In DB2, WAL.
Basically, everything is more or less the same everywhere – to recover, we use WAL.
The important point is that all this would be very unproductive if we were just writing WAL from the beginning of time. It would grow and grow, and then we would roll these changes into the database for a very long time.
Recognized and trusted by the best
Knowing “how much does it cost to make an app” is crucial to determine the project’s feasibility, budget, and ROI.
IT outsourcing company Boosty Labs – one of the TOP teams for the development of blockchain and fintech applications.
Looking for a secure betting platform? Check out 1win Brasil for the latest odds, enticing bonuses, and exclusive promotions. Its easy-to-navigate interface allows for quick bet placements.
A large selection of casinos for Austrian players you can find in Oesterreichonlinecasino.at. You will have a good time and get real money.
GetDevDone, one of the best React JS development companies, also excels at WordPress and Shopify development, UI/UX design, email and banner development, cross-platform mobile development, web design, markup development, and other areas.
Easily download YouTube videos as MP3 files with our fast, free YouTube to MP3 downloader. Convert your favorite YouTube music videos to high-quality MP3s to enjoy offline.
Our link building services are consistent, scalable, and designed to get you exposure, earn you credibility, send you qualified web traffic, and return you a profit.
Custom angular development company. Clockwise Software develops innovative web products and mobile applications using one of the most reliable frontend frameworks – Angular.
RetinaMacApps – blog that sheds light on the MacBook upgrade challenges that create ripples in the MacOS arena.
BitHound.io is a leading guide to crypto & Bitcoin casinos. You can find the best BTC casino reviews, like Bitstarz: https://bithound.io/casino/bitstarz/ and many other online casino sites with BTC, USDT and ETH.
If you have cryptocurrencies, you should monitor their prices continuously. It is convenient and easy to track changes in the Dogecoin price prediction 2025. You can install a mobile app for your phone from CoinDataFlow.
Winorama Casino uses some of our approaches during test drives of crypto gambling sites. Any BTC or ETH player can find the most suitable safe and trusted online casino. Crypto space is a game changer of iGaming industry soon and we believe Winorama makes its push as well.
This teuscherfifthavenue.com guide of different payment methods. You can find out how Credit Cards works, what they do, and where you can use them in the latest blog posts.
Play at a quick Finnish casino, pikakasino. Exclusive offers up for grabs.
To view the wide range of global locations provided by Infatica’s proxy service, you can visit their site at https://infatica.io/location/ for more detailed information.
Innowise, an iOS app development company, specializes in crafting custom applications for Apple devices, blending innovative design with cutting-edge technology to boost user engagement and satisfaction.
Avenga’s developers have successfully delivered projects of differing complexity utilizing blockchain technology. As a top blockchain software development company, we specialize in blockchain application development, offering end-to-end solutions that transform and empower businesses.
Our trusted partners at Legjobb Kaszino in Hungary recommend that you only use trusted online casino to play at. By following their advice, you can be sure that they only support platforms that provide fair play and a safe environment for players.
Register at a real money online casino in Canada and get access to 9000 well-optimised and state-of-the-art games. GGBet Casino works exclusively with the leading gambling operators to provide legal casino games with high RTPs, unique bonus features and of course a demo mode.
Who We Work With
Blog
- What Is ETL Developer: Roles and ResponsibilitiesBusinesses today deal with immense amounts of data, so ETL (Extract, Transform, Load) developers have become integral members of most software teams. This article will examine their roles and responsibilities and tell you when to turn to an ETL specialist. Who is the ETL Developer ETL developers are specialists who Continue Reading
- Crafting a Video Editing App: Essential Features and Development ExpensesThe surge in the popularity of video editing applications has empowered individuals to effortlessly create polished videos within the comfort of their homes. These applications unlock the creative potential of users, allowing them to produce unique content for various platforms, particularly social media. So, how to make a video editing Continue Reading
- Embracing the Future: Latest Trends in Data Engineering Services 2024As we step into 2024, the realm of data engineering services is undergoing a transformative shift. With businesses increasingly relying on data-driven insights to make informed decisions, the demand for advanced data engineering solutions has never been higher. In this guest post, we will explore the latest trends shaping the Continue Reading
- A guide for beginners and experienced professionalsSoftware testing is an integral part of the development process. It ensures the quality, functionality, and security of the product being released to the market. Whether you’re a beginner or an experienced professional, understanding the basics and best practices of testing is critical to a successful career in this field. Continue Reading
- How to start a career in programming?Programming has become one of the most important skills in the modern world. From building websites to developing mobile apps and complex artificial intelligence systems, the opportunities for programmers are endless. If you’re interested in this field but don’t know where to start, this article will help you understand the Continue Reading
- Optimizing Performance and Precision: A Guide to Logitech Mouse DriversIn today’s digital world, a high-performance mouse is no longer a luxury; it’s a productivity and efficiency tool. For many users, Logitech mice have become the go-to choice, renowned for their ergonomics, comfort, and feature sets. But unlocking the full potential of your Logitech mouse goes beyond simply plugging it Continue Reading