Re: [GENERAL] Regarding NOTIFY

2012-03-09 Thread Kiriakos Georgiou
Yes, can do. Just have an insert trigger on the jobs table that notifies the monitor, something like: CREATE OR REPLACE FUNCTION notify_monitor() RETURNS TRIGGER LANGUAGE plpgsql AS $$ BEGIN NOTIFY monitor; RETURN NULL; END $$ CREATE TRIGGER jobs_trigger AFTER INSERT ON

Re: [GENERAL] Regarding NOTIFY

2012-03-09 Thread Chris Travers
On Fri, Mar 9, 2012 at 8:53 AM, Bret Stern wrote: > We have a concrete batching application composed of two parts. > 1. The Monitor. > The Monitor cycles every 60 seconds, and looks into a Postgresql table > for jobs to run. Primarily these jobs update Postgresql tables with > data from external a

Re: [GENERAL] 9.1 causing "out of shared memory" error and higher serialization conflicts

2012-03-09 Thread Francisco Figueiredo Jr.
Thanks! I'll make the changes to Npgsql source code. Sent from my Android phone On Mar 9, 2012 7:17 PM, "Randy Ficker" wrote: > Filed: > http://pgfoundry.org/tracker/index.php?func=detail&aid=1011174&group_id=1000140&atid=590 > > > ** ** > > *From:* francisco.figueiredo...@gmail.com [mailto

Re: [GENERAL] 9.1 causing "out of shared memory" error and higher serialization conflicts

2012-03-09 Thread Randy Ficker
Filed: http://pgfoundry.org/tracker/index.php?func=detail &aid=1011174&group_id=1000140&atid=590 From: francisco.figueiredo...@gmail.com [mailto:francisco.figueiredo...@gmail.com] On Behalf Of Francis

Re: [GENERAL] Question on datatypes returned for "select oid, typname from pg_type"

2012-03-09 Thread Gavin Flower
On 10/03/12 09:15, Tom Lane wrote: Alexander Reichstadt writes: to find out what datatypes exist. When checking on a certain field, it returned 17 as a type, thus being a bytea. That's actually the question now, because, is it always that bytea gets oid 17 or are these assignments of type name

Re: [GENERAL] Question on datatypes returned for "select oid, typname from pg_type"

2012-03-09 Thread Tom Lane
Gavin Flower writes: > On 10/03/12 09:15, Tom Lane wrote: >> The built-in data types have hand-assigned OIDs, as depicted in >> src/include/catalog/pg_type.h. While those aren't quite >> guaranteed-frozen, we've never changed one that I can recall, and are >> not very likely to in the future. >

Re: [GENERAL] 9.1 causing "out of shared memory" error and higher serialization conflicts

2012-03-09 Thread Francisco Figueiredo Jr.
Would you mind to fill a bug report about that and also provide your fix so we can apply in the main codebase? Thanks in advance! Sent from my Android phone On Mar 9, 2012 5:12 PM, "Randy Ficker" wrote: > After deploying a fixed version of Npgsql, the error frequency went > straight back down to

Re: [GENERAL] Question on datatypes returned for "select oid, typname from pg_type"

2012-03-09 Thread Tom Lane
Alexander Reichstadt writes: > to find out what datatypes exist. When checking on a certain field, it > returned 17 as a type, thus being a bytea. That's actually the > question now, because, is it always that bytea gets oid 17 or are > these assignments of type name and oid dependent on the datab

Re: [GENERAL] 9.1 causing "out of shared memory" error and higher serialization conflicts

2012-03-09 Thread Randy Ficker
After deploying a fixed version of Npgsql, the error frequency went straight back down to the 8.4 level. Awesome! Thanks for the quick replies guys! From: francisco.figueiredo...@gmail.com [mailto:francisco.figueiredo...@gmail.com] On Behalf Of Francisco Figueiredo Jr. Sent: Friday, Marc

[GENERAL] Question on datatypes returned for "select oid, typname from pg_type"

2012-03-09 Thread Alexander Reichstadt
Hi all, for an API I want to make some changes to, I need to know the datatype being used for a record's column. In fact the entire record is to be transferred into a dictionary. From my web research I came to use select oid, typname from pg_type to find out what datatypes exist. When checkin

Re: [GENERAL] 9.1 causing "out of shared memory" error and higher serialization conflicts

2012-03-09 Thread Francisco Figueiredo Jr.
Thanks for the heads up. I'll fix that in Npgsql so it sends the correct isolation level when running on 9.1+ Sent from my Android phone On Mar 9, 2012 3:27 PM, "Randy Ficker" wrote: > Hey Marti, > > I almost replied that yes, I was 100% sure, since I know my code requests > the REPEATABLE READ

Re: [GENERAL] 9.1 causing "out of shared memory" error and higher serialization conflicts

2012-03-09 Thread Randy Ficker
Hey Marti, I almost replied that yes, I was 100% sure, since I know my code requests the REPEATABLE READ level. However, I figured before I replied, I should double-check the SQL statements that were being sent to Postgres. Then I found this gem in Npgsql: if (isolation == Isolati

[GENERAL] Timeout Transactions on Synchronous Replication Standby Failures

2012-03-09 Thread Yunong Xiao
Hi, I have a vanilla HA synchronous replication setup, consisting of 1 primary and 1 synchronous standby. When a standby fails, it looks like transactions still get written to the primary, and there's no messaging back to the client to indicate standby failure. Rather the primary just never end

Re: [GENERAL] 9.1 causing "out of shared memory" error and higher serialization conflicts

2012-03-09 Thread Marti Raudsepp
On Fri, Mar 9, 2012 at 19:16, Randy Ficker wrote: > Most writing transactions are using the REPEATABLE READ isolation > level (the SERIALIZABLE level is not used at all). Are you 100% sure about this? A major thing that changed in 9.1 was implementation for proper SERIALIZABLE isolation, which co

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-09 Thread Selena Deckelmann
Hi! On Thursday, March 8, 2012 at 11:40 AM, Stefan Keller wrote: > Hi > > I do have a student who is interested in participating at the Google > Summer of Code (GSoC) 2012 > Now I have the "burden" to look for a cool project... Any ideas? > > > Also those who are on this thread, we are colle

[GENERAL] 9.1 causing "out of shared memory" error and higher serialization conflicts

2012-03-09 Thread Randy Ficker
Hello, I recently upgraded my production database from 8.4 to 9.1. Ever since the upgrade, I'm seeing a ton of "out of shared memory" errors as well as a drastically increased quantity of serialization conflicts ("could not serialize access due to read/write dependencies among transactions" er

Re: [GENERAL] How to erase transaction logs on PostgreSQL

2012-03-09 Thread John R Pierce
On 03/08/12 4:09 PM, Frank Church wrote: What are the commands to accomplish that, ie getting PostgreSQL to erase the logs? there's two completely different sorts of logs here. 'transaction logs' in postgres are the write-ahead logs, these are binary files used internally by postgres, in th

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-09 Thread Merlin Moncure
On Fri, Mar 9, 2012 at 10:19 AM, Andy Colson wrote: > On 3/9/2012 9:47 AM, Merlin Moncure wrote: >> >> On Thu, Mar 8, 2012 at 2:01 PM, Andy Colson  wrote: >>> >>> I know toast compresses, but I believe its only one row.  page level >>> would >>> compress better because there is more data, and it w

[GENERAL] Regarding NOTIFY

2012-03-09 Thread Bret Stern
We have a concrete batching application composed of two parts. 1. The Monitor. The Monitor cycles every 60 seconds, and looks into a Postgresql table for jobs to run. Primarily these jobs update Postgresql tables with data from external applications. 2. The Client. The client schedules orders etc

Re: [GENERAL] autovacuum and transaction id wraparound

2012-03-09 Thread Scott Marlowe
On Fri, Mar 9, 2012 at 12:15 AM, pawel_kukawski wrote: > Hi Jens, > > Thanks for answer. One more question: > > Can the manual VACUUM operate on database where there are long lasting > transactions? > > In other words, do I need to restart the server or kill long lasting > transactions in order to

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-09 Thread Andy Colson
On 3/9/2012 9:47 AM, Merlin Moncure wrote: On Thu, Mar 8, 2012 at 2:01 PM, Andy Colson wrote: I know toast compresses, but I believe its only one row. page level would compress better because there is more data, and it would also decrease the amount of IO, so it might speed up disk access. e

Re: [GENERAL] How to erase transaction logs on PostgreSQL

2012-03-09 Thread Frank Church
On 8 March 2012 16:23, Guillaume Lelarge wrote: > On Thu, 2012-03-08 at 10:18 +, Frank Church wrote: > > How do you purge the postgresql transaction log? > > > > You don't. PostgreSQL does it for you. > > > I am creating a virtual machine image and I want to erase any transaction > > logs tha

Re: [GENERAL] autovacuum and transaction id wraparound

2012-03-09 Thread pawel_kukawski
Hi Jens, Thanks for answer. One more question: Can the manual VACUUM operate on database where there are long lasting transactions? In other words, do I need to restart the server or kill long lasting transactions in order to allow manual VACUUM to clear old XIDs? Regards, Pawel -- View this m

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-09 Thread Merlin Moncure
On Thu, Mar 8, 2012 at 2:01 PM, Andy Colson wrote: > I know toast compresses, but I believe its only one row.  page level would > compress better because there is more data, and it would also decrease the > amount of IO, so it might speed up disk access. er, but when data is toasted it's spanning

Re: [GENERAL] Call for Google Summer of Code (GSoC) 2012: Project ideas?

2012-03-09 Thread mgould
I would like to see 2 features which I've found useful in other SQL engines. 1. The ability to create global variables. The syntax is usually something like CREATE VARIABLE 'foo' integer; There could be 1-n of these create. 2. The ability for the system to automatically called a stored proc

Re: [GENERAL] How to erase transaction logs on PostgreSQL

2012-03-09 Thread Simon Riggs
On Thu, Mar 8, 2012 at 10:18 AM, Frank Church wrote: > How do you purge the postgresql transaction log? > > I am creating a virtual machine image and I want to erase any transaction > logs that got built up during development. What is the way to do that? pg_resetxlog > I am currently using 8.3 a