Re: [GENERAL] Recovery.conf and PITR

2013-08-10 Thread Luca Ferrari
On Fri, Aug 9, 2013 at 2:17 PM, ascot.m...@gmail.com wrote: > Is there a way to query the master (it is up and running) about the actual > commit sequence by transaction IDs? The information is within the clogs, but nothing comes into my mind as to inspect from an admin point of view the clog

Re: [GENERAL] earthdistance

2013-08-10 Thread Dann Corbit
To calculate geographic distances, a great circle route calculation is used. This is not the same thing as the simple calculation for distances between two points on a sphere. In order to perform the calculation, various model parameters must be chosen, such as the ellipsoidal reference model.

Re: [GENERAL] Need Help

2013-08-10 Thread Alban Hertroys
On Aug 9, 2013, at 19:59, nandan wrote: > Hello All ; > > Please help me in knowing below queries which are in Mysql to Postgresql. Postgres and MySQL are very different in these respects. Answering these questions is rather pointless, as it will not give you an understanding of how the role

Re: [GENERAL] earthdistance

2013-08-10 Thread Olivier Chaussavoine
As a simple potential user, I tried to install PostGIS, downloaded all libraries required: proj-4.8.0, gdal-1.10.0,json-c,postgis-2.0.3,geos-3.3.8,libwml2-2.9.0, and tried to build the first library with the simple procedure: ./configure make make install I had a fatal error: make[2]: entrant da

Re: [GENERAL] earthdistance

2013-08-10 Thread Olivier Chaussavoine
I did not found any geographic indexing with earthdistance, and need it. The need I have is simple: "is the distance between two (lat,long) positions less than X km?" the model used for the shape of the earth should be related to the precision of lat,lon, and most sources are imprecise. The spheri

Re: [GENERAL] How To Install Extension Via Script File?

2013-08-10 Thread Tom Lane
Chris Travers writes: > As for whether UTF-8 is the default, it is in many cases, but I remember > struggling with the fact that a few Linux distros still default to > SQL-ASCII. Ultimately this is something of a packaging issue and the > default may be set at the package level. Actually, the de

Re: [GENERAL] Postgres 9.3 beta log

2013-08-10 Thread Bruce Momjian
On Sat, Aug 10, 2013 at 06:38:57AM +, Arvind Singh wrote: > as you can see it is for a single record "login88193" it places > > PARSER STATISTICS > PARSE ANALYSIS STATISTICS > REWRITER STATISTICS > > I know it appers because i have enabled log_parser_* options in log > > But what i request t

[GENERAL] Convincing the query planner to play nice

2013-08-10 Thread Timothy Kane
Hi all, I seem to be having some grief with the 9.1.9 query planner favouring an index scan + merge join, over a sequential scan + hash join. Logically I would have considered the index+merge to be faster, as suggested by the explain output - but in practice, it is in fact slower by orders of

Re: [GENERAL] Postgres 9.3 beta log

2013-08-10 Thread Stefan Kaltenbrunner
On 08/10/2013 04:21 PM, Bruce Momjian wrote: > On Sat, Aug 10, 2013 at 06:38:57AM +, Arvind Singh wrote: >> as you can see it is for a single record "login88193" it places >> >> PARSER STATISTICS >> PARSE ANALYSIS STATISTICS >> REWRITER STATISTICS >> >> I know it appers because i have enabled l

[GENERAL] Replication delay

2013-08-10 Thread ascot.m...@gmail.com
Hi, I have a pair of PG servers, a master and a replica, all read-write queries are handled by the master, read-only ones are by the replica. >From time to time the replica itself is too busy, all read-only queries will >get inconsistent results because of replication lag, sometimes it can

Re: [GENERAL] Postgres 9.3 beta log

2013-08-10 Thread Bruce Momjian
On Sat, Aug 10, 2013 at 09:52:48PM +0200, Stefan Kaltenbrunner wrote: > On 08/10/2013 04:21 PM, Bruce Momjian wrote: > > On Sat, Aug 10, 2013 at 06:38:57AM +, Arvind Singh wrote: > >> as you can see it is for a single record "login88193" it places > >> > >> PARSER STATISTICS > >> PARSE ANALYSIS

Re: [GENERAL] Convincing the query planner to play nice

2013-08-10 Thread Tom Lane
Timothy Kane writes: > I seem to be having some grief with the 9.1.9 query planner favouring an > index scan + merge join, over a sequential scan + hash join. I believe the reason it's preferring the merge join plan is that it thinks the executor will be able to terminate the merge join early as

Re: [GENERAL] Convincing the query planner to play nice

2013-08-10 Thread Tim Kane
Okay, so I've played with this a bit more. I think I have it cracked. I had to increase random_page_cost and significantly reduce effective_cache_size in order for the planner to prefer a sequential scan. (It turns out this is what the 8.3.8 instance was doing all along, so it's not anything s

Re: [GENERAL] Convincing the query planner to play nice

2013-08-10 Thread Tim Kane
Ahh, thanks Tom. I hadn't seen your email before I posted my own followup. I guess the clustering approach managed to work around the need to mess with the statistics target. I did previously increase the target to 1000 (from 100) for that field and had no impact, but this is an aspect of tuni

Re: [GENERAL] Convincing the query planner to play nice

2013-08-10 Thread Tom Lane
Tim Kane writes: > I guess the clustering approach managed to work around the need to mess with > the statistics target. I did previously increase the target to 1000 (from > 100) for that field and had no impact, but this is an aspect of tuning I'm > not so familiar with - I didn't consider pu

Re: [GENERAL] Convincing the query planner to play nice

2013-08-10 Thread Tim Kane
Yep, the effective_cache_size was specifically because we have lots of RAM to play with, and want to ensure we are caching wherever possible. The reduced random_page_cost was primarily to allow for the fact we're using relatively fast disk (indexes are SSD, table data on SAS drives), though I d

Re: [GENERAL] earthdistance

2013-08-10 Thread Brent Wood
Is there not a precompiled Postgis package you can use? There are a few dependencies, the PROJ.4 libraries you are missing enable projection support, and the package tools automatically manage such dependencies. I know packages are well supported for Debian, Ubuntu/Mint/etc, Suse & Fedora. See

Re: [GENERAL] earthdistance

2013-08-10 Thread Rob Sargentg
I just recently built the postgis stack (unbuntu 12.4) and had to go to the trunk (maybe 2.1) for postgis itself for a work-around a dependency failure on, ircc, geos. rjs On 08/10/2013 04:03 PM, Brent Wood wrote: Is there not a precompiled Postgis package you can use? There are a few depen