Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yuf2A-0003UO-2G for pgsql-admin@arkaria.postgresql.org; Tue, 19 May 2015 10:46:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yuf29-0000lz-Ic for pgsql-admin@arkaria.postgresql.org; Tue, 19 May 2015 10:46:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yuf28-0000lt-Ra for pgsql-admin@postgresql.org; Tue, 19 May 2015 10:46:00 +0000 Received: from mout.web.de ([212.227.17.11]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1Yuf25-0005Qy-Nr for pgsql-admin@postgresql.org; Tue, 19 May 2015 10:46:00 +0000 Received: from vm-mailsrv.lan.net ([87.155.102.86]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0Lheij-1ZY8iB2X9F-00mrGM for ; Tue, 19 May 2015 12:45:54 +0200 Received: from localhost (localhost [127.0.0.1]) by vm-mailsrv.lan.net (Postfix) with ESMTP id 410DAF12E for ; Tue, 19 May 2015 12:45:53 +0200 (CEST) X-Spam-Flag: NO X-Spam-Score: -2.899 X-Spam-Level: X-Spam-Status: No, score=-2.899 tagged_above=-99.9 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, FREEMAIL_FROM=0.001] autolearn=ham autolearn_force=no Received: from vm-mailsrv.lan.net ([127.0.0.1]) by localhost (vm-mailsrv.lan.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 558_0OUUeV1E for ; Tue, 19 May 2015 12:45:50 +0200 (CEST) Received: from neslonek.homeunix.org (vm-webapp-ext.dmz-lan.net [192.168.0.100]) by vm-mailsrv.lan.net (Postfix) with ESMTP id 001DDF12B for ; Tue, 19 May 2015 12:45:49 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Tue, 19 May 2015 12:45:49 +0200 From: Jan Lentfer To: Subject: Re: Create Index CONCURRENTLY Hangs Indefinitely. In-Reply-To: References: Message-ID: <62cfc7c5688f59b16d257b9dbfb382d3@imap.lan.net> X-Sender: Jan.Lentfer@web.de User-Agent: Roundcube Webmail/0.7.2 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:F+70IZBmaETGRTAZkrNrQoYPcQLAJ142bHcnIQBtbwhvIdCdNOy DBh4/e2/EY9mBc33nP+dPllZzQjFvDRGKX+0ulpyKDfBa3kGYOowKVzWG9tEhkdtCiv4n8a zgEPoMWxsnGleINpyn5YUeYQ+Z9jBHsbrazIxLJinkzb1e/yD0L6pSWaBYHMb7VL32uKhQX /hQYm1m3VpGYR+qOPUVWA== X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Am 2015-05-19 12:30, schrieb Wei Shan: > Hi all, > > Today I tried to create an index online, however it took far too long > that I cancelled the query. > > 1. psql version =3D> 9.2.4 > 2. Table structure as follows. (7.5GB in size) > > evocsp=3D# d certificatedata > =C2=A0 =C2=A0 =C2=A0 =C2=A0Table "public.certificatedata" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 Column =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0Typ= e =C2=A0 | Modifiers > ----------------------+---------+----------- > =C2=A0fingerprint =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| text =C2=A0 =C2=A0|= not null > =C2=A0base64cert =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | text =C2=A0 =C2=A0| > =C2=A0cafingerprint =C2=A0 =C2=A0 =C2=A0 =C2=A0| text =C2=A0 =C2=A0| > =C2=A0certificateprofileid | integer | not null > =C2=A0expiredate =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | bigint =C2=A0| not = null > =C2=A0issuerdn =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | text =C2=A0 = =C2=A0| not null > =C2=A0revocationdate =C2=A0 =C2=A0 =C2=A0 | bigint =C2=A0| not null > =C2=A0revocationreason =C2=A0 =C2=A0 | integer | not null > =C2=A0rowprotection =C2=A0 =C2=A0 =C2=A0 =C2=A0| text =C2=A0 =C2=A0| > =C2=A0rowversion =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | integer | not null > =C2=A0serialnumber =C2=A0 =C2=A0 =C2=A0 =C2=A0 | text =C2=A0 =C2=A0| not = null > =C2=A0status =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | integer |= not null > =C2=A0subjectdn =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| text =C2=A0 = =C2=A0| not null > =C2=A0subjectkeyid =C2=A0 =C2=A0 =C2=A0 =C2=A0 | text =C2=A0 =C2=A0| > =C2=A0tag =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|= text =C2=A0 =C2=A0| > =C2=A0type =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | inte= ger | not null > =C2=A0updatetime =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | bigint =C2=A0| not = null > =C2=A0username =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | text =C2=A0 = =C2=A0| > Indexes: > =C2=A0 =C2=A0 "certificatedata_pkey" PRIMARY KEY, btree (fingerprint) > =C2=A0 =C2=A0 "certificatedata_idx7" btree (certificateprofileid) > > 3. The query ran was =3D> CREATE INDEX CONCURRENTLY=20 > certificatedata_idx2 > ON CertificateData (username) tablespace tablespace_index; > 4. After it took more than 2hrs+, I went to terminate the session via > Ctrl-C, it returned the following error. > > WARNING: =C2=A0canceling wait for synchronous replication due to user > request > DETAIL: =C2=A0The transaction has already committed locally, but might not > have been replicated to the standby. > ^CCancel request sent > ERROR: =C2=A0canceling statement due to user request > > Any input or ideas are welcome. Was your SR slave actually online consuming changes? What does "select=20 * from pg_stat_replication" tell you? Jan --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin