← Back to Patent Explorer
US5832508A Expired / Lapsed US ⏱️ 0.0 years remaining

Method for deallocating a log in database systems

Assignee: Sybase Inc
•
Filing: 1996-11-14
•
Granted: 1998-11-03
•
Expires: 2016-11-14
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A SQL database server system having an enhanced logging system is described. The logging system implements a "private log cache" (PLC) for reducing the contention on the system's "log" resource (which is protected by a log semaphore). An area of memory private to a user's task is set aside as a PLC--a cache where log records are built and stored before being posted to the log. Each PLC may hold multiple log records for a single transaction before they are flushed to the log (page chain) through the log semaphore. When a transaction commits or the memory fills with log records, the PLC associated with the transaction is flushed to the log. Also described is improved log deallocation methodology provided by the system which alleviates the needs to read each of the log pages to be deallocated, as was conventionally required. The operation to do the deallocation occurs at the allocation page, not at the individual pages (which are to be deallocated). In accordance with this method, the system writes a log record which includes the first page and the last page of the run (i.e., the number of those pages). The system need not, however, read any of the pages of the run, other than the first page and the last page. In a common case of a completely filled allocation unit, the system reads two pages--the first page and the last page--and writes one log record. As a result, the system reads far fewer log pages and writes but a single log record.

Inventors

  • 👤 Andrew P. Sherman
  • 👤 Scott E. McCargar

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-31 06:02
CPC Classifications
G; G06; G06F; G06F16/00; G06F16/20; G06F16/23; G06F16/2358; G06F11/00; G06F11/07; G06F11/14; G06F11/1446; G06F11/1458; G06F11/1466

Claims Analysis

Total Claims: 16
Claim 1
Independent Claim 191 words
In a database system, said database system maintaining a log for recording transactions which occur in said system, an improved method for deallocating log pages during archiving of the log, the method comprising: storing information about the transactions which occur in the system as a plurality of log records, said log records being stored together on a plurality of log pages, a number of said log pages being stored together as an allocation unit; receiving a request to dump certain ones of said log records to an archive device; determining which allocation units stores said certain ones of said log records to archive; for said determined allocation units, determining first and last log pages for said certain ones of said log records to be dumped to the archive device; and for each allocation unit determine to store said certain ones of said log records, deallocating log pages by at least performing: if an allocation unit is completely filled with log records to be deallocated, deallocating those log records by marking the allocation unit as having deallocated log pages, the step being performed without fetching any log pages for the allocation unit.
Claim 2
Dependent Claim 191 words
In a database system, said database system maintaining a log for recording transactions which occur in said system, an improved method for deallocating log pages during archiving of the log, the method comprising: storing information about the transactions which occur in the system as a plurality of log records, said log records being stored together on a plurality of log pages, a number of said log pages being stored together as an allocation unit; receiving a request to dump certain ones of said log records to an archive device; determining which allocation units stores said certain ones of said log records to archive; for said determined allocation units, determining first and last log pages for said certain ones of said log records to be dumped to the archive device; and for each allocation unit determine to store said certain ones of said log records, deallocating log pages by at least performing: if an allocation unit is completely filled with log records to be deallocated, deallocating those log records by marking the allocation unit as having deallocated log pages, the step being performed without fetching any log pages for the allocation unit.
Claim 3
Dependent Claim 31 words
The method of claim 1, further comprising: before deallocating said certain ones of the log records, storing a new log record indicating said first and last log pages to be deallocated.
Claim 4
Dependent Claim 15 words
The method of claim 1, wherein said log records are stored sequentially by the system.
Claim 5
Dependent Claim 20 words
The method of claim 1, wherein each allocation unit stores an allocation page together with a plurality of log pages.
Claim 6
Dependent Claim 13 words
The method of claim 4, wherein each allocation unit stores 255 log pages.
Claim 7
Dependent Claim 22 words
The method of claim 4, wherein each allocation page stores flags indicating which log pages of the corresponding allocation unit are deallocated.
Claim 8
Dependent Claim 30 words
The method of claim 6, wherein said step of deallocating includes: resetting the flag on an allocation page for indicating deallocation of corresponding log pages for a particular allocation unit.
Claim 9
Dependent Claim 21 words
The method of claim 1, wherein said request to dump certain ones of said log records comprises an SQL "dump" command.
Claim 10
Dependent Claim 29 words
The method of claim 1, wherein said certain ones of said log records comprise those log records storing information about transactions which are no longer active in the system.
Claim 11
Dependent Claim 42 words
The method of claim 1, wherein the log pages for each allocation unit are further grouped into extent groups, and wherein said deallocating step includes resetting a flag in a corresponding allocation page for indicating that a particular extent group is deallocated.
Claim 12
Dependent Claim 29 words
The method of claim 1, further comprising: placing a lock on an allocation page for performing said deallocating step while protecting said allocation page from change by another process.
Claim 13
Dependent Claim 15 words
The method of claim 11, further comprising: releasing said lock upon completing said deallocating step.
Claim 14
Dependent Claim 21 words
The method of claim 1, wherein said information about transactions comprises information indicating modification of data stored by the database system.
Claim 15
Dependent Claim 25 words
The method of claim 1, further comprising: linking said allocation units together to form a chain of allocation units storing logging information for the system.
Claim 16
Dependent Claim 39 words
The method of claim 1, wherein the system inserts a checkpoint record into the log for indicating an oldest active log record, and wherein said log is dumped to archive at a point before said oldest active log record.

References Cited (Backward Citations)

US5008786A Cited
US5155678A Cited
US4961134A Cited
US5493668A Cited
US5537574A Cited
US5455946A Cited
US5717919A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2001-11-02 2002-05-04 2002-11-03 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2005-11-02 2006-05-04 2006-11-03 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2009-11-02 2010-05-04 2010-11-03 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag