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 1iSRGj-0005xc-0W for pgsql-general@arkaria.postgresql.org; Wed, 06 Nov 2019 19:47:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSRFj-0006Re-LA for pgsql-general@arkaria.postgresql.org; Wed, 06 Nov 2019 19:46:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSRFj-0006K8-6W for pgsql-general@lists.postgresql.org; Wed, 06 Nov 2019 19:46:03 +0000 Received: from uucp.dinoex.sub.de ([2001:1440:5001:1::2] helo=uucp.dinoex.org) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iSRFL-0002WB-D5 for pgsql-general@postgresql.org; Wed, 06 Nov 2019 19:46:01 +0000 Received: from uucp.dinoex.sub.de (uucp.dinoex.org [185.220.148.12]) by uucp.dinoex.org (8.16.0.41/8.16.0.41) with ESMTPS id xA6JjA8X006183 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Wed, 6 Nov 2019 20:45:10 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) X-MDaemon-Deliver-To: X-Authentication-Warning: uucp.dinoex.sub.de: Host uucp.dinoex.org [185.220.148.12] claimed to be uucp.dinoex.sub.de Received: from citylink.dinoex.sub.org (uucp@localhost) by uucp.dinoex.sub.de (8.16.0.41/8.16.0.41/Submit) with UUCP id xA6Jj9hZ006180 for pgsql-general@postgresql.org; Wed, 6 Nov 2019 20:45:09 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.15.2/8.15.2) with ESMTP id xA6JE1Tj012654 for ; Wed, 6 Nov 2019 20:14:01 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by gate.oper.dinoex.org (8.15.2/8.15.2) with ESMTP id xA6JBrgZ012560 for ; Wed, 6 Nov 2019 20:11:55 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: (from peter@localhost) by gate.oper.dinoex.org (8.15.2/8.15.2/Submit) id xA6JBru0012559 for pgsql-general@postgresql.org; Wed, 6 Nov 2019 20:11:53 +0100 (CET) (envelope-from peter) Date: Wed, 6 Nov 2019 20:11:53 +0100 From: Peter To: pgsql-general@postgresql.org Subject: Locked out of schema public Message-ID: <20191106191153.GA12072@gate.oper.dinoex.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.12.2 (2019-09-21) X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 185.220.148.12; Sender-helo: uucp.dinoex.sub.de;) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (uucp.dinoex.org [185.220.148.12]); Wed, 06 Nov 2019 20:45:13 +0100 (CET) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is FreeBSD 11.3, with postgres installed from ports as 10.10. There is included a daily utility doing pg_dump: : ${daily_pgsql_pgdump_args:="-U ${daily_pgsql_user} -p ${daily_pgsql_port} -bF c"} pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db} Recently I did a restore of some database, as the postgres user, with: pg_restore -c -d -h and now ordinary users are locked out of the database: PG::UndefinedTable: ERROR: relation "users" does not exist => \d users Did not find any relation named "users". => \d Did not find any relations. => \d public.users Table "public.users" [etc.etc. all is present] => show search_path; search_path ----------------- "$user", public (1 row) => select current_schemas(false); current_schemas ----------------- {} (1 row) eh???? HOPPALA!!! => select * from public.users; ERROR: permission denied for schema public How can this happen? I don't think I twiddled anything with schemas, in fact I never used them in any way. cheers, PMc