Skip site navigation (1) Skip section navigation (2)

Re: Re: Backup and Recovery

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: Backup and Recovery
Date: 2001-07-06 00:15:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> > > > I would expect high-level transaction redo records to be much more
> > > > compact; mixed into the WAL, such records shouldn't make the WAL
> > > > grow much faster.
> > 
> > All redo records have to be at the tuple level, so what higher-level
> > are you talking about ? (statement level redo records would not be
> > able to reproduce the same resulting table data (keyword: transaction
> > isolation level)) 
> Statement-level redo records would be nice, but as you note they are 
> rarely practical if done by the database.
> Redo records that contain that contain whole blocks may be much bulkier
> than records of whole tuples.  Redo records of whole tuples may be much 
> bulkier than those that just identify changed fields.
> Bulky logs mean more-frequent snapshot backups, and bulky log formats 
> are less suitable for network transmission, and therefore less useful 
> for replication.  Smaller redo records take more processing to generate, 
> but that processing can be done off-line, and the result saves other 
> costs.

Tom has identified that VACUUM generates hug WAL traffic because of the
writing of page preimages in case the page is partially written to disk.
It would be nice to split those out into a separate WAL file _except_ it
would require two fsyncs() for commit (bad), so we are stuck.  Once the
page is flushed to disk after checkpoint, we don't really need those
pre-images anymore, hence the spliting of WAL page images and row
records for recovery purposes.

In other words, we keep the page images and row records in one file so
we can do one fsync, but once we have written the page, we don't want to
store them for later point-in-time recovery.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to


pgsql-hackers by date

Next:From: Hiroshi InoueDate: 2001-07-06 01:22:38
Subject: Re: Re: Buffer access rules, and a probable bug
Previous:From: Nathan MyersDate: 2001-07-05 23:52:50
Subject: Re: Re: Backup and Recovery

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group