258 questions
38
votes
4
answers
27k
views
How to merge contents of SQLite 3.7 WAL file into main database file
With WAL (Write-Ahead-Logging) enabled in SQLite 3.7 (which is the default for Core Data on iOS 7), how do I merge/commit the content from the -wal file back into the main database file?
34
votes
6
answers
24k
views
Is it safe to delete sqlite's WAL file?
I have a strange problem with Core Data in an iOS app where sometimes the WAL file becomes huge (~1GB). It appears there are other people with the problem (e.g. Core Data sqlite-wal file gets MASSIVE (...
18
votes
3
answers
62k
views
Changing "wal_level" on PostgreSQL 13 (via client session) is not being respected
On a running PostgreSQL 13 instance, I tried modifying it's wal_level system setting as follows, but it's not being respected:
postgres@localhost:postgres> SHOW wal_level
+-------------+
| ...
16
votes
4
answers
28k
views
How to open SQLite connection in WAL mode
In C#, how to open an SQLite connection in WAL mode?
Here is how I open in normal mode:
SQLiteConnection connection = new SQLiteConnection("Data Source=" + file);
connection.Open();
// (Perform my ...
11
votes
5
answers
72k
views
Which Postgresql WAL files can I safely remove from the WAL archive folder
Current situation
So I have WAL archiving set up to an independent internal harddrive on a data logging computer running Postgres. The harddrive containing the WAL archives is filling up and I'd like ...
10
votes
3
answers
10k
views
How to disable WAL journal mode
https://developer.apple.com/library/ios/releasenotes/DataManagement/WhatsNew_CoreData_iOS/
I am having trouble in disabling journal mode.
My code is:
static NSManagedObjectContext *...
10
votes
5
answers
7k
views
Disabling sqlite Write-Ahead logging in Android Pie
In Android Pie sqlite Write-Ahead logging (WAL) has been enabled by default. This is causing errors for my existing code only in Pie devices.
I have been unable to turn off WAL successfully using ...
10
votes
1
answer
9k
views
SQLITE database WAL file size keeps growing
I am writing continuously into a db file which has PRAGMA journal_mode=WAL, PRAGMA journal_size_limit=0. My C++ program has two threads, one reader(queries at 15 sec intervals) and one writer(inserts ...
7
votes
1
answer
16k
views
disable wal replay on crash for prometheus
Is there a way to disable WAL replay on crash for Prometheus?
It takes a while for a pod to come back up due to WAL replay:
We can afford to lose some metrics if it meant faster recovery after the ...
7
votes
1
answer
8k
views
Replication lag - exceeding max_slot_wal_keep_size, WAL segments not removed
Summary
We are using max_slot_wal_keep_size from Postgresql 13 to prevent master from being killed by a lagging replication. It seems, that in our case, WAL storage wasn't freed up after exceeding ...
6
votes
2
answers
30k
views
How to specify cleanup by file age or date with pg_archivecleanup
Is there a way to specify files by age or date instead of by a hardcoded name to cleanup the WAL archives with the pg_archivecleanup command ?
For example, using the following command is pretty ...
6
votes
1
answer
2k
views
How does write ahead logging improve IO performance in Postgres?
I've been reading through the WAL chapter of the Postgres manual and was confused by a portion of the chapter:
Using WAL results in a significantly reduced number of disk writes, because only the ...
6
votes
1
answer
7k
views
Disabling WAL archiving during pg_restore?
Let's say I made a quick backup dump of my Postgres 9.3 DB through pg_dump before doing a large destructive migration and I discovered I want to undo it. No writes were performed against the DB in the ...
6
votes
1
answer
3k
views
Difference between incremental backup and WAL archiving with PgBackRest
As far as I understood
WAL archiving is pushing the WAL logs to a storage place as the WAL files are generated
Incremental backup is pushing all the WAL files created since the last backup
So, ...
5
votes
1
answer
7k
views
How to enable auto clean of pg_xlog
I'm trying to configure a PostgreSQL 9.6 database to limit the size of the pg_xlog folder. I've read a lot of threads about this issue or similar ones but nothing I've tried helped.
I wrote an setup ...