Re: failover vs. read only queries

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: failover vs. read only queries
Date: 2010-06-10 00:58:05
Message-ID: 20100610095804.9888.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> > 1. Reset max_standby_delay = 0 in postgresql.conf
> > 2. pg_ctl reload
> > 3. Create a trigger file
>
> As far as I read the HS code, SIGHUP is not checked while a recovery
> is waiting for queries :( So pg_ctl reload would have no effect on
> the conflicting queries.
>
> Independently from the problem I raised, I think that we should call
> HandleStartupProcInterrupts() in that sleep loop.

Hmmm, if reload doesn't work, can we write a query like below?

SELECT pg_terminate_backend(pid)
FROM pg_locks
WHERE conflicted-with-recovery-process;

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-06-10 01:27:09 Re: Invalid YAML output from EXPLAIN
Previous Message David Gardner 2010-06-10 00:55:36 'create or replace function' no longer allows parameters