From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Subject: | Re: Hot Standby and cancelling idle queries |
Date: | 2009-12-26 21:47:12 |
Message-ID: | 200912262247.13711.andres@anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wednesday 25 November 2009 17:25:43 Tom Lane wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> > An idle-in-transaction transaction can also hold a temporary file. Think
> > of an open cursor, for example. Therefore, remove the distinction
> > between CONFLICT_MODE_ERROR and CONFLICT_MODE_ERROR_IF_NOT_IDLE,
> > idle-in-transaction backends need to be killed too when a tablespace is
> > dropped.
>
> Um ... I think you have forgotten about WITH HOLD cursors, which will
> also have temp files. Implication: whatever you are thinking of here
> would require killing EVERY session. Conclusion: you need a different
> design.
Actually WITH HOLD cursors should not pose a problem - the code already tries
to handle that:
In fd.c:OpenTemporaryFile:
* BUT: if the temp file is slated to outlive the current transaction,
* force it into the database's default tablespace, so that it will not
* pose a threat to possible tablespace drop attempts.
*/
Whether thats generally a good idea is another question.
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2009-12-27 01:15:01 | Hot Standy introduced problem with query cancel behavior |
Previous Message | Bruce Momjian | 2009-12-26 18:50:33 | Re: Removing pg_migrator limitations |