you cannot copy postgres data files from one computer to second.
PostgreSQL is not MySQL. Use pg_dump instead or copy statement.
1. on PC1
pg_dump -t yourtable yourdatabase > yourtable.sql
2. copy yourtable.sql file from PC1 to PC2
3. on PC2
psql yourdatabase < yourtable.sql
>
> An error message pops up saying "Cache lookup failed for relation 16410".
> What does this mean?
>
your data file is not compatible with data dictionary.
http://www.postgresql.org/docs/8.3/static/backup.html
regards
Pavel Stehule
> Please help. I will really appreciate if you could give me some ideas with
> this.
> Thanks in advance and God bless.Pls
>
>
> Roseller Romanos
> STI-Pagadian
> Gillamac Building, Pagadian City
> Office Nos: (062) 2144-785
> Home Nos: (062) 2144-695
> Mobile Nos: 09205302636
>
--
Sent via pgsql-general mailing list (pgsql-...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Well, strictly speaking, if they're from the same architecture, with
the same compile time options and the same major version of pgsql*
then you can. But you need to shut down the source and destination
servers while doing it.
* Note that in pgsql the first TWO numbers denote a major version, so
8.1 and 8.2 are NOT the same major version.
and all your DDL operation are same and executed in same order too
I'm not sure what you mean. If you shut down both db instances, and
copy the files over, there's no DDL involved really.
When you copy all files, then ok. But when you copy only one data
file, then you have a problem.
Problem should be different oid of pg_class table
Pavel
Definitely, all files, and blow away the destination first. The OP
had said he copied the data directory, which should be more than
enough, but if they left old files in place I'm not so sure.
Note that this could be a permissions problem. All the files need to
belong to whatever user postgres runs as.
If the destination PG install successfully started before there will be
no permission problems. When copying files from one computer to another
security credentials do not follow in Windows, security will be
inherited from parent directory by default.
The only time security in windows has that kind of problem is when
moving the physical hard drive to another computer. This creates
orphaned UUID describing security credentials in meta data of the NTFS
volume To clean up that kind of security mess requires first taking
ownership of the files then reseting all the permissions with replace
option.