[Seaside] Re: Scaling Seaside apps (was: About SToR)

Yanni Chiu yanni at rogers.com
Thu Aug 3 14:29:53 UTC 2006

Richard Huxton wrote:
> I'm not sure this has changed in v3 of the protocol, PG has always 
> returned all the rows you request. I certainly can't find any mention of 
> it here:
>   http://www.postgresql.org/docs/8.1/static/protocol-changes.html

I looked at implementing the v3 protocol when it was introduced
(maybe 2 or 3 years ago). I recall that it didn't quite make
sense to me that cursors should already work with the v2 protocol,
yet it seemed that the v3 protocol was needed to get partial result
sets. After re-reading the spec, I agree with you - PG does return
the rows you request. So, like you said, cursors is what you need
to avoid filling up your memory with a large result set, and this
should work already with the existed driver.

Now the part that got me confused was "Extended Query" at:
where it says:
     Once a portal exists, it can be executed using an Execute message.
     The Execute message specifies the portal name (empty string denotes
     the unnamed portal) and a maximum result-row count (zero meaning "fetch all rows").

The Extended Query is new in the v3 protocol. That section, and some
other words around message synchronization led me to conclude that
the protocol had changed a lot. Now, it seems to me that it is probably
just a matter of adding the new message types, and altering the state
machine. However, adding the changes to a single state machine may
start to get ugly (i.e. unmanagable).

Do you have any sense of when (or if) the v2 protocol support
on the server side would be discontinued?

More information about the Seaside mailing list