mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Redesign query-snapshot timing so that volatile functions in READ COMMITTED
mode see a fresh snapshot for each command in the function, rather than using the latest interactive command's snapshot. Also, suppress fresh snapshots as well as CommandCounterIncrement inside STABLE and IMMUTABLE functions, instead using the snapshot taken for the most closely nested regular query. (This behavior is only sane for read-only functions, so the patch also enforces that such functions contain only SELECT commands.) As per my proposal of 6-Sep-2004; I note that I floated essentially the same proposal on 19-Jun-2002, but that discussion tailed off without any action. Since 8.0 seems like the right place to be taking possibly nontrivial backwards compatibility hits, let's get it done now.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/tcop/pquery.h,v 1.32 2004/08/29 04:13:10 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/tcop/pquery.h,v 1.33 2004/09/13 20:08:08 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -20,15 +20,10 @@
|
||||
extern DLLIMPORT Portal ActivePortal;
|
||||
|
||||
|
||||
extern void ProcessQuery(Query *parsetree,
|
||||
Plan *plan,
|
||||
ParamListInfo params,
|
||||
DestReceiver *dest,
|
||||
char *completionTag);
|
||||
|
||||
extern PortalStrategy ChoosePortalStrategy(List *parseTrees);
|
||||
|
||||
extern void PortalStart(Portal portal, ParamListInfo params);
|
||||
extern void PortalStart(Portal portal, ParamListInfo params,
|
||||
Snapshot snapshot);
|
||||
|
||||
extern void PortalSetResultFormat(Portal portal, int nFormats,
|
||||
int16 *formats);
|
||||
|
||||
Reference in New Issue
Block a user