From: | Thomas Kellerer <shammat(at)gmx(dot)net> |
---|---|
To: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: moving a database to a new 15.1 server |
Date: | 2023-02-01 12:35:00 |
Message-ID: | bf7bce23-525a-a9c1-5d12-83a73d3acbde@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Wienhold | 2023-02-01 12:38:11 | Re: moving a database to a new 15.1 server |
Previous Message | Matthias Apitz | 2023-02-01 12:24:34 | moving a database to a new 15.1 server |