Re: row-attribute in EXPLAIN-output doesn't match count(*)
От | Greg Stark |
---|---|
Тема | Re: row-attribute in EXPLAIN-output doesn't match count(*) |
Дата | |
Msg-id | 8764ypf8hy.fsf@stark.xeocode.com обсуждение исходный текст |
Ответ на | Re: row-attribute in EXPLAIN-output doesn't match count(*) (Andrew Sullivan <ajs@crankycanuck.ca>) |
Ответы |
Re: row-attribute in EXPLAIN-output doesn't match count(*)
|
Список | pgsql-sql |
Andrew Sullivan <ajs@crankycanuck.ca> writes: > On Thu, Apr 14, 2005 at 07:21:38PM +0200, Andreas Joseph Krogh wrote: > > > > So, what you're suggesting is that a restart of the webapp should make vacuum > > able to delete those dead rows? > > Yes, but that'll only solve your problem for now. You'll have the > problem again soon. What's keeping open the transaction? This is presumably because of the long-standing issue that Postgres takes the snapshot as soon as the BEGIN is issued. A lot of drivers issue a "COMMIT; BEGIN;" right away even though it could be a long time before any actual work is done. Other databases (by which I mean Oracle) treat BEGIN as a noop. The snapshot starts when the first SQL statement that needs a snapshot is executed. So until a SELECT is issued the connection doesn't participate in any transactional issues like keeping old versions of records around. -- greg
В списке pgsql-sql по дате отправления: