Quantcast
Channel: Question and Answer » postgresql
Browsing all 1138 articles
Browse latest View live

Choosing A PostgreSQL Authentication Method For A Large Course

I am teaching a first course in databases for the first time. Students will need to have a database management system to which they can connect to do much of their work for the course. I have chosen to...

View Article


Do I need to perform any tasks after Postgres goes into recovery mode?

For starters, I do not have any sort of automated failover in place. After two scenarios, I’m unsure of the state of the database and any required actions, if any, to take: My master server disappears...

View Article


pgsql slow query on table of 500 million rows

I have a table that keeps measurements of latencies between nodes running MPI tasks in a large cluster. The table looks like this: CREATE TABLE latency( from_rank int, to_rank int, from_host...

View Article

Have Postgresql accept 1 and 0 as true and false for boolean

I have a large file of dumped sql data to load in to postgresl (600mb+). In that dump, fields that are boolean true and false are expessed as 1 and 0 without quotes. Trying to load them in to...

View Article

Adding osm data to Postgres via Osm2pgsql : duplicate key value violates...

I’m trying to import osm global world data into a database created in postgreSQL but after a while of processing, I’ve got this error : Reading in file: E:planet-latest.osmplanet-latest.osm Processing:...

View Article


Postgis and python parameterised queries

I have a python script that i am trying to run in order to dump a postgres table and I noticed there is a pgsql2shp command in bash to perform this easily but I would like to incoperate the same...

View Article

Is there any instructions to download OSM in postgres database?

Is there any instructions to download OSM in postgres database? I use geosuite (geoserver, postgres, postgis). I’d like to download USA and Russia (1-12 levels). I also want to download sld styles. (Is...

View Article

Inconsistency in repeatable read

http://www.postgresql.org/docs/9.2/static/transaction-iso.html The Repeatable Read mode provides a rigorous guarantee that each transaction sees a completely stable view of the database. However, this...

View Article


Can't set up witness in Repmgr 2.0

I am trying to setup repmgr using the autofailover quick setup tutorial provided on Github Link But I am kind of stuck on the witness section, when trying to create the witness with repmgr -d repmgr -U...

View Article


Saving all incoming messages into a database with Postfix?

Is there some plugin for Postfix that can allow you to save all incoming messages into a relational database (PostgreSQL)?

View Article

pg_dump: SQL command failed

I am trying to take backup of postgresql 9.0 by using pg_dump command. command here is: cd /opt/PostgresPlus/9.0AS/bin and hit the following command pg_dump -h xxx.xxx.xxx.xxx -p 5432 -U superuser...

View Article

Should I be concered by large SERIAL values?

I have a Django application that uses PostgreSQL to analyze data from tweets. The data set increases by thousands of records with each request. I am using the database primarily as a cache, so I had...

View Article

Best way to store polygon geospatial data in postgreSQL?

I have to store longitude and latitude coordinates for several places in a PostgreSQL db table. Each row in this table has a field with a set of pairs {latitude1, longitude1, ….latitudeN, longitudeN}...

View Article


connection from ArcMAP to Postgresql, Is ArcSDE required?

I wan to make a direct connection form Arcmap to Postgresql. I have ArcGIS for Desktop 10.1 on windows (64bit). So I need to put “pg_client_windows64″ libraries in C:Program Files...

View Article

Create Layer editing/Analysis in an ArcGIS web map application using...

I want to make an ArcGIS web map application in which user can select different layers of the published map (data of the layer in Postrgresql) and do some analysis based on layer data.import data to...

View Article


How does MySQL or PostgreSQL deal with multi-column indexes in ActiveRecord?

I’m creating indexes for my models right now and I want to know how MySQL and PostgreSQL deal with an index with more than 1 column like: add_index :users, [:username, :created_at] That should utilize...

View Article

Cant get remote access to PostgreSQL

There is PostgreSQL 9.2 in Debian. My /etc/postgresql/9.2/main/postgresql.conf file contains: listen_addresses = '127.0.0.0, 212.49.109.137' password_encryption = on ’212.49.109.137′ is the IP of the...

View Article


How do I time how long my pg_restore takes in the command line?

I’m trying to track the amount of time the process takes for when I move around my data and upgrade my web app. From the command line, how would I track the amount of time elapsed from when the...

View Article

How to get the information of the optimizer of PostgreSQL?

I am curious about the information like total optimization time the time spent on each stage of optimization the number of alternative plans and the cost of each alternative plan.

View Article

Image may be NSFW.
Clik here to view.

psql coloured prompt misbehaving

In theory, there is a possibility to use coloured prompts in psql. I decided (not the first time that I need them, so I thought I would give them a try. So I have in my .psqlrc the following: set...

View Article
Browsing all 1138 articles
Browse latest View live