From: | marcus(dot)boerger(at)t-online(dot)de (Marcus Brger) |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Jan Wieck <JanWieck(at)Yahoo(dot)com>, ivan <iv(at)psycho(dot)pl>, Joe Conway <mail(at)joeconway(dot)com>, Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: php with postgres |
Date: | 2003-07-22 06:19:17 |
Message-ID: | 1342364034.20030722081917@post.rwth-aachen.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Bruce,
Tuesday, July 22, 2003, 3:20:27 AM, you wrote:
BM> Jan Wieck wrote:
>> Bruce Momjian wrote:
>> > Marcus B?rger wrote:
>> >> BM> Marcus, would you check if PHP is using RESET ALL when passing
>> >> BM> persistent connection to new clients? We added that capability a few
>> >> BM> releases ago, specifically for PHP persistent connections, but I don't
>> >> BM> think that ever got into the PHP code.
>> >>
>> >> Unfortunately we don't do so yet. Do i need to check for errors or can i do it
>> >> unconditionally on conenction start? And i'd need to know how to check if it
>> >> is available (like starting with which version).
>> >
>> > It first appeared in PostgreSQL version 7.2. It doesn't generate any
>> > failures. It just resets all SET settting to their defaults, in case
>> > the previous client modified them.
>> >
>>
>> It does generate the usual error if the current transaction block is in
>> ABORT state. So the correct querystring to send would be something like
>>
>> "ROLLBACK; RESET ALL"
BM> Oh, I remember that now as part of the persistent connection code. As I
BM> remember, we told them to do BEGIN;COMMIT; to clear any open transaction
BM> state passed to the new client. Is that in there? If not, it has to be
BM> added too. ROLLBACK will generate an error if you are not in a
BM> transaction, so it would fill the logs with errors.
Here's the current log while reusing the persistent connection:
DEBUG: InitPostgres
DEBUG: StartTransactionCommand
DEBUG: query: select getdatabaseencoding()
DEBUG: ProcessQuery
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: RESET ALL
DEBUG: ProcessUtility: RESET ALL
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: query: BEGIN;ROLLBACK;
DEBUG: ProcessUtility: BEGIN;ROLLBACK;
DEBUG: CommitTransactionCommand
DEBUG: StartTransactionCommand
DEBUG: ProcessUtility: BEGIN;ROLLBACK;
DEBUG: CommitTransactionCommand
DEBUG: pq_recvbuf: unexpected EOF on client connection
--
Best regards,
Marcus mailto:marcus(dot)boerger(at)post(dot)rwth-aachen(dot)de
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Joseph Krogh | 2003-07-22 06:38:33 | Re: tsearch2 for 7.3.X |
Previous Message | Tom Lane | 2003-07-22 06:04:33 | Re: PostgreSQL 7.3.3 and Intel C compiler |