Re: [GENERAL] Seeking performance advice: Index for "recent entries"

2012-05-08 Thread Chris Angelico
On Wed, May 9, 2012 at 2:52 PM, Tom Lane wrote: > Chris Angelico writes: >> I have a table with a timestamptz column for the "effective date/time" >> of the row, and need to have some queries that look only for those >> entries for which that is in the future or VERY recently - which will >> be a

Re: [GENERAL] Seeking performance advice: Index for "recent entries"

2012-05-08 Thread Tom Lane
Chris Angelico writes: > I have a table with a timestamptz column for the "effective date/time" > of the row, and need to have some queries that look only for those > entries for which that is in the future or VERY recently - which will > be a small minority of rows. I'm looking at something like:

[GENERAL] Seeking performance advice: Index for "recent entries"

2012-05-08 Thread Chris Angelico
I have a table with a timestamptz column for the "effective date/time" of the row, and need to have some queries that look only for those entries for which that is in the future or VERY recently - which will be a small minority of rows. I'm looking at something like: CREATE INDEX on tablename (eff

Re: [GENERAL] COPY column order

2012-05-08 Thread MD33
HEADER option is not as useful as I wanted, but sounds good with column names. Thanks a lot ! -- View this message in context: http://postgresql.1045698.n5.nabble.com/COPY-column-order-tp5690950p5696058.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsq

Re: [GENERAL] relpages sudden increase

2012-05-08 Thread Tomas Vondra
On 8.5.2012 19:27, Richard Harley wrote: > I currently do nightly database dumps on a ton of small dbs that are > increasing around 2-3mb per day. Suddenly, in a recent backup file, one > db in particular jumped from 55mb to 122mb overnight. Well, I wouldn't call that 'massive size' but in my expe

Re: [GENERAL] 2 machines, same database, same query, 10 times slower?

2012-05-08 Thread Tomas Vondra
On 8.5.2012 20:32, Antonio Goméz Soto wrote: >> > Do this on both machines to verify that >> > >> >SELECT relpages, reltuples FROM pg_class WHERE relname = 'cdr'; > Slow machine: > > relpages | reltuples > --+--- >400566 |982321 > > Fast machine: > > relpages | re

Re: [GENERAL] 2 machines, same database, same query, 10 times slower?

2012-05-08 Thread Pavel Stehule
2012/5/8 Antonio Goméz Soto : > Hi Tomas, > > thanks for responding. > > Op 08-05-12 17:34, Tomas Vondra schreef: >> Hi, >> >> On 8 Květen 2012, 16:48, Antonio Goméz Soto wrote: >>> Hi, >>> >>> I am running PostgreSQL 8.1, on CentOS 5. I have two machines, same >>> hardware, with the same database

Re: [GENERAL] 2 machines, same database, same query, 10 times slower?

2012-05-08 Thread Antonio Goméz Soto
Hi Tomas, thanks for responding. Op 08-05-12 17:34, Tomas Vondra schreef: > Hi, > > On 8 Květen 2012, 16:48, Antonio Goméz Soto wrote: >> Hi, >> >> I am running PostgreSQL 8.1, on CentOS 5. I have two machines, same >> hardware, with the same database layout, >> they have different data, and the

[GENERAL] relpages sudden increase

2012-05-08 Thread Richard Harley
I currently do nightly database dumps on a ton of small dbs that are increasing around 2-3mb per day. Suddenly, in a recent backup file, one db in particular jumped from 55mb to 122mb overnight. I did some investigation - One table increased from 8mb to 31mb during a 24hr period. The table is

Re: [GENERAL] .pgpass not working

2012-05-08 Thread Rebecca Clarke
Hi Ben I had saved the .pgpass file in my home directory /home/user/.pgpass which works when I'm logged in as user. However, in order for me to use Slony, I had to be logged in as postgres user. I installed strace and ran my pg_dump test and found that it actually looks for the .pgpass file in /va

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-08 Thread deepak
On Tue, May 8, 2012 at 3:09 AM, Alban Hertroys wrote: > On 8 May 2012, at 24:34, deepak wrote: > > > Hi, > > > > On Windows 2008, sometimes the server fails to start due to an existing > "postmaster.pid' file. > > > > I tried rebooting a few times and even force shutting down the server, > and it

Re: [GENERAL] connect local pgAdmin III to remote postgres server

2012-05-08 Thread Raymond O'Donnell
On 08/05/2012 12:21, gdhia wrote: > > postgresql.conf has the changed value: > #listen_addresses = '*' You need to uncomment this line for it to take effect. Remove the '#' from the start of the line, and then restart (or maybe just reload? - not sure) the server. Ray. -- Raymond O'Donnell ::

[GENERAL] connect local pgAdmin III to remote postgres server

2012-05-08 Thread gdhia
Hi all, I have a Debian server on which is installed Postgresql, with a database. I have installed pgAdmin III on my computer (Win 7) and I try to communicate with postgres on my server to display it. on my server, using this code tells me the DB installed: postgres=# select datname from pg_dat

Re: [GENERAL] 2 machines, same database, same query, 10 times slower?

2012-05-08 Thread Tomas Vondra
Hi, On 8 Květen 2012, 16:48, Antonio Goméz Soto wrote: > Hi, > > I am running PostgreSQL 8.1, on CentOS 5. I have two machines, same > hardware, with the same database layout, > they have different data, and the same query run 10 times as slow on one > machine compared to the other. First of all,

Re: [GENERAL] Use LISTEN/NOTIFY between different databases

2012-05-08 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Yes, but it is workaround. The native way - is the "communication" on > DB-backend level. > It would be very good feature - possibility to set a destination DB in > NOTIFY command as optional argument. > > Is the developers read this list ? :)

[GENERAL] 2 machines, same database, same query, 10 times slower?

2012-05-08 Thread Antonio Goméz Soto
Hi, I am running PostgreSQL 8.1, on CentOS 5. I have two machines, same hardware, with the same database layout, they have different data, and the same query run 10 times as slow on one machine compared to the other. I have run ANALYZE on both machines, here are the query plans for both machin

Re: [GENERAL] errors on restoring postgresql binary dump to glusterfs

2012-05-08 Thread Liang Ma
Thank you Magnus for all the inputs. If I get any comments from gluster community, I will update here. Liang On Mon, May 7, 2012 at 3:27 PM, Magnus Hagander wrote: > On Mon, May 7, 2012 at 7:34 PM, Liang Ma wrote: >> On Mon, May 7, 2012 at 12:54 PM, Magnus Hagander wrote: >>> On Mon, May 7, 20

[GENERAL] Picksplit warning

2012-05-08 Thread Oleg Mürk
Hello, Our postgresql logs are getting filled with warnings: LOG: picksplit method for column COLUMN_IDX of index INDEX_NAME doesn't support secondary split We are using gist indexes on integer, timestamp, and Postgis geometry. Is there a way to work around this problem? Thank You, Oleg Mürk

Re: [GENERAL] lowercase on columnname using view

2012-05-08 Thread Guillaume Lelarge
On Tue, 2012-05-08 at 04:00 -0700, Chrishelring wrote: > Hi all, > > had some help the other day, but now I´m kinda stuck again. :/ > > I have a table ("virksomhedsdata") with the following columns: > > "MI_STYLE" character varying(254), > "MI_PRINX" integer NOT NULL DEFAULT > nextval('rk_ois."

Re: [GENERAL] lowercase on columnname using view

2012-05-08 Thread Szymon Guz
On 8 May 2012 13:00, Chrishelring wrote: > Hi all, > > had some help the other day, but now I´m kinda stuck again. :/ > > I have a table ("virksomhedsdata") with the following columns: > > "MI_STYLE" character varying(254), > "MI_PRINX" integer NOT NULL DEFAULT > nextval('rk_ois."virksomhedsdata

[GENERAL] lowercase on columnname using view

2012-05-08 Thread Chrishelring
Hi all, had some help the other day, but now I´m kinda stuck again. :/ I have a table ("virksomhedsdata") with the following columns: "MI_STYLE" character varying(254), "MI_PRINX" integer NOT NULL DEFAULT nextval('rk_ois."virksomhedsdata_MI_PRINX_seq"'::regclass), "SP_GEOMETRY" geometry, I wo

Re: [GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-08 Thread Alban Hertroys
On 8 May 2012, at 24:34, deepak wrote: > Hi, > > On Windows 2008, sometimes the server fails to start due to an existing > "postmaster.pid' file. > > I tried rebooting a few times and even force shutting down the server, and it > started up fine. > It seems to be a race-condition of sorts in t