Re: Create Index CONCURRENTLY Hangs Indefinitely.

From: Wei Shan <weishan(dot)ang(at)gmail(dot)com>
To: Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Create Index CONCURRENTLY Hangs Indefinitely.
Date: 2015-05-20 02:48:43
Message-ID: CAFe9ZTqkUsbyMUGpv8NysS-Zh9s4eT31+Lz7MXO-XTDnn99-3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all,

Thanks a lot for the replies. I really appreciate it.

I have found the root cause for this issue.

1. I created a new tablespace called tablespace_index pointing to
'/data/tablespace' on master but I forgot to create the directory on slave.
2. Once the tablespace was created on the master, the slave could not
replicate the changes over because there was not directory to create the
index!
3. As such, the subsequence queries started failing.

It was a good learning experience for me. I didn't foresee this to happen.

Cheers!

On 19 May 2015 at 20:53, Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>
wrote:

>
> On Tue, May 19, 2015 at 7:30 AM, Wei Shan <weishan(dot)ang(at)gmail(dot)com> wrote:
>
>> 4. After it took more than 2hrs+, I went to terminate the session via
>> Ctrl-C, it returned the following error.
>>
>> WARNING: canceling wait for synchronous replication due to user request
>> DETAIL: The transaction has already committed locally, but might not
>> have been replicated to the standby.
>> ^CCancel request sent
>> ERROR: canceling statement due to user request
>>
>
> The index has been created already, probably for a long time, but it was
> waiting to be sent to your standby server. Seems that you have synchronous
> replication configured and your standby is either delayed, not connected or
> out of sync. That is bad, really bad, means that any writes to your primary
> might be stalling now.
>
> You should check your replication.
>
> Regards,
> --
> Matheus de Oliveira
> Analista de Banco de Dados
> Dextra Sistemas - MPS.Br nível F!
> www.dextra.com.br/postgres
>
>

--
Regards,
Ang Wei Shan

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Gustav Karlsson 2015-05-20 05:29:41 Re: Deleting old WAL-files
Previous Message Graeme B. Bell 2015-05-19 14:26:30 Performances issues with SSD volume ?