[GENERAL] Re: Duplicated entries are not ignored even if a "do instead nothing" rule is added.

2012-01-30 Thread Jasen Betts
On 2012-01-09, 邓尧 wrote: > insert into ACCOUNT(HOME) > select "v1" as HOME > where not exists (select 1 from ACCOUNT where HOME =3D "v1") > > Surprisingly, I still got the unique constraint violation error, but much > fewer than before ( only 3 during the last 3 days). > Any suggestions?

Re: [GENERAL] Numerous prepared transactions?

2012-01-30 Thread Jasen Betts
On 2012-01-20, Lincoln Yeoh wrote: > Hi, > > Is it viable to have very many prepared transactions? As in tens of > thousands or even more? > > The idea is so that a web application can do _persistent_ > transactional stuff over multiple pages/accesses/sessions and have it > rolled back easily,

Re: [GENERAL] Hot standby off of hot standby?

2012-01-30 Thread Simon Riggs
On Mon, Jan 30, 2012 at 4:36 AM, Igor Schtein wrote: > Is it possible to use a standby instance as a master/primary for another > standby in Postgres 9.0?  In other words, does PG 9.0 supports cascading > standby configuration? No, but 9.2 will support that feature, known as cascading replicatio

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread hubert depesz lubaczewski
On Sat, Jan 28, 2012 at 01:10:39PM -0500, Tom Lane wrote: > hubert depesz lubaczewski writes: > > is it by design that tables listed there (in extconfig column of > > pg_extension) will be dumped with data, even for pg_dump --schema? > > Um, yes. Read the manual. > http://www.postgresql.org/docs

[GENERAL] help with normalizing

2012-01-30 Thread Little, Douglas
Hello, Need some help. Hoping some of the smart people might know how to solve this. I'd like to replace all name/value pairs in a delimited string with the id of the name/value pair in my reference table. Eg St=IL&city=Chicago&street=Madison To 13&50&247 Assuming St=IL is id 13, city=Chicag

Re: [GENERAL] MS Access easier with PostgreSQL or MySQL?

2012-01-30 Thread Gavin Flower
On 30/01/12 11:27, gvim wrote: I want to use MS Access 2007 as a front end to a more robust/FOSS database. Which is more compatible - MySQL or PostgreSQL? Unbiased answers please :-). gvim Well I have done searches on the Net 3 times since I first came across PostgresSQL in 2001, and each t

Re: [GENERAL] 9.0.6 "cluster" transient failure ...

2012-01-30 Thread James Robinson
On Jan 28, 2012, at 3:45 AM, Tom Lane wrote: > James Robinson writes: >> ERROR: duplicate key value violates unique constraint >> "pg_toast_22608264_index" >> DETAIL: Key (chunk_id, chunk_seq)=(22354927, 0) already exists. > >> The error is raised at the 'cluster' right after the c

[GENERAL] Extensions btree_gist and cube collide?

2012-01-30 Thread pasman pasmański
Hi. When i add extensions: cube and btree_gist. First extension installs, but second not. There is a (spelled) error message: ERROR: operator 6(oid,oid) already exists in operator's family gist_oid_ops I try to install it in other schema, but i don't know how to use it. -- pasman

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Adrian Klaver
On Monday, January 30, 2012 5:08:41 am hubert depesz lubaczewski wrote: > On Sat, Jan 28, 2012 at 01:10:39PM -0500, Tom Lane wrote: > > hubert depesz lubaczewski writes: > > > is it by design that tables listed there (in extconfig column of > > > pg_extension) will be dumped with data, even for pg

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread hubert depesz lubaczewski
On Mon, Jan 30, 2012 at 07:34:49AM -0800, Adrian Klaver wrote: > Breaks certain cases when using pg_dump -s. Some of what you highlight above > is > designed behavior. What is happening is covered by my second rule of life > 'Easy > is difficult'. In this case it is the desire for a built in '

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Tom Lane
hubert depesz lubaczewski writes: > On Sat, Jan 28, 2012 at 01:10:39PM -0500, Tom Lane wrote: >> Um, yes. Read the manual. >> http://www.postgresql.org/docs/9.1/static/extend-extensions.html#AEN51966 > Yes, but: > If you create table using extensions, and the you insert data to it > - this data

Re: [GENERAL] Extensions btree_gist and cube collide?

2012-01-30 Thread Tom Lane
=?ISO-8859-2?Q?pasman_pasma=F1ski?= writes: > When i add extensions: cube and btree_gist. > First extension installs, but second not. > There is a (spelled) error message: > ERROR: operator 6(oid,oid) already exists in operator's family gist_oid_ops Hmm, works for me: regression=# create extens

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Adrian Klaver
On Monday, January 30, 2012 7:39:13 am hubert depesz lubaczewski wrote: > On Mon, Jan 30, 2012 at 07:34:49AM -0800, Adrian Klaver wrote: > > Breaks certain cases when using pg_dump -s. Some of what you highlight > > above is designed behavior. What is happening is covered by my second > > rule of

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread hubert depesz lubaczewski
On Mon, Jan 30, 2012 at 11:12:09AM -0500, Tom Lane wrote: > Yes, that's the intended behavior. The purpose of the > configuration-table feature is to dump data that is needed for an > extension to operate properly --- for instance postgis has some > auxiliary tables that are best treated as part o

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread hubert depesz lubaczewski
On Mon, Jan 30, 2012 at 08:20:15AM -0800, Adrian Klaver wrote: > I am not sure I understand crippled. There is a bug that you acknowledge has > been dealt with. The rest is documented behavior having to do with extension > packaging. Extensions exist as packages and are put into the database and

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Tom Lane
hubert depesz lubaczewski writes: > On Mon, Jan 30, 2012 at 11:12:09AM -0500, Tom Lane wrote: >> What tests were those exactly? I'm not aware of any agreed changes in >> this area. > 1. create table with extension > 2. try to dump it's content with pg_dump > 3. try to dump schema of database > 4

[GENERAL] Re: Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts

2012-01-30 Thread Chris Angelico
On Mon, Jan 9, 2012 at 2:58 PM, Chris Angelico wrote: > In this project, we need to have a disk-based priority queue, with a > few snazzy features (eg limited retries and scheduling) but nothing > particularly exotic. Requests are added to the queue by any number of > different processes, and it's

Re: [GENERAL] Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts

2012-01-30 Thread Marko Kreen
On Mon, Jan 9, 2012 at 5:58 AM, Chris Angelico wrote: > http://wiki.postgresql.org/wiki/PGQ_Tutorial > > PGQ looks promising, but I can't afford the risk of losing calls in > the event that there are no workers to process them (the correct > action is for them simply to languish in the database un

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread hubert depesz lubaczewski
On Mon, Jan 30, 2012 at 11:30:51AM -0500, Tom Lane wrote: > That is way too vague for my taste, as you have not shown the pg_dump > options you're using, for example. OK. i tried to explain that the options don't matter, but here we go. full example: I have two diferent databases: 9.1.2 and 9.2de

Re: [HACKERS] [GENERAL] Why extract( ... from timestamp ) is not immutable?

2012-01-30 Thread hubert depesz lubaczewski
On Wed, Jan 25, 2012 at 11:30:49AM -0500, Tom Lane wrote: > hubert depesz lubaczewski writes: > > anyway - the point is that in \df date_part(, timestamp) says it's > > immutable, while it is not. > > Hmm, you're right. I thought we'd fixed that way back when, but > obviously not. Or maybe the

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Adrian Klaver
On 01/30/2012 09:23 AM, hubert depesz lubaczewski wrote: I think I explained it in previous mails, and if not - sorry, but I clearly can't explain good enough - the point is that with the way how extensions now work, they are useless for providing way to create tables that will store data, in c

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread hubert depesz lubaczewski
On Mon, Jan 30, 2012 at 09:43:46AM -0800, Adrian Klaver wrote: > On 01/30/2012 09:23 AM, hubert depesz lubaczewski wrote: > > > > >I think I explained it in previous mails, and if not - sorry, but > >I clearly can't explain good enough - the point is that with the way how > >extensions now work, t

[GENERAL] list blocking queries

2012-01-30 Thread Scot Kreienkamp
Hey everyone, My apologies for the slightly novice post on this, but I'm a bit stumped. I have this query that I found on the net and adapted a little to find the queries that were blocking: "select bl.pid as \"Blocked PID\", a.usename as \"Blocked User\", kl.pid as \"Blocking PID\", ka.usena

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Adrian Klaver
On 01/30/2012 09:45 AM, hubert depesz lubaczewski wrote: On Mon, Jan 30, 2012 at 09:43:46AM -0800, Adrian Klaver wrote: On 01/30/2012 09:23 AM, hubert depesz lubaczewski wrote: I think I explained it in previous mails, and if not - sorry, but I clearly can't explain good enough - the point is

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread hubert depesz lubaczewski
On Mon, Jan 30, 2012 at 09:51:58AM -0800, Adrian Klaver wrote: > On 01/30/2012 09:45 AM, hubert depesz lubaczewski wrote: > >On Mon, Jan 30, 2012 at 09:43:46AM -0800, Adrian Klaver wrote: > >>On 01/30/2012 09:23 AM, hubert depesz lubaczewski wrote: > >> > >>> > >>>I think I explained it in previous

[GENERAL] parameter "vacuum_defer_cleanup_age"

2012-01-30 Thread Tulio
Hi, I have 2 servers, working with Hot-Standby and Streaming Replication... and when we executed some query much large returns a message.. "canceling statement due to statement timeout" I want know, how can I calculate the better value to "vacuum_d

[GENERAL] restart server on Lion

2012-01-30 Thread Scott Frankel
Hi all, What's the best/correct way to cause the PostgreSQL server to startup automatically when rebooting on OSX 10.7 Lion? I'm using a macports install of postgres 8.4 and went through a couple grueling days, sudo'd up to my eyeballs, to restore the postgres user and have a working instal

Re: [GENERAL] restart server on Lion

2012-01-30 Thread A.M.
On Jan 30, 2012, at 2:40 PM, Scott Frankel wrote: > > Hi all, > > What's the best/correct way to cause the PostgreSQL server to startup > automatically when rebooting on OSX 10.7 Lion? > > I'm using a macports install of postgres 8.4 and went through a couple > grueling days, sudo'd up to

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Adrian Klaver
On Monday, January 30, 2012 8:25:54 am hubert depesz lubaczewski wrote: > On Mon, Jan 30, 2012 at 08:20:15AM -0800, Adrian Klaver wrote: > > I am not sure I understand crippled. There is a bug that you acknowledge > > has been dealt with. The rest is documented behavior having to do with > > extens

[GENERAL] Postgresql logging questions

2012-01-30 Thread Heine Ferreira
Hi I am still a big newbie as far as Postgresql is concerned. I got some questions about logging. Most RDBMS's log all sql changes. When the server crashes or a power failure occurs and the server comes back up the rdbms rolls back to the nearest checkpoint and does a roll forward from the log.

Re: [GENERAL] Postgresql logging questions

2012-01-30 Thread John R Pierce
On 01/30/12 12:14 PM, Heine Ferreira wrote: Most RDBMS's log all sql changes. When the server crashes or a power failure occurs and the server comes back up the rdbms rolls back to the nearest checkpoint and does a roll forward from the log. Does Postgres also do this? yes, although it us

Re: [GENERAL] Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts

2012-01-30 Thread Chris Angelico
On Tue, Jan 31, 2012 at 4:12 AM, Marko Kreen wrote: > On Mon, Jan 9, 2012 at 5:58 AM, Chris Angelico wrote: >> http://wiki.postgresql.org/wiki/PGQ_Tutorial >> >> PGQ looks promising, but I can't afford the risk of losing calls in >> the event that there are no workers to process them (the correct

Re: [GENERAL] Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts

2012-01-30 Thread Marko Kreen
On Tue, Jan 31, 2012 at 08:17:57AM +1100, Chris Angelico wrote: > On Tue, Jan 31, 2012 at 4:12 AM, Marko Kreen wrote: > > On Mon, Jan 9, 2012 at 5:58 AM, Chris Angelico wrote: > >> http://wiki.postgresql.org/wiki/PGQ_Tutorial > >> > >> PGQ looks promising, but I can't afford the risk of losing ca

Re: [GENERAL] restart server on Lion

2012-01-30 Thread Scott Frankel
Hi M, On Jan 30, 2012, at 11:46 AM, A.M. wrote: > > On Jan 30, 2012, at 2:40 PM, Scott Frankel wrote: > >> >> Hi all, >> >> What's the best/correct way to cause the PostgreSQL server to startup >> automatically when rebooting on OSX 10.7 Lion? >> >> I'm using a macports install of postg

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Adrian Klaver
On 01/30/2012 09:53 AM, hubert depesz lubaczewski wrote: On Mon, Jan 30, 2012 at 09:51:58AM -0800, Adrian Klaver wrote: On 01/30/2012 09:45 AM, hubert depesz lubaczewski wrote: On Mon, Jan 30, 2012 at 09:43:46AM -0800, Adrian Klaver wrote: On 01/30/2012 09:23 AM, hubert depesz lubaczewski wrot

[GENERAL] Why Hard-Coded Version 9.1 In Names?

2012-01-30 Thread Jerry Richards
I just installed postgreSQL 9.1 and noticed it hard-codes the folder /var/lib/pgsql/9.1 and it hard-codes the service name to be postgresql91. My previous version of 8.4.4 uses the generic folder /var/lib/pgsql/data and the generic service name postgresql. This causes a problem for me because

Re: [GENERAL] Why Hard-Coded Version 9.1 In Names?

2012-01-30 Thread Scott Marlowe
On Mon, Jan 30, 2012 at 3:41 PM, Jerry Richards wrote: > I just installed postgreSQL 9.1 and noticed it hard-codes the folder > /var/lib/pgsql/9.1 and it hard-codes the service name to be postgresql91. > My previous version of 8.4.4 uses the generic folder /var/lib/pgsql/data and > the generic ser

Re: [GENERAL] parameter "vacuum_defer_cleanup_age"

2012-01-30 Thread Fabrízio de Royes Mello
2012/1/30 Tulio > Hi, > > I have 2 servers, working with Hot-Standby and Streaming Replication... > and when we executed some query much large returns a message.. > "canceling *statement due* to *statement* timeout" > I want know, how can I calculate the better value to > "vacuum_defer_cleanup_a

Re: [GENERAL] list blocking queries

2012-01-30 Thread Tom Lane
Scot Kreienkamp writes: > My apologies for the slightly novice post on this, but I'm a bit stumped. I > have this query that I found on the net and adapted a little to find the > queries that were blocking: > "select bl.pid as \"Blocked PID\", a.usename as \"Blocked User\", kl.pid as > \"Bloc

Re: [GENERAL] pg_dump -s dumps data?!

2012-01-30 Thread Tom Lane
[ Note: please follow-up to pgsql-hackers not pgsql-general; I think this discussion needs to move there ] hubert depesz lubaczewski writes: > On Mon, Jan 30, 2012 at 11:30:51AM -0500, Tom Lane wrote: >> That is way too vague for my taste, as you have not shown the pg_dump >> options you're usi