[GENERAL] Correct way for locking a row for long time without blocking another transactions (=nowait)?

2012-02-28 Thread Durumdara
Hi! In FireBird I can set the transaction to "nowait". When I want to protect a row for long time (showing a dialog, and on closing I release the row), I need to do this: trans.StartTransaction(); sql.execute('update thetable set afield = afield where idfield = anyvalue'); This is locking the ro

[GENERAL] how to create data on the fly?

2012-02-28 Thread bboett
Hello! i am again struggling with a problem i am unsure how to set up. I could easily solve all in the php backend, but this would impede further extensions and doesn't satisfy my curiosity :D so, here's the problem: a patient takes everyday a medecine, and from time to time comes in a result of

Re: [GENERAL] Correct way for locking a row for long time without blocking another transactions (=nowait)?

2012-02-28 Thread Filip Rembiałkowski
On Tue, Feb 28, 2012 at 10:26 AM, Durumdara wrote: > Hi! > > In FireBird I can set the transaction to "nowait". > When I want to protect a row for long time (showing a dialog, and on > closing I release the row), I need to do this: > > trans.StartTransaction(); > sql.execute('update thetable set a

Re: [GENERAL] "canceling autovacuum time"

2012-02-28 Thread Tomas Vondra
On 28 Únor 2012, 1:53, Jameison Martin wrote: > I'm seeing "GMTERROR: canceling autovacuum task" lines in my logs. It's not "GMTERROR", it's "GMT ERROR" where GMT is a timezone. You should put a space at the end of log_line_prefix I guess. > 2012-02-27 23:53:28 GMTLOG:  checkpoint starting: time

[GENERAL] alter user and alter cmd do not have same functions

2012-02-28 Thread Jov
for alter user,there is a description: > ALTER USER is now an alias for ALTER ROLE. > so,people will think they are the same.but there are differences: > ALTER USER *name* SET *configuration_parameter* { TO | = } { *value* | > DEFAULT } ALTER USER *name* SET *configuration_parameter* FROM CURREN

[GENERAL] How to get a signal from the database when a INSERT INTO is done?

2012-02-28 Thread Andre Lopes
Hi all, I'm designing an application in Python and using PostgreSQL. This is a mixed question Python/PostgreSQL... I need to get a signal in my python application when a new insert is done. How can this be done, any clues? Best Regards, André -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] How to get a signal from the database when a INSERT INTO is done?

2012-02-28 Thread hubert depesz lubaczewski
On Tue, Feb 28, 2012 at 11:07:47AM +, Andre Lopes wrote: > Hi all, > > I'm designing an application in Python and using PostgreSQL. > > This is a mixed question Python/PostgreSQL... I need to get a signal > in my python application when a new insert is done. How can this be > done, any clues?

Re: [GENERAL] How to get a signal from the database when a INSERT INTO is done?

2012-02-28 Thread Marti Raudsepp
On Tue, Feb 28, 2012 at 13:07, Andre Lopes wrote: > This is a mixed question Python/PostgreSQL... I need to get a signal > in my python application when a new insert is done. How can this be > done, any clues? As depesz mentioned, you can use the LISTEN and NOTIFY commands for this asynchronous s

Re: [GENERAL] accumulating handles problem on machine running postgresql

2012-02-28 Thread Marti Raudsepp
On Tue, Feb 28, 2012 at 04:34, Adam Bruss wrote: > The problem is the > Handle count on the Windows System process of the server, image name > c:\windows\system32\ntoskrnl.exe, accumulates over time and the handles > never get released. This causes the handle count to go to about 130,000 at > whic

Re: [GENERAL] accumulating handles problem on machine running postgresql

2012-02-28 Thread Adam Bruss
The handles persist through restarting the postgresql service and restarting the IIS server. The handles are accumulating on the System process. I think the handles are created when the web service is accessed but that would mean the IIS worker processes would have responsibility and they don't

Re: [GENERAL] archive_cleanup_command recovery.conf Standby server error

2012-02-28 Thread Adrian Klaver
On Monday, February 27, 2012 10:36:08 pm chinnaobi wrote: > Streaming replication in the standby has successfully started (windows 2008 > server) but, the configuration in the recovery.conf : > > archive_cleanup_command='pg_archivecleanup > 10.1.18.16\\DB_Stream_Share\\ %r' > What is the corre

[GENERAL] Problem with initdb and two versions on one server?

2012-02-28 Thread Chris McCormick
Hello all,     Because of issues with dump/restore, I am instead setting up a second cluster under a newer version so I can slowly migrate data (I have 7.4.30, and am adding 8.3.18 on the same box). The problem is that when I try to start the new postmaster it complains: "FATAL:  database files ar

Re: [GENERAL] synchronous replication: blocking commit on the master

2012-02-28 Thread Jameison Martin
I have specific needs for wanting synchronous replication instead of asynchronous replication, notwithstanding my desire to continue processing work on the master if there are no active slaves. I would like to use  replication for both HA and for query scaling. I'd like replication to be synchro

Re: [GENERAL] Problem with initdb and two versions on one server?

2012-02-28 Thread Tom Lane
Chris McCormick writes: >     Because of issues with dump/restore, I am instead setting up a > second cluster under a newer version so I can slowly migrate data (I > have 7.4.30, and am adding 8.3.18 on the same box). The problem is > that when I try to start the new postmaster it complains: > "F

Re: [GENERAL] synchronous replication: blocking commit on the master

2012-02-28 Thread Adrian Klaver
On Monday, February 27, 2012 10:21:24 pm Jameison Martin wrote: > I have specific needs for wanting synchronous replication instead of > asynchronous replication, notwithstanding my desire to continue processing > work on the master if there are no active slaves. I would like to use > replication

Re: [GENERAL] Problem with initdb and two versions on one server?

2012-02-28 Thread Rainer Pruy
Hello Chris, can not provide much help. But definitely the message sounds like case (1) (8.3 server accessing 7.4 files) I did encounter such with two occasions: a) used an old initdb version b) using an rc script that had hard coded path to the (old) data directory both cases seem not to appl

Re: [GENERAL] How to get a signal from the database when a INSERT INTO is done?

2012-02-28 Thread Daniele Varrazzo
On Tue, Feb 28, 2012 at 2:15 PM, Marti Raudsepp wrote: > On Tue, Feb 28, 2012 at 13:07, Andre Lopes wrote: >> This is a mixed question Python/PostgreSQL... I need to get a signal >> in my python application when a new insert is done. How can this be >> done, any clues? > > As depesz mentioned, yo

Re: [GENERAL] How to get a signal from the database when a INSERT INTO is done?

2012-02-28 Thread Marti Raudsepp
On Tue, Feb 28, 2012 at 17:41, Daniele Varrazzo wrote: > On Tue, Feb 28, 2012 at 2:15 PM, Marti Raudsepp wrote: >> On the Python end, you have to call psycopg2 connection.poll() method >> periodically or in response to select() activation >> There's an example here: >> http://initd.org/psycopg/do

Re: [GENERAL] How to get a signal from the database when a INSERT INTO is done?

2012-02-28 Thread Daniele Varrazzo
On Tue, Feb 28, 2012 at 3:45 PM, Marti Raudsepp wrote: > On Tue, Feb 28, 2012 at 17:41, Daniele Varrazzo > wrote: >> On Tue, Feb 28, 2012 at 2:15 PM, Marti Raudsepp wrote: >>> On the Python end, you have to call psycopg2 connection.poll() method >>> periodically or in response to select() activa

[GENERAL] psql: invalid connection option "client_encoding"

2012-02-28 Thread Clodoaldo Neto
I have both 9.0 and 9.1 installed in Centos 6: postgresql90.x86_64 9.0.7-1PGDG.rhel6 @pgdg90 postgresql90-docs.x86_64 9.0.7-1PGDG.rhel6 @pgdg90 postgresql90-libs.x86_64 9.0.7-1PGDG.rhel6 @pgdg90 postgresql90-odbc.x86_64 09.00.0310-1PGDG.rhel

Re: [GENERAL] How to get a signal from the database when a INSERT INTO is done?

2012-02-28 Thread hari . fuchs
Daniele Varrazzo writes: >> As mentioned above and as demonstrated in the example, select() also >> does the job. Using such a fancy framework is usually an overkill. > Yeah, the problem is usually if you have to do something else apart > from listening from the notification. select() will block

[GENERAL] what Linux to run

2012-02-28 Thread mgould
Our application runs on Windows, however we have been told that we can pick any OS to run our server on. I'm thinking Linux because from everything I've read, it appears to be a better on performance and there are other features like tablespaces which we could take advantage of. On our hosted sol

Re: [GENERAL] what Linux to run

2012-02-28 Thread Adam Cornett
On Tue, Feb 28, 2012 at 11:57 AM, wrote: > Our application runs on Windows, however we have been told that we can > pick any OS to run our server on. I'm thinking Linux because from > everything I've read, it appears to be a better on performance and there > are other features like tablespaces w

Re: [GENERAL] what Linux to run

2012-02-28 Thread Rich Shepard
On Tue, 28 Feb 2012, mgo...@isstrucksoftware.net wrote: If we move to Linux, what is the preferred Linux for running Postgres on. This machine would be dedicated to the database only. Michael, There is no 'preferred' linux distribution; the flame wars on this topic died out a decade or so a

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread Adrian Klaver
On Mon, Feb 27, 2012 at 6:22 PM, James B. Byrne wrote: > > On Mon, February 27, 2012 17:16, Adrian Klaver wrote: > > > > > > From psql do \l and see who actually owns the database. > > >List of databases > Name|Owner | Encod

Re: [GENERAL] pg_class.relnamespace NOT IN pg_namespace.oid

2012-02-28 Thread Ireneusz Pluta
W dniu 2012-02-27 23:57, Tom Lane pisze: Hm. We've seen occasional reports of this sort of behavior (that is, DROP of a schema failing to cascade to all the contained objects) but never been able to reproduce it. If you do see it happen again, and can work out a scenario that causes it (even on

Re: [GENERAL] what Linux to run

2012-02-28 Thread Steve Atkins
On Feb 28, 2012, at 9:16 AM, Adam Cornett wrote: > On Tue, Feb 28, 2012 at 11:57 AM, wrote: > Our application runs on Windows, however we have been told that we can > pick any OS to run our server on. I'm thinking Linux because from > everything I've read, it appears to be a better on performan

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread James B. Byrne
On Tue, February 28, 2012 12:17, Adrian Klaver wrote: > Alright here is what I found: > > template1=# \dL > List of languages > Name | Owner | Trusted > -+--+- > plpgsql | postgres | t > > template1=# CREATE DATABASE pl_test with owner=aklaver; > CREATE DATABA

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread Adrian Klaver
On 02/28/2012 09:50 AM, James B. Byrne wrote: Sigh. I will have to think on this before changing anything. To my mind, the most straight-forward way of dealing with this is to remove the language from template1 altogether. Thereafter, the db owner must explicitly add it back in where required

Re: [GENERAL] pg_class.relnamespace NOT IN pg_namespace.oid

2012-02-28 Thread Tom Lane
Ireneusz Pluta writes: > Could you help me find what is the particular order of cascaded table drops? > Is it the exact same > order as indicated in the list following the NOTICE: drop cascades to > xx other objects? I think the actual deletions happen in the opposite order, but the notices do

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread James B. Byrne
On Tue, February 28, 2012 12:17, Adrian Klaver wrote: > > I guess the options are either do as I did above or > create a new template database as the owner you want > and use that as the template for your CREATE > DATABASE. Why does this not work? => \c test You are now connected to database "

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread Adrian Klaver
On 02/28/2012 10:23 AM, James B. Byrne wrote: On Tue, February 28, 2012 12:17, Adrian Klaver wrote: I guess the options are either do as I did above or create a new template database as the owner you want and use that as the template for your CREATE DATABASE. Why does this not work? => \

[GENERAL] version controlling postgresql code

2012-02-28 Thread akp geek
Hi all - Would like to know if any one of you have used CVS or some other version controlling tools to version the postgres code? Any recommendations? Appreciate your help Regards

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread James B. Byrne
On Tue, February 28, 2012 12:52, Adrian Klaver wrote: > On 02/28/2012 09:50 AM, James B. Byrne wrote: >> >> >> Sigh. I will have to think on this before changing >> anything. >> >> To my mind, the most straight-forward way of dealing >> with >> this is to remove the language from template1 >> alt

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread James B. Byrne
On Tue, February 28, 2012 13:28, Adrian Klaver wrote: >> >> Why does this not work? >> >> => \c test >> You are now connected to database "test" as user "devl". >> ALTER EXTENSION plpgsql OWNER TO devl; >> ERROR: syntax error at or near "OWNER" >> LINE 1: ALTER EXTENSION plpgsql OWNER TO devl;

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread Adrian Klaver
On 02/28/2012 10:37 AM, James B. Byrne wrote: On Tue, February 28, 2012 12:52, Adrian Klaver wrote: On 02/28/2012 09:50 AM, James B. Byrne wrote: Sigh. I will have to think on this before changing anything. To my mind, the most straight-forward way of dealing with this is to remove the lan

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread Adrian Klaver
On 02/28/2012 10:52 AM, James B. Byrne wrote: On Tue, February 28, 2012 13:28, Adrian Klaver wrote: Why does this not work? => \c test You are now connected to database "test" as user "devl". ALTER EXTENSION plpgsql OWNER TO devl; ERROR: syntax error at or near "OWNER" LINE 1: ALTER EXTEN

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread Adrian Klaver
On 02/28/2012 10:52 AM, James B. Byrne wrote: This behaviour effectively means that only the superuser can restore databases in 9.1 or build them from scripts; unless the default template is altered. Is this desired? What then does GRANT CREATE DATABASE mean in 9.1 then? It is certainly at od

Re: [GENERAL] version controlling postgresql code

2012-02-28 Thread Andy Colson
On 2/28/2012 12:28 PM, akp geek wrote: Hi all - Would like to know if any one of you have used CVS or some other version controlling tools to version the postgres code? Any recommendations? Appreciate your help Regards Always! I use subversion. -Andy -- Sent via pgsql-general mai

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread James B. Byrne
On Tue, February 28, 2012 14:03, Adrian Klaver wrote: >> > > The PgAdmin folks would be better able to help you with > the exact reason > for the above, but I suspect they really meant: > > http://www.postgresql.org/docs/9.1/interactive/sql-alterlanguage.html > > ALTER [ PROCEDURAL ] LANGUAGE nam

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread James B. Byrne
On Tue, February 28, 2012 14:17, Adrian Klaver wrote: > No, you just did not run into the issue, probably > because your template1 was just a straight clone of > template0 with no added features > You are correct. It was the inability to change the comment on the extension as required by the pg

Re: [GENERAL] Having a problem with RoR-3.1.1 and Pg-9.1

2012-02-28 Thread Adrian Klaver
On Tuesday, February 28, 2012 11:44:09 am James B. Byrne wrote: > > I encountered a strange inconsistency with PGAdmin3-1.14.2 > relating to this. After executing "ALTER LANGUAGE plpgsql > owner to devl;" in the SQL query pane inside PGAdmin3 the > extension ownership change is never reflected i

[GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Lummis, Patrick J
Hi, I'm trying to update a record within a for loop and at the point of updating I get the following syntax error: ERROR: syntax error at or near "$1" LINE 1: update $1 set wfstatus='failed' ^ QUERY: update $1 set wfstatus='failed' CONTEXT: SQL statement in PL/PgSQL functi

Re: [GENERAL] strategies for dealing with frequently updated tables

2012-02-28 Thread Dave Vitek
On 2/27/2012 10:29 PM, Andy Colson wrote: On 02/27/2012 06:55 PM, Dave Vitek wrote: Hi all, I have a relation where a tuple typically undergoes a lifecycle something like: 1) Created 2) Updated maybe thousands of times (no updates to indexed columns though) 3) Rarely or never modified again

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Bartosz Dmytrak
Hi, instead of *update workorderRecord set wfstatus='failed'; * try: workorderRecord.wfstatus := 'failed'; I haven't tested, but workorderRecord is ROWTYPE, so shouldn't be updated like a table. I'm sticked to 9.1, hope the same is for 8.1 http://www.postgresql.org/docs/9.1/static/plpgsql-declara

Re: [GENERAL] synchronous replication: blocking commit on the master

2012-02-28 Thread Adrian Klaver
On Tuesday, February 28, 2012 10:22:14 am Jameison Martin wrote: > > i hope that clears it up. Yes, but before you roll your own you may want to take a look at whats already out there: A survey of what is out there: http://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Poolin

Re: [GENERAL] how to create data on the fly?

2012-02-28 Thread Bartosz Dmytrak
Hi, what is the mathematical definition of this sequence? This could be done using plpgsql, but I have to know how to calculate values in the future. Regards, Bartek 2012/2/28 > Hello! > > i am again struggling with a problem i am unsure how to set up. I could > easily solve all in the php bac

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Lummis, Patrick J
Hi Bartek, Thanks for the quick response. Syntax error cleared up and loads fine but executing the stored procedure fails to update the row. Regards, Patrick From: bdmyt...@gmail.com [mailto:bdmyt...@gmail.com] On Behalf Of Bartosz Dmytrak Sent: Tuesday, F

Re: [GENERAL] what Linux to run

2012-02-28 Thread hamann . w
>> >> If we move to Linux, what is the preferred Linux for running Postgres >> on. This machine would be dedicated to the database only.=20 >> >> I'd like a recommendation for both a GUI hosted version and a non-GUI >> version. I haven't used Linux in the past but did spend several year s >> in

Re: [GENERAL] version controlling postgresql code

2012-02-28 Thread Greg Williamson
akp geek  asked: > >         Would like to know if any one of you have used CVS or some other >version controlling tools to version the postgres code? Any recommendations? >Appreciate your help > > I used CVS at previous jobs. Currently the place I work uses git and a set of rules for program

[GENERAL] Error installing plpythonu in 9.1

2012-02-28 Thread Clodoaldo Neto
template1=# create extension plpythonu; ERROR: could not open extension control file "/usr/pgsql-9.1/share/extension/plpythonu.control": No such file or directory The package is installed: postgresql91-plpython.x86_64 9.1.3-1PGDG.rhel6@pgdg91 # ll /usr/pgsql-9.1/share/extension/ total 12 -

Re: [GENERAL] how to create data on the fly?

2012-02-28 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Bartosz Dmytrak Sent: Tuesday, February 28, 2012 3:33 PM To: bbo...@free.fr Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] how to create data on the fly? Hi, what is the mathematical

Re: [GENERAL] what Linux to run

2012-02-28 Thread Rich Shepard
On Tue, 28 Feb 2012, haman...@t-online.de wrote: one thing you might want to consider is system lifetime: some distro may be set up so that you more or less have to reinstall within 2 years, if you plan to use update service - others may be longer. Now, fast development is great AND allows you t

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Bartosz Dmytrak
Hi, I suppose the the workorderRecord IS updated, but You expect "workorder" table row to be updated :) if so, function snipped should be like this: ... ELSE UPDATE workorder SET wfstatus = 'failed' WHERE workorder.primary_key = workorderRecord.primary_key; ... this will

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Adrian Klaver
On Tuesday, February 28, 2012 12:35:58 pm Lummis, Patrick J wrote: > Hi Bartek, > > Thanks for the quick response. > > Syntax error cleared up and loads fine but executing the stored > procedure fails to update the row. >From the usage I guessing this function is not being used in a trigger. As

Re: [GENERAL] Error installing plpythonu in 9.1

2012-02-28 Thread Devrim GÜNDÜZ
Hi, On Tue, 2012-02-28 at 17:39 -0300, Clodoaldo Neto wrote: > template1=# create extension plpythonu; > ERROR: could not open extension control file > "/usr/pgsql-9.1/share/extension/plpythonu.control": No such file or > directory This is a packaging bug :-( That file is installed with -contr

Re: [GENERAL] psql: invalid connection option "client_encoding"

2012-02-28 Thread Devrim GÜNDÜZ
Hi, Created #77: http://wiki.pgrpms.org/ticket/77 Regards, On Tue, 2012-02-28 at 13:21 -0300, Clodoaldo Neto wrote: > 9.0.7-1PGDG.rhel6 > @pgdg90 > postgresql90-docs.x86_64 9.0.7-1PGDG.rhel6 > @pgdg90 > postgresql90-libs.x86_64 9.0.7-1PGDG.rhel6 > @p

Re: [GENERAL] Error installing postgresq91-python package

2012-02-28 Thread Devrim GÜNDÜZ
Hi, On Tue, 2012-02-28 at 10:33 -0300, Clodoaldo Neto wrote: > Transaction Check Error: > file /usr/lib64/python2.6/site-packages/_pg.so from install of > postgresql91-python-0:4.0-2PGDG.rhel6.x86_64 conflicts with file from > package PyGreSQL-3.8.1-2.el6.x86_64 What is unusual here? I'd

Re: [GENERAL] accumulating handles problem on machine running postgresql

2012-02-28 Thread dennis jenkins
On Tue, Feb 28, 2012 at 8:48 AM, Adam Bruss wrote: > The handles persist through restarting the postgresql service and restarting > the IIS server. The handles are accumulating on the System process. I think > the handles are created when the web service is accessed but that would mean > the II

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Lummis, Patrick J
Indeed there is an id field. That's the ticket! And thanks much. -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Tuesday, February 28, 2012 12:48 PM To: pgsql-general@postgresql.org Cc: Lummis, Patrick J; Bartosz Dmytrak Subject: Re: [GENERAL] Stored Proced

Re: [GENERAL] strategies for dealing with frequently updated tables

2012-02-28 Thread Andy Colson
On 2/28/2012 2:09 PM, Dave Vitek wrote: The following query takes about 100 minutes (3 seconds per tuple): SELECT count(id) from T so table T has 18,000 rows? (100 * 60 * 3) 100 minutes * 60 (sec/min) / 3 (sec/tuple) = 2000 tuples Well... math was never my strong point :-) So you have a la

Re: [GENERAL] synchronous replication: blocking commit on the master

2012-02-28 Thread Jameison Martin
i don't think i've explained things very clearly. the implied contradiction is that i'd be using asynchronous replication to catch up a slave after a slave failure and thus i'm losing the transactional consistency that i suggest i need.  if a slave fails and is brought back on line i am indeed p

Re: [GENERAL] strategies for dealing with frequently updated tables

2012-02-28 Thread Dave Vitek
On 2/28/2012 5:21 PM, Andy Colson wrote: On 2/28/2012 2:09 PM, Dave Vitek wrote: The following query takes about 100 minutes (3 seconds per tuple): SELECT count(id) from T so table T has 18,000 rows? (100 * 60 * 3) 100 minutes * 60 (sec/min) / 3 (sec/tuple) = 2000 tuples Well... math was ne

Re: [GENERAL] Four issues why "old elephants" lack performance: Explanation sought Four issues why "old elephants" lack performance: Explanation sought

2012-02-28 Thread Scott Marlowe
On Mon, Feb 27, 2012 at 1:31 PM, Stefan Keller wrote: > Hi Scott > > 2012/2/26 Scott Marlowe : >> On Sun, Feb 26, 2012 at 1:11 PM, Stefan Keller wrote: >> >>> So to me the bottom line is, that PG already has reduced overhead at >>> least for issue #2 and perhaps for #4. >>> Remain issues of in-me

[GENERAL] Partial matches on full text searches.

2012-02-28 Thread Tim Uckun
I am trying to understand this bit of documentation about GIST and GIN searches Also, * can be attached to a lexeme to specify prefix matching: SELECT to_tsquery('supern:*A & star:A*B'); to_tsquery -- 'supern':*A & 'star':*AB I tried various experiments but can'

Re: [GENERAL] synchronous replication: blocking commit on the master

2012-02-28 Thread Fujii Masao
On Wed, Feb 29, 2012 at 3:22 AM, Jameison Martin wrote: > i don't think i've explained things very clearly. the implied contradiction > is that i'd be using asynchronous replication to catch up a slave after a > slave failure and thus i'm losing the transactional consistency that i > suggest i nee

Re: [GENERAL] what Linux to run

2012-02-28 Thread hamann . w
>> >> On Tue, 28 Feb 2012, haman...@t-online.de wrote: >> >> > one thing you might want to consider is system lifetime: some distro may >> > be set up so that you more or less have to reinstall within 2 years, if >> > you plan to use update service - others may be longer. Now, fast >> > developme

Re: [GENERAL] what Linux to run

2012-02-28 Thread Scott Marlowe
On Tue, Feb 28, 2012 at 10:17 AM, Rich Shepard wrote: >  The Ubuntus boot directly into the GUI and that tends to be more > comfortable for newly defenestrated users. If you like that, but want the > more open and readily-available equivalent, install Debian. The ubuntus are > derivatives of debi

[GENERAL] Yearly date comparison?

2012-02-28 Thread Nick
What is the best way to find an event with a yearly occurrence? CREATE TABLE events ( start_date DATE, end_date DATE, recurring TEXT ); INSERT INTO events (start_date, end_date, recurring) VALUES ('2010-02-28','2010-03-01','yearly'); SELECT * FROM events WHERE (start_date+'2 YEARS'::I

Re: [GENERAL] Correct way for locking a row for long time without blocking another transactions (=nowait)?

2012-02-28 Thread Durumdara
Dear Filip! 2012/2/28 Filip Rembiałkowski : > On Tue, Feb 28, 2012 at 10:26 AM, Durumdara wrote: > Just some loose comments. > > http://www.postgresql.org/docs/current/static/explicit-locking.html#LOCKING-ROWS > > A way to explicitly lock given row without updating it: > SELECT whatever FROM thet