Re: Review: Fix snapshot taking inconsistencies - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Review: Fix snapshot taking inconsistencies
Date
Msg-id 1287610368-sup-7673@alvh.no-ip.org
Whole thread Raw
In response to Re: Review: Fix snapshot taking inconsistencies  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Review: Fix snapshot taking inconsistencies
List pgsql-hackers
Excerpts from Alvaro Herrera's message of mié oct 20 16:33:12 -0300 2010:

> The only quarrel I have with this code shuffling is that
> pg_rewrite_query is being called from exec_parse_message.  Since it's
> now a static function, it would have to stop being static so that it can
> be called from both places (postgres.c and rewriteHandler.c)

Actually, I just noticed that the "remainder" patch uses pg_plan_query,
which is also in postgres.c.  This function along with its sibling
pg_plan_queries is also called from other internal places, like the
PREPARE code, SPI and the plan cache.

It strikes me that if we really want to restructure things to divide
client interaction from other query-processing routines, we should
create another file, say src/backend/tcop/queries.c; this would have
stuff like pg_plan_query, pg_plan_queries, pg_rewrite_query, and the
other things that the patch was evicting from postgres.c (plus, I
imagine, a bunch of other stuff that I may be missing).  In fact, if we
go down this route, there would be no point in removing
pg_parse_and_rewrite; we would just move it to this new module.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Extensions, this time with a patch
Next
From: Dimitri Fontaine
Date:
Subject: Re: Extensions, this time with a patch