Re: Improved (De)Serialization Support

From: Andy Pavlo <pavlo(at)cs(dot)brown(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Improved (De)Serialization Support
Date: 2008-02-24 18:04:42
Message-ID: 200802241304.42475.pavlo@cs.brown.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday 23 February 2008 00:40, Tom Lane wrote:
> Andy Pavlo <pavlo(at)cs(dot)brown(dot)edu> writes:
> > I have added support in readfuncs.c to write out Query and PlannedStmt
> > objects using nodeToString() and then read them back in. We needed this
> > so that we could use PREPARE and write the arguments to
> > StorePreparedStatement() out to a file. We are going then read them back
> > into Postgres on a different server and use EXECUTE.
>
> Um, surely Query objects can be written/read already?

I meant specifically UpdateStmt, DeleteStmt, and InsertStmt objects.
SelectStmt curiously was already in place.

> I'm not very excited about adding a load of code that will never be
> exercised during normal use. That will inevitably be a hotbed of
> bit-rot. Now, if the feature that needs it is also being proposed for
> inclusion in core, then maybe we could talk.

The research project that we are working will not be merged back into
Postgres. The exercise of updating this part of the code for serialization
that we need was very useful for me to understand the internals of Postgres
better. I did spend about two days updating the out/read functions, and I
figure that my enhancements would probably be useful for somebody else in the
future.

At the very least you might want to consider taking my minimal changes to
outfuncs.c, since using nodeToString() is useful for new developers to
understand the nested structures used by the planner and optimizer.
--
Andy Pavlo
pavlo(at)cs(dot)brown(dot)edu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2008-02-24 18:06:49 Re: 8.3 / 8.2.6 restore comparison
Previous Message Tom Lane 2008-02-24 17:57:30 Re: Behaviour of rows containg not-null domains in plpgsql