Re: pg_restore and create FK without verification check - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_restore and create FK without verification check
Date
Msg-id 16070.1069869159@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore and create FK without verification check  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: pg_restore and create FK without verification check
Re: pg_restore and create FK without verification check
List pgsql-hackers
Andreas Pflug <pgadmin@pse-consulting.de> writes:
>> In principle you could do this today, but we don't have enough
>> support code in place to make it work smoothly, eg WAL segment files
>> aren't labeled with enough identifying information to let you manage
>> an archive full of 'em.  Still it doesn't seem that far away.

> So I issue CHECKPOINT, and tar the cluster or database. Still, I got two 
> questions:
> - how to restore a single database

You don't.  As I said, any physical backup is going to be
all-or-nothing.  These techniques are not a replacement for pg_dump.

> - while tar is running, CHECKPOINT(n+1) might be recorded in some files, 
> while others have CHECKPOINT(n). How does the backend know to rollback 
> to CHECKPOINT(n)?

That's part of the management code that we need to write before this
will really be very useful; you need to be able to associate the
starting time of a tar dump with the most recent previous CHECKPOINT
in the WAL logs.  Not hard in principle, just takes some code we ain't
got yet.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: pg_restore and create FK without verification check
Next
From: Bruce Momjian
Date:
Subject: Re: Providing anonymous mmap as an option of sharing memory