HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Is tlog backup on replica clearing VLFs on the primary?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
tlogtheprimaryreplicavlfsclearingbackup

Problem

Is it true that a transaction log backup made on the secondary database is clearing the inactive VLFs on the tlog file on the primary database (in case of Availability Groups)?

I was not able to find an official documentation/statement/article that confirms this. This is the most detailed article I have found, but the next parts that are concerning this aspect are missing.

Solution

Thomas Stringer has answered a very similar question at:

Transaction Log Maintanance While Using AlwaysOn Availability Group

The answer is that the Availability Group replicas are aware of each other and when either the primary or secondary does a backup, both logs are able to free log space.

The article you referenced also offers the explanation that Log Blocks, not the VLFs, are what get hardened between the Primary and Secondary media. A VLF can contain several log blocks and this will influence when the space can be recovered.

Context

StackExchange Database Administrators Q#77080, answer score: 4

Revisions (0)

No revisions yet.