Re: [GENERAL] Optimise PostgreSQL for fast testing

2012-02-22 Thread Pavel Stehule
2012/2/23 Dmytrii Nagirniak : > On 23/02/2012, at 5:05 PM, Pavel Stehule wrote: > >> SQLite should be faster in single user test - it is optimized for this >> purpose. So you cannot to get same speed from PostgreSQL > > That's unfortunate to hear. > But hoped with a bit of tuning to get PG close to

Re: [GENERAL] Optimise PostgreSQL for fast testing

2012-02-22 Thread Dmytrii Nagirniak
On 23/02/2012, at 5:05 PM, Pavel Stehule wrote: > SQLite should be faster in single user test - it is optimized for this > purpose. So you cannot to get same speed from PostgreSQL That's unfortunate to hear. But hoped with a bit of tuning to get PG close to SQLite by the fact that I can change t

Re: [GENERAL] Measuring replication lag time

2012-02-22 Thread Stuart Bishop
On Thu, Feb 23, 2012 at 2:58 AM, Greg Williamson wrote: > Stuart Bishop shaped the aether to ask: > >> Hi. >> >> I need to measure how far in the past a hot standby is, async >> streaming replication. > > Not sure if this will help, but we are using repmgr >

Re: [GENERAL] Optimise PostgreSQL for fast testing

2012-02-22 Thread Pavel Stehule
Hello SQLite should be faster in single user test - it is optimized for this purpose. So you cannot to get same speed from PostgreSQL Pavel 2012/2/23 Dmytrii Nagirniak : > > > On 23/02/2012, at 4:38 PM, Jan Kesten wrote: > > Hi Dmytrii, > > just as short idea, put "fsync = off" in your postgre

Re: [GENERAL] Optimise PostgreSQL for fast testing

2012-02-22 Thread Dmytrii Nagirniak
On 23/02/2012, at 4:38 PM, Jan Kesten wrote: > Hi Dmytrii, > > just as short idea, put "fsync = off" in your postgres.conf. That turns off > that after a commit data is forcilby written to disk - if the database > crashes there might be dataloss. Thanks. So far I tried: fsync = off full_pa

Re: [GENERAL] Optimise PostgreSQL for fast testing

2012-02-22 Thread Jan Kesten
Hi Dmytrii, just as short idea, put "fsync = off" in your postgres.conf. That turns off that after a commit data is forcilby written to disk - if the database crashes there might be dataloss. Von meinem iPhone gesendet Am 23.02.2012 um 06:13 schrieb Dmytrii Nagirniak : > Hi guys, > > I wonde

[GENERAL] Optimise PostgreSQL for fast testing

2012-02-22 Thread Dmytrii Nagirniak
Hi guys, I wonder if you can suggest me how to speed-up PG when running specs. I asked it at SO here: http://stackoverflow.com/questions/9407442/optimise-postgresql-for-fast-testing But briefly. PG specs are >2x slower than SQLite. I want it to be on par (don't care about reliability or anything

[GENERAL] Problem when reinstall postgresql value pg_config not update!!

2012-02-22 Thread pinyo_j
Hi Postgresql dev We have a trouble when try to upgrade version slony from v.1.2.1 to v.2.1.1. And slony program require "-enable-thread-safety". But my Postgresql not yet enable with install the first time. How to enable this feature to pg_config. Because I will try to remove and re

[GENERAL] Comment on extension issues with pg_dump after upgrading to 9.1.2

2012-02-22 Thread Timothy Garnett
Hi All, We recently upgraded to 9.1.2 from 9.0.3 and ran into some issues with the process we've been using to dump and restore databases. We typically use a super user (but not the postgres user) to dump and restore databases, but in moving the 9.1.2 we've run into trouble with pg_dump outputing

Re: [GENERAL] Counting different strings (OK%, FB%) in same table, grouped by week number

2012-02-22 Thread Kiriakos Georgiou
I'd code it more general to allow for any user type: select yw, substr(id,1,2) as user_type, count(1) from pref_money group by yw, user_type You can use some clever pivoting to get the user_types to be columns, but I see no need to waste db cycles. You can get the report you want by one

Re: [GENERAL] Why warm-standby doesn't work using file-based log shipping method?

2012-02-22 Thread Jens Wilke
On Dienstag, 21. Februar 2012, sunpeng wrote: > 00010009 > obviously there is no 00020007. The standby is on timeline 2, but the WAL Files are on timeline 1. I guess, you should make a new base backup. Regards, Jens -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] Counting different strings (OK%, FB%) in same table, grouped by week number

2012-02-22 Thread David Johnston
-Original Message- From: Alexander Farber [mailto:alexander.far...@gmail.com] Sent: Wednesday, February 22, 2012 4:10 PM To: David Johnston Cc: pgsql-general Subject: Re: [GENERAL] Counting different strings (OK%, FB%) in same table, grouped by week number Thank you David - On Wed, Feb 2

Re: [GENERAL] Counting different strings (OK%, FB%) in same table, grouped by week number

2012-02-22 Thread Adrian Klaver
On 02/22/2012 12:36 PM, Alexander Farber wrote: Hello, I have a table holding week numbers (as strings) and user ids starting with OK, VK, FB, GG, MR, DE (coming through diff. soc. networks to my site): afarber@www:~> psql psql (8.4.9) Type "help" for help. pref=> select * from pref_money;

Re: [GENERAL] Counting different strings (OK%, FB%) in same table, grouped by week number

2012-02-22 Thread Alexander Farber
Thank you David - On Wed, Feb 22, 2012 at 9:56 PM, David Johnston wrote: > SELECT SUM(CASE WHEN id ~ '^FB' THEN 1 ELSE 0 END) AS fb_cnt, repeat for each > known type (and I generally code one for unknown as well). > > Depending of your use case building out the non-column version and pushing it

Re: [GENERAL] Counting different strings (OK%, FB%) in same table, grouped by week number

2012-02-22 Thread David Johnston
On Feb 22, 2012, at 15:36, Alexander Farber wrote: > Hello, > > I have a table holding week numbers (as strings) > and user ids starting with OK, VK, FB, GG, MR, DE > (coming through diff. soc. networks to my site): > > afarber@www:~> psql > psql (8.4.9) > Type "help" for help. > > pref=> sele

[GENERAL] Counting different strings (OK%, FB%) in same table, grouped by week number

2012-02-22 Thread Alexander Farber
Hello, I have a table holding week numbers (as strings) and user ids starting with OK, VK, FB, GG, MR, DE (coming through diff. soc. networks to my site): afarber@www:~> psql psql (8.4.9) Type "help" for help. pref=> select * from pref_money; id| money | yw ---

Re: [GENERAL] Measuring replication lag time

2012-02-22 Thread Greg Williamson
Stuart Bishop shaped the aether to ask: > Hi. > > I need to measure how far in the past a hot standby is, async > streaming replication. > Not sure if this will help, but we are using repmgr ; it sets up a monitoring schema which we poll )see the "M

Re: [GENERAL] Default PostgreSQL server encoding - Change to unicode (utf8)

2012-02-22 Thread Adrian Klaver
On 02/22/2012 11:20 AM, Léa Massiot wrote: Hello, Thank you for reading my post. When I run the command: I get the following messages: The messages ? I would like the cluster (and the databases) encoding to be unicode (UTF8). What can I do? Can I set the default encoding I want for the w

[GENERAL] Default PostgreSQL server encoding - Change to unicode (utf8)

2012-02-22 Thread Léa Massiot
Hello, Thank you for reading my post. When I run the command: I get the following messages: I would like the cluster (and the databases) encoding to be unicode (UTF8). What can I do? Can I set the default encoding I want for the whole PostgreSQL server somewhere? Thank you for helping and bes

[GENERAL] Error Installing Tablefunc

2012-02-22 Thread Miller, Ian P
Good morning, I recently installed PostgreSQL 9.0 on Windows XP with the intent to use the crosstab function in one of my PostgreSQL databases. I have a complete install, the process is running in Task Manager, and I've been able to run basic commands. However, getting crosstab working (and ins

Re: [GENERAL] Measuring replication lag time

2012-02-22 Thread Venkat Balaji
On Wed, Feb 22, 2012 at 5:40 PM, Stuart Bishop wrote: Hi. > > I need to measure how far in the past a hot standby is, async > streaming replication. > > On the Hot Standby, "select > age(current_timestamp,pg_last_xact_replay_timestamp())" gets me this > (or close enough for my purposes - I underst

Re: [GENERAL] python3 module for accessing postgresql

2012-02-22 Thread Daniele Varrazzo
On Wed, Feb 22, 2012 at 11:10 AM, Andrew Gould wrote: > Does anyone have any advice regarding the selection of a Python 3 > module for PostgreSQL?  The modules I've found so far are psycopg2 and > py-postgresql.  My skill level with Python is fairly basic. Psycopg works perfectly on Python 3 and

[GENERAL] Measuring replication lag time

2012-02-22 Thread Stuart Bishop
Hi. I need to measure how far in the past a hot standby is, async streaming replication. On the Hot Standby, "select age(current_timestamp,pg_last_xact_replay_timestamp())" gets me this (or close enough for my purposes - I understand that if there are no updates, there are no logs to replay and t

[GENERAL] python3 module for accessing postgresql

2012-02-22 Thread Andrew Gould
Does anyone have any advice regarding the selection of a Python 3 module for PostgreSQL? The modules I've found so far are psycopg2 and py-postgresql. My skill level with Python is fairly basic. Thanks, Andrew -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] doc minor glitch?

2012-02-22 Thread Willy-Bas Loos
On Wed, Feb 22, 2012 at 10:33 AM, John R Pierce wrote: > hey, just noticed in the pg TOC on http://www.postgresql.org/** > docs/current/static/index.html > > chapter VI has roman numeral subsections, but V and VII both have decimal > secti

[GENERAL] Questionnaire on motivation analysis of open source and open content

2012-02-22 Thread George Tsinarakis
Dear Sirs, We are researchers in Technical University of Crete and our current research is in the field of motivation analysis of open source and open content software projects participants. We would like to ask you to fill a questionnaire and forward it to people involved in such teams and p

[GENERAL] Installing Tablefunc

2012-02-22 Thread Miller, Ian P
Good morning, I recently installed PostgreSQL 9.0 on Windows XP with the intent to use the crosstab function in one of my PostgreSQL databases. I have a complete install, the process is running in Task Manager, and I've been able to run basic commands. However, getting crosstab working (and ins

[GENERAL] xml2 -> xpath_table gives wrong result

2012-02-22 Thread Jovino Blanco
Hi everyone, I just wanted to ask if there are any news about the bug of xpath_table (contrib/xml2) ? http://archives.postgresql.org/pgsql-hackers/2010-02/msg00070.php Does exist a solution/workaround in the meantime? Thank you! Saludos -- Sent via pgsql-general mailing list (pgsql-genera

[GENERAL] doc minor glitch?

2012-02-22 Thread John R Pierce
hey, just noticed in the pg TOC on http://www.postgresql.org/docs/current/static/index.html chapter VI has roman numeral subsections, but V and VII both have decimal sections. thats not very consistent... -- john r pierceN 37, W 122 santa cruz ca

Re: [GENERAL] ALTER DEFAULT PRIVILEGES target_role doesn't work with group roles

2012-02-22 Thread Albe Laurenz
Keith Fiske wrote: > Situation: > I have two roles, alice & bob. Both are members of the dev_user group role. > I have a schema called 'reports' that both of these users would like > to be able to manage. > > I thought I could use the ALTER DEFAULT PRIVILEGES option > (http://www.postgresql.org/do

Re: [GENERAL] Why warm-standby doesn't work using file-based log shipping method?

2012-02-22 Thread Magnus Hagander
On Tue, Feb 21, 2012 at 23:59, Scott Mead wrote: > > On Tue, Feb 21, 2012 at 5:09 AM, sunpeng wrote: >> >> I try to setup warm-standby using file-based log shipping method: >> Master: 5432 port >> Standby:6432 port at same machine >> Master's : >> >> wal_level = archive >> archive_mode = on >> ar