Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Christoph Haller
> > Paulo Scardine wrote: > > LockAcquire has a "dontWait" parameter, which do just what I want. > > > > The executor level calls "heap_open(relid, RowShareLock)" when doing "FOR > > UPDATE"s. > > Should we define something like RowShareLockNoWait, so heap_open() or other > > lower level functions

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> That doesn't work, unless you insist that the first backend Tom> can't exit its transaction until all the other ones are done. Tom> Which introduces its own possibilities for deadlock --- but Tom> even worse, how does the fir

Re: [HACKERS]

2003-07-23 Thread Shridhar Daithankar
On 23 Jul 2003 at 13:35, Bruce Momjian wrote: > I thought glibc was the one to introduce libc_r in the first place --- > are they making libc thread-safe now? AFAIK, glibc plays all threadsafe in glibc2. Don't know prior to that. Of course they do record if some of the routines are not thread saf

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I suppose we could allow one backend to mark the page with a shared lock > for primary key purposes while others read it. Does that buy us > anything? That doesn't work, unless you insist that the first backend can't exit its transaction until all the o

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> This is actually an issue though. Row-level shared locks would be > >> really nice to have for foreign-key handling. Right now we have to > >> use X locks for those, and that leads to deadlocking problems for > >

Re: [HACKERS] DBD::Pg, schema support

2003-07-23 Thread Arguile
On Wed, 2003-07-23 at 18:24, Richard Schilling wrote: > Can you give an example on how to execute that command? I've been > wondering about that too but haven't had time to read the documentation. SET search_path TO foo,'$user',public; http://developer.postgresql.org/docs/postgres/runtime-confi

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> This is actually an issue though. Row-level shared locks would be >> really nice to have for foreign-key handling. Right now we have to >> use X locks for those, and that leads to deadlocking problems for >> applications. > Is the pl

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Sailesh Krishnamurthy wrote: > >> Does pgsql only record X locks on the individual tuples on-disk or > >> does it do so for S locks as well ? > > > We don't need to shared lock individual rows because of MVCC --- well, > > we sort of

Re: [HACKERS] [PATCHES] PATCH: Memory leaks on start-up

2003-07-23 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --- Lee Kindness wrote: Content-Description:

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Mike Mascari
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > >>Sailesh Krishnamurthy wrote: >> >>>Does pgsql only record X locks on the individual tuples on-disk or >>>does it do so for S locks as well ? > > >>We don't need to shared lock individual rows because of MVCC --- well, >>we sort of

Re: [HACKERS]

2003-07-23 Thread Bruce Momjian
Larry Rosenman wrote: > > > --On Wednesday, July 23, 2003 13:38:25 -0400 Bruce Momjian > <[EMAIL PROTECTED]> wrote: > > > > > Larry, please see configure.in and the template file and report the > > changes needed for unixware and sco. See linux and freebsd for > > examples. > Can I deal with t

Re: [HACKERS] perm bug ?

2003-07-23 Thread Christopher Kings-Lynne
> We did it that way to begin with, but the definition did not survive > its first beta cycle ... too inconvenient. And not pre-7.3 backwards compatible... Chris ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTE

Re: [HACKERS]

2003-07-23 Thread Larry Rosenman
--On Wednesday, July 23, 2003 13:38:25 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry, please see configure.in and the template file and report the changes needed for unixware and sco. See linux and freebsd for examples. Can I deal with this after the beta tarball is up? LER -- Larry R

[HACKERS] contrib compilation probs

2003-07-23 Thread Christopher Kings-Lynne
I just tried compiling all contribs on freebsd/alpha, and I saw these issues: gmake[1]: Entering directory `/home/chriskl/pgsql-temp/contrib/pgstattuple' sed 's,MODULE_PATHNAME,$libdir/pgstattuple,g' pgstattuple.sql.in >pgstattuple.sql gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarati

Re: [HACKERS] perm bug ?

2003-07-23 Thread Tom Lane
ivan <[EMAIL PROTECTED]> writes: > I think when i create function , the default grant should be only for > owner. specialy when function have security definer . We did it that way to begin with, but the definition did not survive its first beta cycle ... too inconvenient.

Re: [HACKERS] locking mechanism

2003-07-23 Thread Tom Lane
"Jenny -" <[EMAIL PROTECTED]> writes: > 1)If the same PROCLOCK has some already-granted locks and > be waiting for more, how do we know? You look at the PROC object to see whether it is waiting, and if so for what. regards, tom lane ---(end of

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Sailesh Krishnamurthy wrote: >> Does pgsql only record X locks on the individual tuples on-disk or >> does it do so for S locks as well ? > We don't need to shared lock individual rows because of MVCC --- well, > we sort of do by recording our xid in ou

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Bruce Momjian
Sailesh Krishnamurthy wrote: > > "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: > > Tom> "Jenny -" <[EMAIL PROTECTED]> writes: > >> Iam trying to acquire rowlevel locks in postgresql. I try doing > >> this: 'select * from students where name='Larry' for update; > >> But by looki

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> "Jenny -" <[EMAIL PROTECTED]> writes: >> Iam trying to acquire rowlevel locks in postgresql. I try doing >> this: 'select * from students where name='Larry' for update; >> But by looking at the holding array of proclock , I'v

Re: [HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Tom Lane
"Jenny -" <[EMAIL PROTECTED]> writes: > Iam trying to acquire rowlevel locks in postgresql. I try doing this: > 'select * from students where name='Larry' for update; > But by looking at the holding array of proclock , I've noticed that by doing > this only > AccessShareLock gets acquired which is

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Bruce Momjian
Paulo Scardine wrote: > LockAcquire has a "dontWait" parameter, which do just what I want. > > The executor level calls "heap_open(relid, RowShareLock)" when doing "FOR > UPDATE"s. > Should we define something like RowShareLockNoWait, so heap_open() or other > lower level functions can call LockAc

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Bruce Momjian
Josh Berkus wrote: > TIm, > > > Anyways. If it doesn't already, having username and database would both be > > helpful things when troubleshooting things. > > Hmmm ... that would be two log TODOs. I wonder why this has never come up > before What we recommend is to use log_pid and log_con

[HACKERS] perm bug ?

2003-07-23 Thread ivan
When ie function is whitout any grant == public have grant to execute it. public or user who have grant to usage on this func. namepsace. I think when i create function , the default grant should be only for owner. specialy when function have security definer . or , i dont know about sth like um

Re: [HACKERS] DBD::Pg, schema support

2003-07-23 Thread Richard Schilling
Can you give an example on how to execute that command? I've been wondering about that too but haven't had time to read the documentation. Richard On 2003.07.23 10:30 [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > is't possible to specify default search path for dbh in

Re: [HACKERS] did you read my mails ?

2003-07-23 Thread ivan
I dont force anyone to use it, but actuali i use it. May be in future sameone will need this, (because someone dont like perl ... :) . I wrote this function to hold conf files in db, and i have other running postgres special (only) for that, but its ture - it must to be TRUSTED (or not) . but i th

[HACKERS] locking mechanism

2003-07-23 Thread Jenny -
hi, 1)If the same PROCLOCK has some already-granted locks and be waiting for more, how do we know? I currently use the holding array of PROCLOCK to figure out what lockmodes a transaction(process) has been granted on LOCK,and if holdings sum comes to 0 that means this PROCLOCK is waiting f

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Josh Berkus
TIm, > Anyways. If it doesn't already, having username and database would both be > helpful things when troubleshooting things. Hmmm ... that would be two log TODOs. I wonder why this has never come up before -- -Josh Berkus Aglio Database Solutions San Francisco

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Josh Berkus
Robert, > Should it be a GUC like log_timestamp that can be applied to all log > messages? Yes, absolutely. -- -Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Larry Rosenman
--On Wednesday, July 23, 2003 16:20:20 -0400 Robert Treat <[EMAIL PROTECTED]> wrote: Should it be a GUC like log_timestamp that can be applied to all log messages? IMHO, Yes, and it probably can be localized to elog(), although I haven't looked at the current elog() function code since 7.0 wh

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Robert Treat
On Wed, 2003-07-23 at 15:38, Larry Rosenman wrote: > > > --On Wednesday, July 23, 2003 12:31:38 -0700 Josh Berkus > <[EMAIL PROTECTED]> wrote: > > > Hackers, > > > > > >> Today, logs are all going to a file or syslog or both. But there is no > >> way at all you can automatically know upon witch

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Paulo Scardine
LockAcquire has a "dontWait" parameter, which do just what I want. The executor level calls "heap_open(relid, RowShareLock)" when doing "FOR UPDATE"s. Should we define something like RowShareLockNoWait, so heap_open() or other lower level functions can call LockAcquire() with dontWait set? By the

Re: [HACKERS]

2003-07-23 Thread scott.marlowe
On Wed, 23 Jul 2003, Jenny - wrote: > Iam trying to acquire rowlevel locks in postgresql. I try doing this: >  'select * from students where name='Larry' for update; > But by looking at the holding array of proclock , I've noticed that by doing this > only > AccessShareLock gets acquired which is

Re: [HACKERS] how do i turn off the html tags??

2003-07-23 Thread Mike Mascari
Jenny - wrote: http://www.expita.com/nomime.html Mike Mascari [EMAIL PROTECTED] ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

[HACKERS] this is in plain text (row level locks)

2003-07-23 Thread Jenny -
Iam trying to acquire rowlevel locks in postgresql. I try doing this: 'select * from students where name='Larry' for update; But by looking at the holding array of proclock , I've noticed that by doing this only AccessShareLock gets acquired which is a table level lock. How do I acquire rowleveloc

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Larry Rosenman
--On Wednesday, July 23, 2003 12:31:38 -0700 Josh Berkus <[EMAIL PROTECTED]> wrote: Hackers, Today, logs are all going to a file or syslog or both. But there is no way at all you can automatically know upon witch database errors are thrown Therefore, would it be possible/hard to prefix all er

Re: [HACKERS] Feature request -- Log Database Name

2003-07-23 Thread Josh Berkus
Hackers, > Today, logs are all going to a file or syslog or both. But there is no way > at all you can automatically know upon witch database errors are thrown > Therefore, would it be possible/hard to prefix all error/warning message > with the database name on witch it occured. Olivier appears

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Bruce Momjian
Tom Lane wrote: > "Paulo Scardine" <[EMAIL PROTECTED]> writes: > > - Where is the best place to put this? > > I think it would be a really *bad* idea to put it in LockAcquire; that > risks breaking things that you don't want broken. > > Whether it's special syntax or a GUC variable, the restricti

[HACKERS] how do i turn off the html tags??

2003-07-23 Thread Jenny -
Protect your PC - Click here for McAfee.com VirusScan Online

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Tom Lane
"Paulo Scardine" <[EMAIL PROTECTED]> writes: > - Where is the best place to put this? I think it would be a really *bad* idea to put it in LockAcquire; that risks breaking things that you don't want broken. Whether it's special syntax or a GUC variable, the restriction should only apply to SELECT

[HACKERS]

2003-07-23 Thread Jenny -
Iam trying to acquire rowlevel locks in postgresql. I try doing this:  'select * from students where name='Larry' for update; But by looking at the holding array of proclock , I've noticed that by doing this only AccessShareLock gets acquired which is a table level lock. How do I acquire rowle

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Paulo Scardine
> My guess is that we will implement it was a SET variable so it can > control FOR UPDATE/LOCK/UPDATE/DELETE. > > Added to TODO: > > Add GUC variable to prevent waiting on locks Interesting. I have a lot of potentially dumb questions: - Is this easier to implement as a user variable than in the p

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Bruce Momjian
Paulo Scardine wrote: > (Excuse my english, my native language is portuguese) > > > I think I'm a quite attentive to the SQL and HACKERS list, and I see > > requests for a NOWAIT option at least once a month, and it's growing. > > Regards, Christoph > > Yes. I have done a little google about "pgs

Re: Fwd: Re: [HACKERS] Possible psql bug

2003-07-23 Thread Kurt Roeckx
On Wed, Jul 23, 2003 at 12:23:38PM -0400, Tom Lane wrote: > > > My suggestion was to make our own getnameinfo_unix() like we have > > a getaddrinfo_unix() for exactly the same reason. > > Right, and a getnameinfo2() that wraps that in the same way getaddrinfo2() > does. Can you make this happen?

Re: [HACKERS]

2003-07-23 Thread Bruce Momjian
Larry, please see configure.in and the template file and report the changes needed for unixware and sco. See linux and freebsd for examples. --- Larry Rosenman wrote: > > > --On Wednesday, July 23, 2003 12:12:45 +0200 Pet

Re: [HACKERS]

2003-07-23 Thread Bruce Momjian
Shridhar Daithankar wrote: > I repeat what I have said earlier. If there are two libraries A using libecpg_r > and B, using libecpg, then program linking against both of them is going to > have tough time living with symbol conflicts. > > I suppose problem will be reproducible even under freeBS

Re: [HACKERS] DBD::Pg, schema support

2003-07-23 Thread greg
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > is't possible to specify default search path for dbh in DBD::Pg ? > I don't want to set variable before every select. There is nothing specific to DBD::Pg, but you should be able to issue the command once ("SET search_path...") and have all subse

Re: [HACKERS]

2003-07-23 Thread Bruce Momjian
Peter Eisentraut wrote: > A final note on the name of the configure option, --with-threads. First, > it does not control an external package but an internal feature, so it > should be --enable-. Secondly, it does not use threads, only enable > thread-safeness. So --enable-thread-safe might be a b

Re: [HACKERS] cvs problem

2003-07-23 Thread Tom Lane
Patrick Welche <[EMAIL PROTECTED]> writes: > On a different note, I also wonder about: > > M src/backend/parser/gram.c > > It seems that you checkout the source with no gram.c. Build it, thus creating > gram.c. Next time you cvs update, you get Attic/gram.c merged in :/ - or is > my use of cvs in

Re: Fwd: Re: [HACKERS] Possible psql bug

2003-07-23 Thread Tom Lane
Kurt Roeckx <[EMAIL PROTECTED]> writes: > On Thu, Jul 10, 2003 at 10:35:04AM +0800, Christopher Kings-Lynne wrote: >> bash-2.03$ psql test >> psql: could not connect to server: No such file or directory >> Is the server running locally and accepting >> connections on Unix domain socket "ùÿÿÿØ`"

Re: [HACKERS] cvs problem

2003-07-23 Thread Patrick Welche
On Wed, Jul 23, 2003 at 11:34:04AM -0300, The Hermit Hacker wrote: > > try it now ... I think its a pathing problem with a cron entry ... just > fixed that, so should be okay now ... ... > > cvs [server aborted]: read lock failed - giving up Yup - that's all fine thanks! > > On a different note

[HACKERS] Feature request

2003-07-23 Thread ohp
Hi hackers, I know you're all very busy with 7.4 coming out next week.But I thought I could ask for a little feature with postgres logs. Today, logs are all going to a file or syslog or both. But there is no way at all you can automatically know upon witch database errors are thrown Therefore, wo

Re: [HACKERS] php with postgres

2003-07-23 Thread Bruce Momjian
Marcus B?rger wrote: > BM> Oh, I remember that now as part of the persistent connection code. As I > BM> remember, we told them to do BEGIN;COMMIT; to clear any open transaction > BM> state passed to the new client. Is that in there? If not, it has to be > BM> added too. ROLLBACK will generate

Re: [HACKERS] pg_conn not declared in libpq-fe.h?

2003-07-23 Thread Tom Lane
Hauke Joachim Zuehl <[EMAIL PROTECTED]> writes: > Well, that's clear but there is another problem: > [EMAIL PROTECTED] [pgsql] >>grep -H "typedef.*PGconn" *.h > libpq-fe.h:typedef struct pg_conn PGconn; > [EMAIL PROTECTED] [pgsql] >>grep -H "pg_conn" *.h > libpq-fe.h:typedef struct pg_conn PGconn;

Re: [HACKERS] cvs problem

2003-07-23 Thread The Hermit Hacker
try it now ... I think its a pathing problem with a cron entry ... just fixed that, so should be okay now ... On Wed, 23 Jul 2003, Patrick Welche wrote: > cvs server: Updating src/bin/scripts/po > cvs server: failed to create lock directory for > `/projects/cvsroot/pgsql-server/src/bin/scripts/

Re: [HACKERS] Criteria for contrib/ versus gborg?

2003-07-23 Thread The Hermit Hacker
On Tue, 22 Jul 2003, Andrew Sullivan wrote: > On Tue, Jul 22, 2003 at 04:05:46PM -0300, The Hermit Hacker wrote: > > > > Did I miss part of a thread here? :) > > I don't think so. Josh was responding to my post, id > 19f22n-0007Gm-00. 'K, somehow I was missing whole threads, so went through arch

Re: [HACKERS]

2003-07-23 Thread Peter Eisentraut
Shridhar Daithankar writes: > On linux and freeBSD, that is not an issue. FreeBSD has a separate libc_r. I don't think they would bother with that if there was no significant difference. > I would really like to know for what platforms, locking mutex while selecting > from connection list or so

Re: [HACKERS]

2003-07-23 Thread Larry Rosenman
--On Wednesday, July 23, 2003 12:12:45 +0200 Peter Eisentraut <[EMAIL PROTECTED]> wrote: Larry Rosenman writes: Please see my post to -hackers last week about -K[p]thread on UnixWare. There are some issues there for us. The take-home message from those posts is that if you use non-thread-safe

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Paulo Scardine
(Excuse my english, my native language is portuguese) > I think I'm a quite attentive to the SQL and HACKERS list, and I see > requests for a NOWAIT option at least once a month, and it's growing. > Regards, Christoph Yes. I have done a little google about "pgsql select for update nowait" and fin

[HACKERS] cvs problem

2003-07-23 Thread Patrick Welche
cvs server: Updating src/bin/scripts/po cvs server: failed to create lock directory for `/projects/cvsroot/pgsql-server/src/bin/scripts/po' (/projects/cvsroot/pgsql-server/src/bin/scripts/po/#cvs.lock): Permission denied cvs server: failed to obtain dir lock in repository `/projects/cvsroot/pgsq

Re: [HACKERS] [PATCHES] Czech NLS

2003-07-23 Thread Karel Zak
On Wed, Jul 23, 2003 at 12:42:36PM +0200, Peter Eisentraut wrote: > Karel Zak writes: > > > Thanks. What time will "freeze" backend messages? I think after beta > > release. > > Typically (meaning in other large projects that care about these things), > a "string freeze" is called much later du

Re: [HACKERS] [PATCHES] Czech NLS

2003-07-23 Thread Peter Eisentraut
Karel Zak writes: > Thanks. What time will "freeze" backend messages? I think after beta > release. Typically (meaning in other large projects that care about these things), a "string freeze" is called much later during the release process, about 2/3 of the way between what we call start of bet

Re: [HACKERS]

2003-07-23 Thread Peter Eisentraut
Larry Rosenman writes: > Please see my post to -hackers last week about -K[p]thread on UnixWare. > There are some issues there for us. The take-home message from those posts is that if you use non-thread-safe code in threaded applications, bad things will happen. We knew that. ;-) As far as mixi

Re: [HACKERS] pg_conn not declared in libpq-fe.h?

2003-07-23 Thread Hauke Joachim Zuehl
Hi :) Am Mit, 2003-07-23 um 06.21 schrieb Tom Lane: > Hauke Joachim Zuehl <[EMAIL PROTECTED]> writes: > > I want to compile a program which uses libpq-fe.h but it seems that > > structure pg_conn ist not declared. > > The typedef is named PGconn. Well, that's clear but there is another problem:

[HACKERS] CVS - /project//cvroot/pgsql-server/ src/bin/scripts/po/#cvs.lock : permission denied

2003-07-23 Thread snpe
hello, This is in current cvs regards ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [HACKERS] Exception table ...

2003-07-23 Thread Christoph Haller
> > I have just seen a nice feature provided by DB2 which seems very useful > to me. > When importing huge amounts of data (dozens of gigs) with the help of > COPY errors might occur from time to time (especially when migrating). > The problem with COPY is that it stops after the first error. So i

Re: [HACKERS] SELECT FOR UPDATE NOWAIT

2003-07-23 Thread Christoph Haller
> > Rod Taylor wrote: > -- Start of PGP signed section. > > On Fri, 2003-07-18 at 19:46, Paulo Scardine wrote: > > > My boss is asking for something like Oracle's "SELECT FOR UPDATE NOWAIT". > > > > > > Is there any such feature? If no, should I look forward into implementing > > > this? Any advice