Re: php with postgres
От | marcus.boerger@t-online.de (Marcus Börger) |
---|---|
Тема | Re: php with postgres |
Дата | |
Msg-id | 1342364034.20030722081917@post.rwth-aachen.de обсуждение исходный текст |
Ответ на | Re: php with postgres (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: php with postgres
|
Список | 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.boerger@post.rwth-aachen.de
В списке pgsql-hackers по дате отправления: