2
PostgreSQL: ไม่สามารถเปลี่ยนไดเรกทอรีเป็น / root ได้
ฉันพยายามที่จะคัดลอกตารางplanet_osm_polygonจากฐานข้อมูลหนึ่งไปยังอีกosm testฉันและดำเนินการsu postgrespg_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: UPDATE ปัญหา # 2:ปรากฏว่าตารางจะถูกคัดลอกลงในสคีแม้ว่าฉันผ่านธงpublic --table="staging.planet_osm_polygon"ทำไมไม่ได้คัดลอกไปยังคีมาstaging?