Re: Re: [HACKERS] Frontend/backend protocol improvements proposal (request).

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: [HACKERS] Frontend/backend protocol improvements proposal (request).
Date: 2013-06-24 16:22:53
Message-ID: CAAfz9KN3a4K8SwTvv_xcHt4RRe=aHwO78ibDu=74Ex=F874i6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

2013/6/24 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:
> > Why do you need to track prepared statements on the client side?
>
> The proposed change would fail to allow that anyway; consider the
> possibility of a server-side function doing one or more PREPAREs or
> DEALLOCATEs. The command tag would be completely inadequate for
> reporting that.
>
Ah, indeed! I does not considered that. Thanks for the info.

>
> Space is also a problem, since existing clients expect the tags to be
> pretty short --- for instance, libpq has always had a hard-wired limit
> of 64 bytes (CMDSTATUS_LEN) on what it can store for the tag. That's
> not enough for a command name plus a full-length identifier.

:-(

>
> If we were to try to do this, we'd need to invent some other reporting
> mechanism, perhaps similar to ParameterStatus for GUC_REPORT variables.
> But that would be a protocol break, which means it's unlikely to happen
> anytime soon.

Is there are chance to add this idea in the TODO?

Btw, maybe we'd need also to identify each prepared statement (and portal)
not only
by the name, but by the automatically generated id included by the backend
in
ParseComplete and then pass this id with Bind messages to let the backend
throws
an error if the prepared statement (portal) is deallocated? (This would be
truly
automatically prepared statement backend tracking as menioned by Albe.)

--
// Dmitriy.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Ford 2013-06-24 18:03:40 Re: pg_largeobject.sql script not run after upgrade
Previous Message Bruce Momjian 2013-06-24 16:18:07 Re: pg_largeobject.sql script not run after upgrade

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2013-06-24 16:33:18 Re: MemoryContextAllocHuge(): selectively bypassing MaxAllocSize
Previous Message Hannu Krosing 2013-06-24 16:15:40 Re: [9.4 CF 1] The Commitfest Slacker List