From: Thomas Kellerer <shammat@gmx.net>
To: Postgres General <pgsql-general@postgresql.org>
Subject: Re: moving a database to a new 15.1 server
Date: Wed, 1 Feb 2023 13:35:00 +0100
Message-ID: <bf7bce23-525a-a9c1-5d12-83a73d3acbde@gmx.net> (raw)
In-Reply-To: <20230201122434.GB9@sh4-5.1blu.de>
References: <20230201122434.GB9@sh4-5.1blu.de>
Matthias Apitz schrieb am 01.02.2023 um 13:24:
> $ psql -Ulbs_lbsoclc01_dev_r1_dbo_u lbs_lbsoclc01_dev_r1
> psql (15.1)
> Type "help" for help.
>
> lbs_lbsoclc01_dev_r1=#
> lbs_lbsoclc01_dev_r1=# \d
> Did not find any relations.
> lbs_lbsoclc01_dev_r1=# \d dbo.accession_index
> Table "dbo.accession_index"
> Column | Type | Collation | Nullable | Default
> ------------------+-----------------------+-----------+----------+---------
> iln | smallint | | not null |
>
> lbs_lbsoclc01_dev_r1=# select count(*) from counter;
> ERROR: relation "counter" does not exist
> LINE 1: select count(*) from counter;
> ^
> lbs_lbsoclc01_dev_r1=# select count(*) from dbo.counter;
> count
> -------
> 41
>
> i.e. I have to specify the schema 'dbo' to access the tables.
you need to change the search_path
alter user lbs_lbsoclc01_dev_r1_dbo_u set search_path = dbo;
This was probably done on the old server. You can see the user's definition
if you dump the "globals" from the old server:
pg_dumpall -U postgres --globals-only -f globals.sql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: shammat@gmx.net
Subject: Re: moving a database to a new 15.1 server
In-Reply-To: <bf7bce23-525a-a9c1-5d12-83a73d3acbde@gmx.net>
References: <20230201122434.GB9@sh4-5.1blu.de> <bf7bce23-525a-a9c1-5d12-83a73d3acbde@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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