pgsql: Revert my bad decision of about a year ago to make

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Revert my bad decision of about a year ago to make
Дата
Msg-id 20080402183200.517817558E7@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Revert my bad decision of about a year ago to make PortalDefineQuery
responsible for copying the query string into the new Portal.  Such copying
is unnecessary in the common code path through exec_simple_query, and in
this case it can be enormously expensive because the string might contain
a large number of individual commands; we were copying the entire, long
string for each command, resulting in O(N^2) behavior for N commands.
(This is the cause of bug #4079.)  A second problem with it is that
PortalDefineQuery really can't risk error, because if it elog's before
having set up the Portal, we will leak the plancache refcount that the
caller is trying to hand off to the portal.  So go back to the design in
which the caller is responsible for making sure everything is copied into
the portal if necessary.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        portalcmds.c (r1.69 -> r1.69.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/portalcmds.c?r1=1.69&r2=1.69.2.1)
        prepare.c (r1.80 -> r1.80.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/prepare.c?r1=1.80&r2=1.80.2.1)
    pgsql/src/backend/executor:
        spi.c (r1.188 -> r1.188.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/spi.c?r1=1.188&r2=1.188.2.1)
    pgsql/src/backend/tcop:
        postgres.c (r1.542.2.1 -> r1.542.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.542.2.1&r2=1.542.2.2)
    pgsql/src/backend/utils/mmgr:
        portalmem.c (r1.106 -> r1.106.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/portalmem.c?r1=1.106&r2=1.106.2.1)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Revert my bad decision of about a year ago to make
Следующее
От: rlucas@pgfoundry.org (User Rlucas)
Дата:
Сообщение: aupg - aupg_src: added default id=1 entry for trust graph to trust all