Skip to main content
6 events
when toggle format what by license comment
Oct 21, 2020 at 18:12 comment added PiotrChernin It's not a permissions problem. I've checked permissions and I've tried doing everything from /tmp. The error indicates that Postgres is complaining that the database I'm telling it to create doesn't exist before creating it.
Oct 21, 2020 at 18:07 comment added Ahmad Abuhasna the command you mentioned in the original post was for restore DB, and if you cant access the file via postgres then it will fail for sure (mentioned in the third point of the troubleshoot), if you dont want to change the permission then move the file for another directory where postgres can access it.
Oct 21, 2020 at 18:01 comment added Ahmad Abuhasna @PiotrChernin this is the installation directory, connect normally to psql then hit show all; and it will show you all the needed, and tablespace can be found any where in the system depend on the creation statement, and if you have pgadmin this will save you a lot of time, this will show you exactly where is the data dir.
Oct 21, 2020 at 16:04 comment added PiotrChernin I've tried both sudo -u postgres {command} and sudo -i -u postgres then {command} on the target server. They both give the error noted in the original post.
Oct 21, 2020 at 16:03 comment added PiotrChernin The Postgres home directory /var/lib/postgresql/ and data directory /var/lib/postgresql/12/main/ both exist on the target server. Are you referring to one of them?
Oct 21, 2020 at 15:10 history answered Ahmad Abuhasna CC BY-SA 4.0