Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUaH3-0000vW-9b for pgsql-general@arkaria.postgresql.org; Sat, 25 May 2019 17:16:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hUaH1-0006oI-Ml for pgsql-general@arkaria.postgresql.org; Sat, 25 May 2019 17:15:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUaH1-0006o4-A7 for pgsql-general@lists.postgresql.org; Sat, 25 May 2019 17:15:59 +0000 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUaGy-0007Jv-GK for pgsql-general@lists.postgresql.org; Sat, 25 May 2019 17:15:58 +0000 Received: by mail-oi1-x243.google.com with SMTP id y124so9267698oiy.3 for ; Sat, 25 May 2019 10:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=WwHHYu1oxgocPPNlMTxOFqOrx5ecg3L4M4FJdvcHRsg=; b=nT8hRJFMXTk0OLcL/9qUbW/ryaX+BNcmZUv66xeyM2uwjDcmD+uZqAGSBj/hcLIwSa uMv4qfLeCPtLk47v7VgtgHgoGIEn8LdvM0crTQtziwQ73DenK2Rmv8B7PUQnZq5bxQjI AyqMZUME20xmhdMFx0ZLZH1jryS5XFoywEu5ip13nhk0PH5BNsCkumQWYkcqMblvoAvW x16fkJdEvXF1dxHw7AMtxPeOkQHGEXHbcnS1OqH8fYinydPOajG16lzxXxMVeRdRmh1o iqRmEGX2GShkeRc1/VRSFFpXX6mYxxEe/WJb/FNm/8gT0EtF47qRl9dS491VfX5KxVBV Evow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=WwHHYu1oxgocPPNlMTxOFqOrx5ecg3L4M4FJdvcHRsg=; b=UeD3rX0OQEFj9shmRt9VC1ava6kq2brGv3CGrZE7N52qvrLP2D/iTccTm50C+i6rgr Sk560v5iOUDwG83y0/HrWfjoL4nYg2cd4p43gx649Q1RJUEb1qUSXxnyCT0OsihjunQ8 cRX69VNQb4aaBOTjCTpiiNEMZZWQNSQD/mj2oQlmBBDNchNrxHttCPxdV7zwqGQm0F7I hf9ZzbmMEFXGnnNrXy2/8Ji6R4kodmC9ZSqWOW/Gp442v/dKT0WBw648LNxEzHbxBbc7 a754pYLrVjJt6l/1Y7jCc/WOHyaAVxH7dbPfvnQfzL5uggyTmG98AO9reroqA/VgH4vd Ts+A== X-Gm-Message-State: APjAAAU2MltlXecqmwPwkEe8czQFaexq2X2e2f9EtewiEcmM9M61euF3 gkxkbCqpvX7crJlAtMP031FcVXBtxz4= X-Google-Smtp-Source: APXvYqxbNxQTwxAGJV838Gk0TQGQQ+hyF6bRKgZhxRG6icNvjOIwipxGHNe3nDO3oqofKLhzFNsUSA== X-Received: by 2002:aca:ab03:: with SMTP id u3mr10233950oie.112.1558804553177; Sat, 25 May 2019 10:15:53 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id j18sm2361995oih.45.2019.05.25.10.15.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 May 2019 10:15:52 -0700 (PDT) Subject: Re: pg_basebackup from 9.4-bdr to 9.4 results in corrupt index To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <6414cdc6-106e-19c7-dec7-8b3f1f5e8245@gmail.com> Date: Sat, 25 May 2019 12:15:51 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------E206D250F5716A1BCC53CB3C" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------E206D250F5716A1BCC53CB3C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 5/25/19 11:49 AM, Jānis Pūris wrote: > Hello, > > I'm working with a 9.4-bdr cluster and want to move away from BDR tech all > together. So my idea was to follow instructions on > http://bdr-project.org/docs/stable/ to first strip the node from BDR > making it into "regular" node and then moving the data from this node to > official 9.4 instance. > > Environment: > > BDR_Node_1 > BDR_Node_2 > > Regular_Node_1 > > Steps done on BDR_Node_2 > 1. Part node from BDR cluster > http://bdr-project.org/docs/stable/node-management-removing.html > 2. Remove BDR from node > http://bdr-project.org/docs/stable/node-management-disabling.html > 3. Create SR slot select > pg_create_physical_replication_slot('new_cluster_node'); > > After this. Steps done on Regular_Node_1, which is 9.4.22 > 1. Init the new node with pg_basebackup with source being BDR_Node_1 > 2. Update recovery.conf and postgres.conf > 3. Start it with pg_ctl > > All seems to be working well, but for this: > > select * from information_schema.sequences; > > produces "[XX000] ERROR: cache lookup failed for index 899807" for all of > the DBs that were configured with BDR with various OID. > > I can not reproduce this error, when running query on any of the DBs on > 9.4-bdr node. > > Does anyone have any idea what may be causing this ? > Due to this I'm also unable to run pg_dump on new_cluster_node - it also > results in the same error. > > That said. For more context - If it worked, next steps would have been to > 1. Deactivate virtual IP on BDR_Node_2 > 2. Check for no replication lag on BDR_Node_2 slot "new_cluster_node" > 3. Promote Regular_Node_1 > 4. Activate virtual IP on BDR_Node_2 > > Build the new 9.4 cluster from there on. > > Any ideas / comments will be much appreciated! 1. Are you sure that you removed all BDR from the node? 2. Is the corruption there in BDR_Node_1? 3. Can you rebuild the indexes? -- Angular momentum makes the world go 'round. --------------E206D250F5716A1BCC53CB3C Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 5/25/19 11:49 AM, Jānis Pūris wrote:
Hello,

I'm working with a 9.4-bdr cluster and want to move away from BDR tech all together. So my idea was to follow instructions on http://bdr-project.org/docs/stable/ to first strip the node from BDR making it into "regular" node and then moving the data from this node to official 9.4 instance.

Environment:

BDR_Node_1
BDR_Node_2

Regular_Node_1

Steps done on BDR_Node_2
3. Create SR slot select pg_create_physical_replication_slot('new_cluster_node');

After this. Steps done on Regular_Node_1, which is 9.4.22
1. Init the new node with pg_basebackup with source being BDR_Node_1
2. Update recovery.conf and postgres.conf
3. Start it with pg_ctl

All seems to be working well, but for this:

select * from information_schema.sequences;

produces "[XX000] ERROR: cache lookup failed for index 899807" for all of the DBs that were configured with BDR with various OID.

I can not reproduce this error, when running query on any of the DBs on 9.4-bdr node.

Does anyone have any idea what may be causing this ?
Due to this I'm also unable to run pg_dump on new_cluster_node - it also results in the same error.

That said. For more context - If it worked, next steps would have been to
1. Deactivate virtual IP on BDR_Node_2
2. Check for no replication lag on BDR_Node_2 slot "new_cluster_node"
3. Promote Regular_Node_1
4. Activate virtual IP on BDR_Node_2

Build the new 9.4 cluster from there on.

Any ideas / comments will be much appreciated!

1. Are you sure that you removed all BDR from the node?
2. Is the corruption there in BDR_Node_1?
3. Can you rebuild the indexes?

--
Angular momentum makes the world go 'round.
--------------E206D250F5716A1BCC53CB3C--