Thread: Table Timemachine!

Table Timemachine!

From
Lee Kindness
Date:
Guys,

I've been asked by a colleague about methods to keep track of
'previous' contents of a table - i.e. changes made and a way of
getting back to a previous state. Now, I know INSERT/UPDATE/DELETE
triggers to maintain an accompanying table is a way to do this. But, I
have a nagging feeling that somebody has at one point put together
such a feature in a generic fashion... I thought there was a 'time
machine' module in contrib! Searches through the mailing lists have
not turned up any specific pointers.

Aanyone else remember this, and remember where? Or am I misguided and
deluded!

Thanks, Lee.

Re: Table Timemachine!

From
Tom Lane
Date:
Lee Kindness <lkindness@csl.co.uk> writes:
> I have a nagging feeling that somebody has at one point put together
> such a feature in a generic fashion... I thought there was a 'time
> machine' module in contrib!

contrib/spi/timetravel.*

I haven't ever tried it ...

            regards, tom lane

How to cancel a query with libpq

From
Wenzhe Zhou
Date:
How to send request to server to cancel a query with libpq API?
Thanks

Wenzhe


Re: How to cancel a query with libpq

From
Medi Montaseri
Date:
PQrequestCancel()....but that would work with Async queries or if you
are using
7.3, you can timeout via postgresql.conf:statement_timeout and then send the
cancellation request to the backend.....

Wenzhe Zhou wrote:

>How to send request to server to cancel a query with libpq API?
>Thanks
>
>Wenzhe
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>




Re: Table Timemachine!

From
George.T.Essig@stls.frb.org
Date:

There is a presentation about journaling databases available at:

http://conferences.oreillynet.com/cs/os2002/view/e_sess/2551

The basic idea is that with database journaling you can extract
a snapshot of the data at any past date.  At the time of the talk,
the speaker said he was going to make the code public.  I don't know
if this was ever done.

George Essig

> I've been asked by a colleague about methods to keep track of
> 'previous' contents of a table - i.e. changes made and a way of
>  getting back to a previous state.

Re: Table Timemachine!

From
Lee Kindness
Date:
Tom Lane writes:
 > Lee Kindness <lkindness@csl.co.uk> writes:
 > > I have a nagging feeling that somebody has at one point put together
 > > such a feature in a generic fashion... I thought there was a 'time
 > > machine' module in contrib!
 > contrib/spi/timetravel.*
 > I haven't ever tried it ...

It's really quite good. Could do with an update - it uses abstime
internally and the docs refer to 'currabstime' which is no longer
around.

Nice.

Lee.

Re: Table Timemachine!

From
Tom Lane
Date:
Lee Kindness <lkindness@csl.co.uk> writes:
> Tom Lane writes:
>>> Lee Kindness <lkindness@csl.co.uk> writes:
>>>> I have a nagging feeling that somebody has at one point put together
>>>> such a feature in a generic fashion... I thought there was a 'time
>>>> machine' module in contrib!

>>> contrib/spi/timetravel.*

>>> I haven't ever tried it ...

> It's really quite good. Could do with an update - it uses abstime
> internally and the docs refer to 'currabstime' which is no longer
> around.

Patches cheerfully accepted ;-)

            regards, tom lane