pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedcancelled queries on standby
3+ messages / 2 participants
[nested] [flat]
* cancelled queries on standby
@ 2011-11-15 10:46 MirrorX <mirrorx@gmail.com>
2011-11-15 20:38 ` Re: cancelled queries on standby Greg Smith <greg@2ndQuadrant.com>
0 siblings, 1 reply; 3+ messages in thread
From: MirrorX @ 2011-11-15 10:46 UTC (permalink / raw)
To: pgsql-admin
hello to all,
i am facing an issue concerning cancelled queries made on a hot standby
server. if we suppose that there are some tables that are never changed (no
inserts/updates/deletes) and that autovacuum is set to false for these
tables, what else could there be affecting these tables and consequently
cancelling my queries? thx in advance for any suggestions
--
View this message in context: http://postgresql.1045698.n5.nabble.com/cancelled-queries-on-standby-tp4994025p4994025.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: cancelled queries on standby
2011-11-15 10:46 cancelled queries on standby MirrorX <mirrorx@gmail.com>
@ 2011-11-15 20:38 ` Greg Smith <greg@2ndQuadrant.com>
2011-11-15 22:09 ` Re: cancelled queries on standby MirrorX <mirrorx@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Greg Smith @ 2011-11-15 20:38 UTC (permalink / raw)
To: pgsql-admin
On 11/15/2011 05:46 AM, MirrorX wrote:
> i am facing an issue concerning cancelled queries made on a hot standby
> server. if we suppose that there are some tables that are never changed (no
> inserts/updates/deletes) and that autovacuum is set to false for these
> tables, what else could there be affecting these tables and consequently
> cancelling my queries? thx in advance for any suggestions
>
Query cancellation isn't targeted this way. Whether or not a query
needs to be canceled by vacuum cleanup depends on whether any open
transaction can see the rows that are being cleaned up. I think you
have the understandable belief what rows are actually being viewed by
the query running on the standby matter; they don't.
Let's say you have a long-running query Q accessing a table A on the
standby. Then some vacuum cleanup of table B happens on the master. Q
can then be canceled when those cleanup records are replicated. The
fact that A is never changed and doesn't have autovacuum enabled doesn't
matter. Because it's possible for Q to see B, it's canceled regardless
of whether it's looked at it yet.
--
Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: cancelled queries on standby
2011-11-15 10:46 cancelled queries on standby MirrorX <mirrorx@gmail.com>
2011-11-15 20:38 ` Re: cancelled queries on standby Greg Smith <greg@2ndQuadrant.com>
@ 2011-11-15 22:09 ` MirrorX <mirrorx@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: MirrorX @ 2011-11-15 22:09 UTC (permalink / raw)
To: pgsql-admin
thanks a lot. the way it works is crystal clear to me now
--
View this message in context: http://postgresql.1045698.n5.nabble.com/cancelled-queries-on-standby-tp4994025p4995933.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-11-15 22:09 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-15 10:46 cancelled queries on standby MirrorX <mirrorx@gmail.com>
2011-11-15 20:38 ` Greg Smith <greg@2ndQuadrant.com>
2011-11-15 22:09 ` MirrorX <mirrorx@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox