Re: [GENERAL] My index doesn't write anymore but read

2015-05-18 Thread ben.play
Thank you for your quick answer ! And ... you are a genius :) A simple "analyse " resolved my problem. Do We have to do it regularly ? Thank you a lot ! -- View this message in context: http://postgresql.nabble.com/My-index-doesn-t-write-anymore-but-read-tp5849689p5849699.html Sent from

Re: [GENERAL] My index doesn't write anymore but read

2015-05-18 Thread Andreas Kretschmer
ben.play wrote: > Thank you for your quick answer ! > > And ... you are a genius :) Yeah, i know ;-) > > A simple "analyse > " resolved my problem. > Do We have to do it regularly ? it's running regulary (via vacuum-process), but you can (and should) run it after mass data changes. An

Re: [GENERAL]

2015-05-18 Thread Sachin Srivastava
Hi Michael, So, as per your suggestion I'll update my database from 9.1.2 to 9.1.15. Kindly confirm, which year this 9.1.2 was released and when 9.1.15 was released. And easily I can upgrade this and what are the steps to upgrade, kindly confirm? Regards, Sachin On Fri, May 15, 2015 at 5:16

Re: [GENERAL]

2015-05-18 Thread Thomas Kellerer
Sachin Srivastava schrieb am 18.05.2015 um 12:04: > Kindly confirm, which year this 9.1.2 was released and when 9.1.15 was > released. That information is part of the release notes: http://www.postgresql.org/docs/9.1/static/release-9-1-2.html http://www.postgresql.org/docs/9.1/static/release-9-

[GENERAL] pg_xlog Concern

2015-05-18 Thread Sachin Srivastava
Hi, I have done below changes in my postgresql.conf. *Checkpoint_segments= 200* and *checkpoint_timeout= 5min* I am also doing archiving and below changes in my postgresql.conf. *Wal_level=archive* *archive_command= cp %p /dbkup/momacpp_213_live/%f* *archive_mode=on* Achievin

Re: [GENERAL]

2015-05-18 Thread Michael Paquier
On Mon, May 18, 2015 at 7:04 PM, Sachin Srivastava wrote: > Hi Michael, > > So, as per your suggestion I'll update my database from 9.1.2 to 9.1.15. > > Kindly confirm, which year this 9.1.2 was released and when 9.1.15 was > released. > > > And easily I can upgrade this and what are the steps t

Re: [GENERAL] pg_xlog Concern

2015-05-18 Thread Torsten Förtsch
On 18/05/15 13:44, Sachin Srivastava wrote: > But currently my pg_xlog size is 60 GB and there are 3740 WAL file in > this folder and in Last week this was 400 GB(pg_xlog folder) and WAL > file were approx. 3. Due to archiving pg_xlog folder size is > decreasing now but it’s taking one week to

[GENERAL] Optimizing a read-only database

2015-05-18 Thread François Battail
Dear List, I would like to know if somebody is aware of tricks for optimizing PostgreSQL settings for a read-only database. I have a big read-only database (> 1.10^9 records splitted into ~ 10 tables) using GiST and Btree indexes, no foreign keys on tables at all. I believe that not doing loc

Re: [GENERAL] Optimizing a read-only database

2015-05-18 Thread Andreas Kretschmer
> François Battail hat am 18. Mai 2015 um 16:07 > geschrieben: > > > Dear List, > > I would like to know if somebody is aware of tricks for optimizing > PostgreSQL settings for a read-only database. you can set fillfactor to 100 alter table ... set (fillfactor = 100), see http://www.postg

Re: [GENERAL] pg_xlog Concern

2015-05-18 Thread Koray Eyidoğan
Hi, Any kind of slowness on your archive directory may cause the archiving process fall behind thus accumulating segment files in your cluster's pg_xlog directory. I assume that you are on PostgreSQL 9.4. Could you please check your archiver status by typing "select * from pg_catalog.pg_stat_arch

Re: [GENERAL] Optimizing a read-only database

2015-05-18 Thread François Battail
Le 18/05/2015 16:20, Andreas Kretschmer a écrit : Thank you Andreas, you can set fillfactor to 100 Yes, but it's already the default value according to documentation. And you can disable VACUUM. Already done ;-) I was more dreaming of something like "disable read write locks or mutexes"

Re: [GENERAL] Optimizing a read-only database

2015-05-18 Thread William Dunn
Hello François, - With read-only work loads you can make shared_buffers very large, like 40% of RAM available to the database. Usually you would keep it lower because in a write heavy workload large shared_buffers causes checkpoints to have huge IO, but since you are not making changes

[GENERAL] SQL Server access from PostgreSQL

2015-05-18 Thread Filip Rembiałkowski
Hi. I will be happy to hear your opinion which one is better - odbc_fdw or tds_fdw? In terms of performance / stability / convenience. (Pg on OpenSuse, MS SQL on Win2008 ) Thanks! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Optimizing a read-only database

2015-05-18 Thread François Battail
Le 18/05/2015 16:38, William Dunn a écrit : Thank you William, * With read-only work loads you can make shared_buffers very large, like 40% of RAM available to the database. Usually you would keep it lower because in a write heavy workload large shared_buffers causes checkpoints t

Re: [GENERAL] My index doesn't write anymore but read

2015-05-18 Thread William Dunn
Hello Ben, Looks like you need to tune autovacuum to be more aggressive. Make sure autovacuum=ON (the default), increase autovacuum_max_workers (at least 1 per database, more if autovacuum is falling behind), autovacuum_vacuum_scale_factor to be ~half of the default and can be set per table to be

Re: [GENERAL] Optimizing a read-only database

2015-05-18 Thread William Dunn
On Mon, May 18, 2015 at 10:54 AM, François Battail < francois.batt...@sipibox.fr> wrote: > Le 18/05/2015 16:38, William Dunn a écrit : > > * You can also run a CLUSTER command on one of your indexes to group >> data that is frequently accessed together into the same segment of >> disk so

[GENERAL] pl/python composite type array as input parameter

2015-05-18 Thread Filipe Pina
Hello, I'm building an app in Django and I want to have some functions directly in postgres. I'd prefer to use pl/python for the functions as it'd look better in Django migration files (python code within python code, instead of using PLPGSQL). But one of the functions I need to create needs

Re: [GENERAL]

2015-05-18 Thread John R Pierce
On 5/18/2015 4:48 AM, Michael Paquier wrote: And easily I can upgrade this and what are the steps to upgrade, kindly confirm? On disk format for the same major version is compatible, so simply install the new binaries and restart your server. The installation of the new binaries dep

Re: [GENERAL] Optimizing a read-only database

2015-05-18 Thread François Battail
Le 18/05/2015 17:20, William Dunn a écrit : Hello William, Hello François - the CLUSTER command doesn't have to do with where your indexes are. What the CLUSTER command does is physically sort the table data based on the index (Doc: http://www.postgresql.org/docs/devel/static/sql-cluster.html).

Re: [GENERAL] SQL Server access from PostgreSQL

2015-05-18 Thread Geoff Montee
Hi Filip, On Mon, May 18, 2015 at 7:52 AM, Filip Rembiałkowski wrote: > Hi. > > I will be happy to hear your opinion which one is better - odbc_fdw or > tds_fdw? > > In terms of performance / stability / convenience. > > (Pg on OpenSuse, MS SQL on Win2008 ) > > Thanks! > I'm the developer of td

Re: [GENERAL] SQL Server access from PostgreSQL

2015-05-18 Thread Filip Rembiałkowski
Thank you Geoff. Actually I have a problem - maybe you can point me in the right direction? CREATE EXTENSION tds_fdw; CREATE EXTENSION CREATE SERVER ms FOREIGN DATA WRAPPER tds_fdw OPTIONS (servername 'ms'); CREATE SERVER CREATE USER MAPPING FOR postgres SERVER ms OPTIONS (username 'bzzt', pass

Re: [GENERAL] SQL Server access from PostgreSQL

2015-05-18 Thread Geoff Montee
On Mon, May 18, 2015 at 10:28 AM, Filip Rembiałkowski wrote: > Thank you Geoff. > > Actually I have a problem - maybe you can point me in the right direction? > > CREATE EXTENSION tds_fdw; > CREATE EXTENSION > > CREATE SERVER ms FOREIGN DATA WRAPPER tds_fdw OPTIONS (servername 'ms'); > CREATE SERV