[GENERAL] Question on round-robin partitioning

2009-08-28 Thread Steven Lembark
Purely for performance, I was looking into partitioning some tables round-robin by value. Question is whether there is any way to make use of this in constraint exclusion. Say I have a table foo with serial variable "foo_id". The partition checks are foo_id % 8 = 0 foo_id % 8 = 1 fo

Re: [GENERAL] High load on commit after important schema changes

2009-08-28 Thread Tom Lane
hubert depesz lubaczewski writes: > On Fri, Aug 28, 2009 at 12:47:15PM -0400, Tom Lane wrote: >> Ouch. You need to update to 8.4 --- the SI messaging stuff will >> definitely be hurting you with that many backends. Or consider >> using connection pooling or something to cut the number of backend

[GENERAL] C function doesn't return more than one tuple

2009-08-28 Thread Werner Echezuria
Hi, I'm trying to develop a C module, but when the query result is more than one tuple the server crashes. Here is the code: #include "postgres.h" #include "gram.h" #include "utils/builtins.h" #include "funcapi.h" #include "executor/spi.h" #include "access/heapam.h" #include "fmgr.h" extern Datu

Re: [GENERAL] A safe way to upgrade table definitions by using ALTER's

2009-08-28 Thread Sergey Samokhin
Hello! On Fri, Aug 28, 2009 at 5:56 PM, Sam Mason wrote: > Not sure if that's the sort of thing that you want/need but I don't > think there's a general solution to the problem.  Determining the > relevant context for this sort of thing is hard. The solutions you and Steve Atkins offered seem wh

Re: [GENERAL] High load on commit after important schema changes

2009-08-28 Thread hubert depesz lubaczewski
On Fri, Aug 28, 2009 at 12:47:15PM -0400, Tom Lane wrote: > hubert depesz lubaczewski writes: > > On Fri, Aug 28, 2009 at 12:28:06PM -0400, Tom Lane wrote: > >> Hm, do you have forty or so idle backends hanging around while this > >> happens? The only thing I can think of that might be causing th

Re: [GENERAL] Audit Trigger puzzler

2009-08-28 Thread Simon Riggs
On Fri, 2009-08-28 at 08:50 -0700, David Kerr wrote: > so, is there a way in a trigger to know if edited_by is expressly > being set in the update statement? it seems like if I can know that, > then i should be able to figure it out. No, but you could use a before trigger to reset the value to

Re: [GENERAL] details locks

2009-08-28 Thread Edwin Plauchu
I understood 2009/8/28 paulo matadr > Im work with postgres > my questions is,its possible on postgres: > for example > procpidLocker object_locked user_lockedtypeof lock comand > 1 admin fooadmin2 > exclusive update... > > > thnks

Re: [GENERAL] High load on commit after important schema changes

2009-08-28 Thread hubert depesz lubaczewski
On Fri, Aug 28, 2009 at 12:47:15PM -0400, Tom Lane wrote: > hubert depesz lubaczewski writes: > > On Fri, Aug 28, 2009 at 12:28:06PM -0400, Tom Lane wrote: > >> Hm, do you have forty or so idle backends hanging around while this > >> happens? The only thing I can think of that might be causing th

Re: [GENERAL] High load on commit after important schema changes

2009-08-28 Thread Tom Lane
hubert depesz lubaczewski writes: > On Fri, Aug 28, 2009 at 12:28:06PM -0400, Tom Lane wrote: >> Hm, do you have forty or so idle backends hanging around while this >> happens? The only thing I can think of that might be causing this is >> shared cache invalidation messages being broadcast to all

Re: [GENERAL] High load on commit after important schema changes

2009-08-28 Thread hubert depesz lubaczewski
On Fri, Aug 28, 2009 at 12:28:06PM -0400, Tom Lane wrote: > Hm, do you have forty or so idle backends hanging around while this > happens? The only thing I can think of that might be causing this is > shared cache invalidation messages being broadcast to all the other > sessions. I have about 100

Re: [GENERAL] Update /src/tools/msvc to VC++ 2008

2009-08-28 Thread Magnus Hagander
On Fri, Aug 28, 2009 at 18:19, Tom Lane wrote: > Dave Huber writes: >> I have recently installed MS VC++ 2008 Express Edition for a project >> that interfaces with PostgreSQL. I really liked that it had tools for >> creating the solution and projects under VC++. However, the perl >> scripts create

Re: [GENERAL] High load on commit after important schema changes

2009-08-28 Thread Tom Lane
hubert depesz lubaczewski writes: > One of operations that happens on the database is: > begin; > call function(); > commit; > where function is plpgsql function which does: > - drop several (n) views/tables > - rename ~2n views and tables (and related objects like indexes and > constraints) -

Re: [GENERAL] Update /src/tools/msvc to VC++ 2008

2009-08-28 Thread Alvaro Herrera
Tom Lane wrote: > Dave Huber writes: > > 2. Can I submit my scripts and have the msvc tools reviewed/updated? > > I believe the current Windows binaries are still being built with 2005, > so unless you can change it in a backwards-compatible fashion, the odds > of the patch getting rejected ar

Re: [GENERAL] Update /src/tools/msvc to VC++ 2008

2009-08-28 Thread Tom Lane
Dave Huber writes: > I have recently installed MS VC++ 2008 Express Edition for a project > that interfaces with PostgreSQL. I really liked that it had tools for > creating the solution and projects under VC++. However, the perl > scripts create solution and project files for VC++ 2005. This cause

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-08-28 Thread Simon Riggs
On Fri, 2009-08-28 at 17:54 +0200, Sébastien Lardière wrote: > Since this moment, the slave didn't make any checkpoint. > > Now, we know why. Thanks a lot ! > > But how can i fix it ? Current issue: Rebuild standby from base backup. Cause: Locate the bug in the Index AM that causes it. Sympto

[GENERAL] Update /src/tools/msvc to VC++ 2008

2009-08-28 Thread Dave Huber
I have recently installed MS VC++ 2008 Express Edition for a project that interfaces with PostgreSQL. I really liked that it had tools for creating the solution and projects under VC++. However, the perl scripts create solution and project files for VC++ 2005. This causes the build to fail if yo

[GENERAL] High load on commit after important schema changes

2009-08-28 Thread hubert depesz lubaczewski
Hi, I have following situation: - PostgreSQL 8.2.6 - ~ 1000 schemata - ~ 31k tables - ~600GB database - Linux (2.6.22, suse) - 32GB ram - disk system unknown (some raid with 3ware controllers) One of operations that happens on the database is: begin; call function(); commit; where function is pl

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-08-28 Thread Sébastien Lardière
On 28/08/2009 17:13, Simon Riggs wrote: Another check is "is it safe to do a checkpoint". This is logged with DEBUG2, so it should be visible if you set the logging level accordingly. This seems like the most likely cause. I would guess that one of your GiST indexes has a corruption in it

[GENERAL] Audit Trigger puzzler

2009-08-28 Thread David Kerr
all of my tables have 4 fields edited_by edited_date created_by created_date Most of the time, my application will set the edited_by field to reflect an application username (i.e., the application logs into the database as a database user, and that's not going to be the application user) So I lo

[GENERAL] Work Scheduling DB Design

2009-08-28 Thread Karl Nack
Hello, I'm trying to develop a database schema to schedule and record completion of maintenance. I feel like I'm getting a bit wrapped around the wheel on this one, so I was hoping someone might be able to offer some suggestions. Here are the basic tables I've come up with: CREATE TABLE task

Re: [GENERAL] Anybody know where to find Dan Langille?

2009-08-28 Thread Martin Gainty
i think he went to myyearbook.com http://www.linkedin.com/in/danlangille lucky guy! Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger se

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-08-28 Thread Simon Riggs
On Fri, 2009-08-28 at 17:55 +0300, Martin Pihlak wrote: > This is weird, indeed it seems that for some reason the recovery restartpoints > are not created. > > Looking quickly at RecoveryRestartPoint() in xlog.c, there are two cases when > it > doesn't do a checkpoint. For one thing, it checks

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-08-28 Thread Martin Pihlak
Sébastien Lardière wrote: > No, i don't see any change in pg_controldata, but : > > there is messages in logfile : > > 2009-08-28 10:02:51,129 26717 INFO 000103F70088: Found > 2009-08-28 10:02:51,169 26717 INFO {count: 1} > 2009-08-28 10:02:51 CEST [18439]: [1862-1] user=,db= LOG: re

Re: [GENERAL] Data audit trail techniques in postgresql

2009-08-28 Thread Nathaniel Smith
Alvaro Herrera wrote: > Perhaps, but I have heard of people using it successfully recently, > whereas Nathaniel reported that audittrail2 seems to have obvious > bugs. Thanks for the tip. Do to poor searching on my part tablelog fell under my radar. I'll try and out and see how it goes. Nathaniel

Re: [GENERAL] Anybody know where to find Dan Langille?

2009-08-28 Thread Magnus Hagander
On Fri, Aug 28, 2009 at 16:15, Tom Lane wrote: > ... or whoever is responsible for buildfarm member "grebe" now? > The owner address recorded in the buildfarm doesn't work: > > 550 5.1.1 ... User unknown He's d...@langille.org. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.

Re: [GENERAL] GUI to edit a table's content

2009-08-28 Thread Thomas Kellerer
Gauthier, Dave, 28.08.2009 16:08: H.. I didn't see anything in http://wiki.postgresql.org/wiki/Community_Guide_to_PostgreSQL_GUI_Tools that stood out in terms of being able to edit table content in a GUI. Maybe MSACCESS, but my PG DB is served on Linux. The question is: what do you mean wit

[GENERAL] Anybody know where to find Dan Langille?

2009-08-28 Thread Tom Lane
... or whoever is responsible for buildfarm member "grebe" now? The owner address recorded in the buildfarm doesn't work: 550 5.1.1 ... User unknown regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscripti

Re: [GENERAL] GUI to edit a table's content

2009-08-28 Thread Gauthier, Dave
H.. I didn't see anything in http://wiki.postgresql.org/wiki/Community_Guide_to_PostgreSQL_GUI_Tools that stood out in terms of being able to edit table content in a GUI. Maybe MSACCESS, but my PG DB is served on Linux. I have googled around for something like this and was amazed at how

[GENERAL] details locks

2009-08-28 Thread paulo matadr
Im work with postgres my questions is,its possible on postgres: for example procpidLocker object_locked user_lockedtypeof lock comand 1 admin fooadmin2 exclusive update... thnks for all _

Re: [GENERAL] A safe way to upgrade table definitions by using ALTER's

2009-08-28 Thread Sam Mason
On Fri, Aug 28, 2009 at 12:42:59AM +0400, Sergey Samokhin wrote: > But how do programmers guarantee that ALTER's they have wrote will > always be applied by administrators to the corresponding version of > the database? How about using the normal integrity constraints that databases provide? Have

[GENERAL] pg_hba.conf problem in PostgreSQL 8.4 (no-installer)

2009-08-28 Thread Paweł Nieścioruk
Hello, I'm developing JSF web application in Java with Tomcat and PostgreSQL on the server. I use PostgreSQL 8.x NO INSTALLER version (zip file). Everything work fine until I moved from PostgreSQL 8.2 to PostgreSQL 8.4 - now I have problems with starting registered PostgreSQL service on Windo

Re: [GENERAL] Viable alternatives to SQL?

2009-08-28 Thread Oliver Kohll - Mailing Lists
On 27 Aug 2009, at 17:11, pgsql-general-ow...@postgresql.org wrote: From: Kelly Jones Date: 27 August 2009 14:43:51 BST To: pgsql-general@postgresql.org Subject: Viable alternatives to SQL? Many sites let you search databases of information, but the search queries are very limited. I'm creat

Re: [GENERAL] [Skytools-users] WAL Shipping + checkpoint

2009-08-28 Thread Sébastien Lardière
On 27/08/2009 18:11, Martin Pihlak wrote: There are actually no "real" data changes being made on your master for some reason. So every time archive_timeout is reached a log full of no changes is shipped to your slave and applied - and no checkpoint times are changed for reasons I mentioned above