मैं planet_osm_polygonएक डेटाबेस osmसे दूसरे में टेबल कॉपी करने की कोशिश कर रहा हूं test। मैंने su postgresऔर प्रदर्शन किया pg_dump।
समस्या: हालाँकि मुझे त्रुटि मिल रही है could not change directory to "/root"और Password:संकेत दो बार दिखाई दिया है! क्या pg_dumpलॉग इन के रूप में प्रदर्शन करने का कोई तरीका है root?
root@lalaland:~# su postgres
postgres@lalaland:/root$ pg_dump -h localhost "osm" --table "public.planet_osm_polygon" |
psql -h localhost "test" --table "staging.planet_osm_polygon"
could not change directory to "/root"
could not change directory to "/root"
Password: Password:
अपडेट करें
समस्या # 2: ऐसा प्रतीत होता है कि तालिका को publicस्कीमा में कॉपी किया गया है, भले ही मैंने ध्वज पारित किया हो --table="staging.planet_osm_polygon"। इसे स्कीमा में कॉपी क्यों नहीं किया जाता है staging?
pg_dump, क्या यह वास्तव में बुला रहा है psql? postgresql.org/docs/9.1/static/app-pgdump.html
psql -h localhost "test" --table "staging.planet_osm_polygon"
publicस्कीमा में कॉपी किया जाएगा
psql, कि समस्या का कारण हो सकता है # 2