Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oalYG-0004tc-84 for pgsql-admin@arkaria.postgresql.org; Tue, 20 Sep 2022 22:17:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oalYE-0007mr-Jd for pgsql-admin@arkaria.postgresql.org; Tue, 20 Sep 2022 22:17:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oalYE-0007mh-7D for pgsql-admin@lists.postgresql.org; Tue, 20 Sep 2022 22:17:10 +0000 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oalY7-0003Hq-Mp for pgsql-admin@lists.postgresql.org; Tue, 20 Sep 2022 22:17:09 +0000 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-127ba06d03fso6432990fac.3 for ; Tue, 20 Sep 2022 15:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=wYc+JACuZGL6fj8xwe6hSBZypa6ppzCXszLo3+wZ/Uw=; b=CYL8ZZJTMtEXcysJFML8rYjcf+tQFkckDcji+vKgdfAxbkQyJPlHdiHxYK6ZtMEfpc U3QuKlJFGxQdEAnw1reTzQIsl+V3rwo7TUVaSy6Av8pMHnBZ3gULCI3XlpdYZMU6hb1F t5KvDrztBhZ4f5n6yQDeKpU13IgacFaOj9oYh/RVK2jUIc0uJ0t3mDl075se6AoyehQt JvJw13qAv3em6aldgpt1UZSjCu9CLrmQ35PzeoHfRVyWGaJDqPMA+S1GO40MYvcKPEe6 X3XWG8jBrFsPaYKnW3BTun/kIJRWZcFDzK55V8c0q7mDflWDhDkVBTQZNjTDyUqCvK1p AXEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=wYc+JACuZGL6fj8xwe6hSBZypa6ppzCXszLo3+wZ/Uw=; b=f9XMA+3X6mos/6M/cLU9fWR0tuTUcschoAEtgJW8FLrzMr9WBEAeZl7AfLLHVHjemy Ik6w6kkitXPDDTiA/xSMsIDJPOqgPx0rwxKYwYTg88qzVngdEYuTtHTLgoiQCO9Ahe1Q lx900Gz1KGiykbY9gurEKvEjvErxcSaQCyNLH/x2P0jlFKrHTJGgy5ZAYYTkvlwqqN7H PFy2t+xNb5J2Gle+/+rX7TJa97uh37xcBb+iYpa7ct/SReHaNrvVJEGLJzkxS9BFGr70 YUCxPOdcCzgNnBQ9xTRdP+5AMtZziBuvTlRZomqqJBH/6TkxcOoQ1ANbRscX+zVvZ/U/ 6KtA== X-Gm-Message-State: ACrzQf00mALSpWcElolaQpg2KjGbTA1C++6G0mUweAsua6kMRUUrQtId BnRdBlKvqc8MAxShJk3UBfQ/XchcvUo= X-Google-Smtp-Source: AMsMyM4nQhXEY5rG2lMLorJIc+qM7Q8CX5+dtrepnHCbiTo08Kr8gKn8WsHqMoJa9Ap3JZPk7VkVxQ== X-Received: by 2002:a05:6870:8a29:b0:127:ee3a:ac3 with SMTP id p41-20020a0568708a2900b00127ee3a0ac3mr3593972oaq.108.1663712222635; Tue, 20 Sep 2022 15:17:02 -0700 (PDT) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id a7-20020a056808098700b0033b31480f38sm479980oic.34.2022.09.20.15.17.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 15:17:01 -0700 (PDT) Message-ID: <5273c007-0977-2939-d522-974c19dda959@gmail.com> Date: Tue, 20 Sep 2022 17:17:01 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Weird issue - schemas missing - on Windows 10 PostgreSQL 14 & 9.6 Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: From: Ron In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/20/22 16:09, Nitin N wrote: > Hello friends, > > I had a Postgres 9.6 server with a few databases running on my Windows 10 > laptop. Some months ago I installed version 14 and migrated my databases > across using pg_dumpall and uninstalled 9.6 without deleting the data > folders for 9.6. > > I do not use all the databases always, but post upgrade I remember > checking all the databases and they all looked fine. Off late, I was > working on a couple of newer databases and they are all working fine. But > now when I needed to access another older database, I noticed that I can > only see the public schemas in them. In fact all my older databases are > only showing public schema in them. My main schemas just disappeared and > they are not there  even in the information_schema if I query the list of > schemas. > > Honestly I have no idea how and when this happened. The only thing I > remember doing (something perhaps not good) was I entered CTRL+C when I > ran vacuumdb on all databases in version 14. > > Now I have one database which is very important for me and my latest > backup, unfirtunately, does not include newer data. So I stand to lose a > few months' worth data if I am unable to restore the schemas back. Now you know to back up data more frequently.  :( > I installed 9.6 version again and ran it on another port to see if I can > access the database from the older version. Funnily, that also shows the > schemas missing. This is just not possible as I have positively used the > application that runs off this database some months back. > > So all my dear expert admins, is there any way I can restore these missing > schemas in all these databases? I am a bit worried 😞 > > Please help. Thanks in advance. Do you still have the 9.6 dumpall backup file?  If so, look through it for the schema. Check the search_path. Do you remember any specific table names?  "\du missing_schema.specific_table_name" might show it. Connect as user "postgres" and query information_schema.schemata. -- Angular momentum makes the world go 'round.