[GENERAL] ALTER EXTENSION UPDATE: How to update the 'module_pathname'?

2012-12-06 Thread Henrik Kuhn
Hi, after installing an extension with functions with C bindings - CREATE OR REPLACE FUNCTION ... AS 'MODULE_PATHNAME' LANGUAGE C ... - I like to change the 'module_pathname' upon its update. After reading the docs and especially the section of 'ALTER EXTENSION' I have the feeling, that this

Re: [GENERAL] CREATE RULE fails with 'ERROR: SELECT rule's target list has too many entries'

2012-12-06 Thread Henrik Kuhn
On 12/05/2012 04:58 PM, Tom Lane wrote: Henrik Kuhn henrik.k...@origenis.de writes: On 12/05/2012 04:07 PM, Tom Lane wrote: Henrik Kuhn henrik.k...@origenis.de writes: can somebody give me some insights why the creation of this rule fails with 'ERROR: SELECT rule's target list has too many

Re: [GENERAL] ALTER EXTENSION UPDATE: How to update the 'module_pathname'?

2012-12-06 Thread Albe Laurenz
Henrik Kuhn wrote: after installing an extension with functions with C bindings - CREATE OR REPLACE FUNCTION ... AS 'MODULE_PATHNAME' LANGUAGE C ... - I like to change the 'module_pathname' upon its update. After reading the docs and especially the section of 'ALTER EXTENSION' I have the

[GENERAL] Installing minimal client libraries on Windows

2012-12-06 Thread Mark Morgan Lloyd
Apologies for this old chestnut, but I think it's a question more often asked than answered. If I want to install a minimal binary libpq.dll on a non-developer machine to support Lazarus/FPC programs, where do I get it? I definitely don't want to tell the users to install a full server, or

Re: [GENERAL] Installing minimal client libraries on Windows

2012-12-06 Thread Albe Laurenz
Mark Morgan Lloyd wrote: Apologies for this old chestnut, but I think it's a question more often asked than answered. If I want to install a minimal binary libpq.dll on a non-developer machine to support Lazarus/FPC programs, where do I get it? I definitely don't want to tell the users to

[GENERAL] Anyone from the US coming to FOSDEM?

2012-12-06 Thread Dave Page
If you're from the US and are planning to come to FOSDEM in February, can you ping me please? Thanks. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list

Re: [GENERAL] wal archiving question

2012-12-06 Thread akp geek
thank you so much for all the inputs.. One final question is , Do we have to stop the database when we create the base backup? Regards On Wed, Dec 5, 2012 at 4:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: akp geek akpg...@gmail.com writes: thank you all. There is a mistake I did then. I

Re: [GENERAL] wal archiving question

2012-12-06 Thread Albe Laurenz
akp geek wrote: thank you so much for all the inputs.. One final question is , Do we have to stop the database when we create the base backup? No, see http://www.postgresql.org/docs/9.0/static/continuous-archiving.html#BACKUP-BASE-BACKUP Yours, Laurenz Albe -- Sent via pgsql-general

[GENERAL] unlooged tables

2012-12-06 Thread Igor Neyman
Hello, Is there any way to change regular table to unlogged without dropping said table and recreating it as unlogged? Didn't find the answer in the docs. Looks like alter table ... does not support unlogged. TIA, Igor Neyman

[GENERAL] character encoding

2012-12-06 Thread Doug Kunzman
I'm trying to support an automatic character encoding to UNICODE so Java strings with none ASCII character can be stored in a table. I've edited my postgressql.conf with the following command, PGCLIENTENCODING=UNICODE And I'm getting this error message, FATAL: unrecognized configuration

Re: [GENERAL] character encoding

2012-12-06 Thread Adrian Klaver
On 12/06/2012 07:20 AM, Doug Kunzman wrote: I'm trying to support an automatic character encoding to UNICODE so Java strings with none ASCII character can be stored in a table. I've edited my postgressql.conf with the following command, PGCLIENTENCODING=UNICODE And I'm getting this error

Re: [GENERAL] Trigger / constraint issue

2012-12-06 Thread Glenn Pierce
OK I have got it down to a simple test #connect_string = 'dbname=bmos user=bmos' connect_string = 'dbname=bmos user=postgres' if __name__ == __main__: conn = psycopg2.connect(connect_string) cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) cur.execute(INSERT INTO

Re: [GENERAL] character encoding

2012-12-06 Thread Condor
On 2012-12-06 17:30, Adrian Klaver wrote: On 12/06/2012 07:20 AM, Doug Kunzman wrote: I'm trying to support an automatic character encoding to UNICODE so Java strings with none ASCII character can be stored in a table. I've edited my postgressql.conf with the following command,

Re: [GENERAL] Great site for comparing databases (or anything else)

2012-12-06 Thread Emi Lu
It seems to be based on the honor system. When you click Rank, it asks you what databases you're familiar with. Then you can stack rank those databases across various questions. It's possible people could lie and say they know about mySQL and Postgres when in reality they don't, but hopefully

Re: [GENERAL] Trigger / constraint issue

2012-12-06 Thread Adrian Klaver
On 12/06/2012 10:31 AM, Glenn Pierce wrote: OK I have got it down to a simple test #connect_string = 'dbname=bmos user=bmos' connect_string = 'dbname=bmos user=postgres' if __name__ == __main__: conn = psycopg2.connect(connect_string) cur =

Re: [GENERAL] libpq - prevent automatic reconnect

2012-12-06 Thread Chris Angelico
On Thu, Dec 6, 2012 at 5:56 AM, Tom Lane t...@sss.pgh.pa.us wrote: I suspect this action isn't dropping the TCP connection. It's only equivalent to a momentary glitch in your network connectivity --- and you'd be very unhappy if that caused TCP connections to go down, because networks have

Re: [GENERAL] unlooged tables

2012-12-06 Thread Sergey Konoplev
Hi, On Thu, Dec 6, 2012 at 7:08 AM, Igor Neyman iney...@perceptron.com wrote: Is there any way to change “regular” table to “unlogged” without dropping said table and recreating it as unlogged? AFAIK it is impossible currently. The best way to do such transformation that comes to my mind is:

[GENERAL] Setting default privs for a user doesn't seem to work.

2012-12-06 Thread Gauthier, Dave
What's wrong with this picture. Trying (failing) to create a user called select with default select privs and nothing else. Demo below. Comments in red... fcadsql7 psql sde psql (9.1.5) Type help for help. sde=# \du List of roles Role name |

Re: [GENERAL] Setting default privs for a user doesn't seem to work.

2012-12-06 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave Sent: Thursday, December 06, 2012 5:27 PM To: pgsql-general Subject: [GENERAL] Setting default privs for a user doesn't seem to work. What's wrong with this picture. Trying

Re: [GENERAL] Statistics mismatch between n_live_tup and actual row count

2012-12-06 Thread Adrian Klaver
On 12/06/2012 06:13 PM, tim_wilson wrote: This drift gets more confusing. My small table A (60K rows) is not being inserted to (except one or two rows) it is getting thousands of updates a minute. Analyze and vacuum on the table are running regularly. But sometimes ,every time the vacuum runs

Re: [GENERAL] Statistics mismatch between n_live_tup and actual row count

2012-12-06 Thread tim_wilson
http://postgresql.1045698.n5.nabble.com/file/n5735593/pg_drift.png 86% of the updates are HOT updates! The difference between the first and second line of this image above is that 366 updates happened of which 299 where HOT. And a vacuum on the table was run. Look at the retuples number

Re: [GENERAL] Statistics mismatch between n_live_tup and actual row count

2012-12-06 Thread Adrian Klaver
On 12/06/2012 06:45 PM, tim_wilson wrote: http://postgresql.1045698.n5.nabble.com/file/n5735593/pg_drift.png 86% of the updates are HOT updates! The difference between the first and second line of this image above is that 366 updates happened of which 299 where HOT. And a vacuum on the

[GENERAL] Ubutu 12.04 and PostgreSQL9.2.1

2012-12-06 Thread a...@hsk.hk
Hi, I have questions about Linux Write cache sizing: 1) /proc/sys/vm/dirty_ratio : current value (default) 20 2) /proc/sys/vm/dirty_background_ratio: current value (default) 10 I am using Ubuntu 12.04 (8GB RAM) and PostgreSQL 9.2.1, what values of these kernel ratios should be set for better

Re: [GENERAL] Statistics mismatch between n_live_tup and actual row count

2012-12-06 Thread Tom Lane
tim_wilson tim.wil...@telogis.com writes: This drift gets more confusing. In recent releases, reltuples (and relpages) are updated via a moving average calculation that is meant to converge on the true value over time. The reason vacuum has to act that way is that it typically doesn't scan the

Re: [GENERAL] Statistics mismatch between n_live_tup and actual row count

2012-12-06 Thread tim_wilson
Thanks for the reply Tom, will try and construct test case. Have been unable to replicate in a simple test the sort of updates that the table out in the wild is seeing, so may impact that issue of vacuum finding unrepresentative sample, maybe. Will try harder! When you say recent releases, does

Re: [GENERAL] Ubutu 12.04 and PostgreSQL9.2.1

2012-12-06 Thread Ondrej Ivanič
Hi, On 7 December 2012 14:17, a...@hsk.hk a...@hsk.hk wrote: I have questions about Linux Write cache sizing: 1) /proc/sys/vm/dirty_ratio : current value (default) 20 2) /proc/sys/vm/dirty_background_ratio: current value (default) 10 I am using Ubuntu 12.04 (8GB RAM) and PostgreSQL 9.2.1,

Re: [GENERAL] Statistics mismatch between n_live_tup and actual row count

2012-12-06 Thread Tom Lane
tim_wilson tim.wil...@telogis.com writes: When you say recent releases, does that include 8.4? 8.4.9 and later --- anything including this commit: Author: Tom Lane t...@sss.pgh.pa.us Branch: master Release: REL9_1_BR [b4b6923e0] 2011-05-30 17:06:52 -0400 Branch: REL9_0_STABLE Release: REL9_0_5

Re: [GENERAL] Ubutu 12.04 and PostgreSQL9.2.1

2012-12-06 Thread a...@hsk.hk
Hi, thank you very much! On 7 Dec 2012, at 11:47 AM, Ondrej Ivanič wrote: Hi, On 7 December 2012 14:17, a...@hsk.hk a...@hsk.hk wrote: I have questions about Linux Write cache sizing: 1) /proc/sys/vm/dirty_ratio : current value (default) 20 2) /proc/sys/vm/dirty_background_ratio: