pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re[2]: 
9+ messages / 3 participants
[nested] [flat]

* Re[2]: 
@ 2020-05-26 13:53 Andrey Klychkov <aaklychkov@mail.ru>
  2020-05-26 14:50 ` Re: Re[2]:  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Andrey Klychkov @ 2020-05-26 13:53 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: pgsql-bugs@lists.postgresql.org


> Did you by any chance upgrade the operating system on this server at
> some point?
 
It was installed from Centos 8.1 official iso, then was updated right after installation.
After that I installed Postgres.
 
# cat /etc/*release
CentOS Linux release 8.1.1911 (Core)
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/";
BUG_REPORT_URL="https://bugs.centos.org/";
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
CentOS Linux release 8.1.1911 (Core)
CentOS Linux release 8.1.1911 (Core)
 
  
>Вторник, 26 мая 2020, 13:44 +03:00 от Peter Eisentraut <peter.eisentraut@2ndquadrant.com>:
> 
>On 2020-05-26 11:49, Andrey Klychkov wrote:
>> Centos 8.1, kernel 4.18.0-147.8.1.el8_1.x86_64
>> PostgreSQL 12.3
>>
>> I was trying to test execution time of reindexdb command.
>> I ran the following command several times from the script:
>> # time reindexdb -d ep2_test --concurrently
>> The command broke indexes.
>Did you by any chance upgrade the operating system on this server at
>some point?
>
>--
>Peter Eisentraut  http://www.2ndQuadrant.com/
>PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 
 
 
--
Regards,
Andrew K.
 

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Re[2]: 
  2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
@ 2020-05-26 14:50 ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-27 07:48   ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2020-05-26 14:50 UTC (permalink / raw)
  To: Andrey Klychkov <aaklychkov@mail.ru>; +Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org

=?UTF-8?B?QW5kcmV5IEtseWNoa292?= <aaklychkov@mail.ru> writes:
>> Did you by any chance upgrade the operating system on this server at
>> some point?

> It was installed from Centos 8.1 official iso, then was updated right after installation.

Well, there are two issues here:

1. How did you manage to get duplicate entries into the table?  This
suggests that the existing index is corrupt, else it should have detected
the duplicate.  Peter's question was leading towards one known way that
indexes on text columns can become corrupt.

2. Is reindexdb handling the failure sanely?  While I'd agree that
this behavior isn't especially desirable, it's the price of using
REINDEX CONCURRENTLY.  On failure, you're expected to clean up
manually by removing the leftover invalid index.  Perhaps the
documentation isn't clear enough about that, but I don't see a
bug there.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Re[2]:
  2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
  2020-05-26 14:50 ` Re: Re[2]:  Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-05-27 07:48   ` Michael Paquier <michael@paquier.xyz>
  2020-05-27 12:18     ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2020-05-27 07:48 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrey Klychkov <aaklychkov@mail.ru>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org

On Tue, May 26, 2020 at 10:50:19AM -0400, Tom Lane wrote:
> 2. Is reindexdb handling the failure sanely?  While I'd agree that
> this behavior isn't especially desirable, it's the price of using
> REINDEX CONCURRENTLY.  On failure, you're expected to clean up
> manually by removing the leftover invalid index.  Perhaps the
> documentation isn't clear enough about that, but I don't see a
> bug there.

There is a paragraph about the handling of invalid indexes on the
reindex page:
https://www.postgresql.org/docs/devel/sql-reindex.html#SQL-REINDEX-CONCURRENTLY
"The recommended recovery method in such cases is to drop the invalid
index and try again to perform REINDEX CONCURRENTLY. The concurrent
index created during the processing has a name ending in the suffix
ccnew, or ccold if it is an old index definition which we failed to
drop. Invalid indexes can be dropped using DROP INDEX, including
invalid toast indexes."
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20200527074736.GG103662@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Re[2]:
  2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
  2020-05-26 14:50 ` Re: Re[2]:  Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-27 07:48   ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
@ 2020-05-27 12:18     ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-28 06:59       ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2020-05-27 12:18 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Andrey Klychkov <aaklychkov@mail.ru>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org

Michael Paquier <michael@paquier.xyz> writes:
> On Tue, May 26, 2020 at 10:50:19AM -0400, Tom Lane wrote:
>> ...  Perhaps the
>> documentation isn't clear enough about that, but I don't see a
>> bug there.

> There is a paragraph about the handling of invalid indexes on the
> reindex page:

Yeah, but the OP is invoking this via reindexdb.  Do we need to have
anything about it on the reindexdb page?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Re[2]:
  2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
  2020-05-26 14:50 ` Re: Re[2]:  Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-27 07:48   ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-27 12:18     ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-05-28 06:59       ` Michael Paquier <michael@paquier.xyz>
  2020-05-28 13:14         ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2020-05-28 06:59 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrey Klychkov <aaklychkov@mail.ru>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org

On Wed, May 27, 2020 at 08:18:43AM -0400, Tom Lane wrote:
> Yeah, but the OP is invoking this via reindexdb.  Do we need to have
> anything about it on the reindexdb page?

I don't think we should have any duplication between the REINDEX and
reindexdb pages, and we have that in reindexdb:
--concurrently
    Use the CONCURRENTLY option. See REINDEX for further information.

An idea would be to append to the second sentence something like
"where all the caveats of this option are explained in details"?
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20200528065948.GC3460@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Re[2]:
  2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
  2020-05-26 14:50 ` Re: Re[2]:  Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-27 07:48   ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-27 12:18     ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-28 06:59       ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
@ 2020-05-28 13:14         ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-29 05:29           ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2020-05-28 13:14 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Andrey Klychkov <aaklychkov@mail.ru>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org

Michael Paquier <michael@paquier.xyz> writes:
> I don't think we should have any duplication between the REINDEX and
> reindexdb pages, and we have that in reindexdb:
> --concurrently
>     Use the CONCURRENTLY option. See REINDEX for further information.

> An idea would be to append to the second sentence something like
> "where all the caveats of this option are explained in details"?

+1, but I'd change the whole sentence.  Maybe

    Use the CONCURRENTLY option. See REINDEX, where all the caveats of
    this option are explained in detail.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Re[2]:
  2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
  2020-05-26 14:50 ` Re: Re[2]:  Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-27 07:48   ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-27 12:18     ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-28 06:59       ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-28 13:14         ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-05-29 05:29           ` Michael Paquier <michael@paquier.xyz>
  2020-05-29 13:17             ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2020-05-29 05:29 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrey Klychkov <aaklychkov@mail.ru>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org

On Thu, May 28, 2020 at 09:14:20AM -0400, Tom Lane wrote:
> +1, but I'd change the whole sentence.  Maybe
> 
>     Use the CONCURRENTLY option. See REINDEX, where all the caveats of
>     this option are explained in detail.

Agreed.  Here is a patch for 12~.  Please let me know if that's fine
for you.
--
Michael

Attachments:

  [text/x-diff] reindexdb-docs.patch (676B, ../../20200529052939.GD44192@paquier.xyz/2-reindexdb-docs.patch)
  download | inline diff:
diff --git a/doc/src/sgml/ref/reindexdb.sgml b/doc/src/sgml/ref/reindexdb.sgml
index f6c3d9538b..026fd018d9 100644
--- a/doc/src/sgml/ref/reindexdb.sgml
+++ b/doc/src/sgml/ref/reindexdb.sgml
@@ -122,8 +122,9 @@ PostgreSQL documentation
       <term><option>--concurrently</option></term>
       <listitem>
        <para>
-        Use the <literal>CONCURRENTLY</literal> option.  See <xref
-        linkend="sql-reindex"/> for further information.
+        Use the <literal>CONCURRENTLY</literal> option.  See
+        <xref linkend="sql-reindex"/>, where all the caveats of this option
+        are explained in detail.
        </para>
       </listitem>
      </varlistentry>

  [application/pgp-signature] signature.asc (832B, ../../20200529052939.GD44192@paquier.xyz/3-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Re[2]:
  2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
  2020-05-26 14:50 ` Re: Re[2]:  Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-27 07:48   ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-27 12:18     ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-28 06:59       ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-28 13:14         ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-29 05:29           ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
@ 2020-05-29 13:17             ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-31 01:51               ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2020-05-29 13:17 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Andrey Klychkov <aaklychkov@mail.ru>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org

Michael Paquier <michael@paquier.xyz> writes:
> Agreed.  Here is a patch for 12~.  Please let me know if that's fine
> for you.

Sure, works for me.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Re[2]:
  2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
  2020-05-26 14:50 ` Re: Re[2]:  Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-27 07:48   ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-27 12:18     ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-28 06:59       ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-28 13:14         ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
  2020-05-29 05:29           ` Re: Re[2]: Michael Paquier <michael@paquier.xyz>
  2020-05-29 13:17             ` Re: Re[2]: Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-05-31 01:51               ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 9+ messages in thread

From: Michael Paquier @ 2020-05-31 01:51 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrey Klychkov <aaklychkov@mail.ru>; Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-bugs@lists.postgresql.org

On Fri, May 29, 2020 at 09:17:58AM -0400, Tom Lane wrote:
> Sure, works for me.

Thanks, applied then.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20200531015134.GK44192@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2020-05-31 01:51 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 13:53 Re[2]:  Andrey Klychkov <aaklychkov@mail.ru>
2020-05-26 14:50 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-27 07:48   ` Michael Paquier <michael@paquier.xyz>
2020-05-27 12:18     ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-28 06:59       ` Michael Paquier <michael@paquier.xyz>
2020-05-28 13:14         ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-29 05:29           ` Michael Paquier <michael@paquier.xyz>
2020-05-29 13:17             ` Tom Lane <tgl@sss.pgh.pa.us>
2020-05-31 01:51               ` Michael Paquier <michael@paquier.xyz>

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