- Published
- Author
- Puneeth kumarSystem Analyst
Recover Lost Data in PostgreSQL
Most SQL databases, like PostgreSQL, let us restore the database to a specific point in time — this is called
The WAL keeps a log of every change made to the database, like adding, updating, or deleting the data. Each of these log has a unique ID called as
However, PostgreSQL doesn’t keep these logs forever. A background process automatically removes old WAL files when they’re no longer needed to save space.
#postgreSQL #databases
Most SQL databases, like PostgreSQL, let us restore the database to a specific point in time — this is called
Point-In-Time Recovery (PITR). PostgreSQL makes this possible using something called the Write-Ahead Log (WAL).The WAL keeps a log of every change made to the database, like adding, updating, or deleting the data. Each of these log has a unique ID called as
Log Sequence Number (LSN). This allows PostgreSQL to rebuild the database exactly as it was at any moment in the past.However, PostgreSQL doesn’t keep these logs forever. A background process automatically removes old WAL files when they’re no longer needed to save space.
#postgreSQL #databases