2

I need to upload some very large tables (over 10Gb) into Postgis so I actually found this link What is the best hack for importing large datasets into PostGIS?

The DB manager is far too slow and only uploaded 10% of the data despite saying the import was successful.

Problem is, this is my 1st day ever using Postgis and I have no idea where to run those commands, so I can't really understand the answers in the above link. Is it in the QGIS interface? pgadmin? some other interface?

I have all the latest versions of the softwares and Windows 8

I found a file called shp2pgsql but after clicking it, it instantly closes down

Luffydude
  • 2,308
  • 3
  • 18
  • 38
  • What are the tables that you want to upload? Are they simple attribute tables? Are they spatial data? What format are they in? Based on your comment, it looks like they might be shapefiles. Where is Postgres installed? Have you read any of the documentation for Postgres, since you are new to using it? Here is a link to the documentation. The more detail you can provide about what you are trying to do, the better your chances of obtaining a solution. – Get Spatial May 25 '16 at 16:52
  • 1
    shp2pgsql is a command-line program. You need to open a Windows command prompt and type "shp2pgsql". If the PATH is correctly set up, it will print out some instructions. If not, you'll get an error. There's some talk about setting the PATH on Win 8 here. The path should point to the folder where you found the shp2pgsql file. – Rob Skelly May 25 '16 at 17:22
  • @GetSpatial they are point vector files with >14Gb dbf files in size. I've read the documentation but I didn't find the right thing. I want to upload these files without spending days, not sure what other details can I provide – Luffydude May 25 '16 at 20:01
  • @RobSkelly thank you, will look into that tomorrow and see if it works for me – Luffydude May 25 '16 at 20:02
  • @RobSkelly it worked. thanks! Also this trick will help some people, after opening the prompt, it's very useful to just type cd and then drag the folder into the prompt to get the correct path – Luffydude May 26 '16 at 08:25
  • @RobSkelly - You should add your comment back as an answer so that the explanation of shp2pgsql as a command line tool becomes searchable. – Get Spatial May 26 '16 at 15:11
  • @GetSpatial - Done. – Rob Skelly May 26 '16 at 19:05

1 Answers1

1

shp2pgsql is a command-line program. You need to open a Windows command prompt and type "shp2pgsql". If the PATH is correctly set up, it will print out some instructions. If not, you'll get an error. There's some talk about setting the PATH on Win 8 here. The path should point to the folder where you found the shp2pgsql file.

Rob Skelly
  • 3,101
  • 15
  • 14