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

Richard Huxton dev at archonet.com
Thu Aug 3 15:21:29 UTC 2006

Yanni Chiu wrote:
> 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:
>     http://www.postgresql.org/docs/8.1/static/protocol-flow.html#AEN60506
> 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).

I'd be surprised if it wasn't fairly straightforward to have the state 
machine drop back from v3 to v2. The PG developers try to keep it simple 
to connect between versions.

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

I don't think it's being dropped in the next release (8.2), so you're 
safe for at least 18 months I'd say.

   Richard Huxton
   Archonet Ltd

More information about the Seaside mailing list