Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Patches > Re: libpq threa...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 8 Topic 3697 of 4098
Post > Topic >>

Re: libpq thread-locking

by bruce@[EMAIL PROTECTED] (Bruce Momjian) May 16, 2008 at 11:04 AM

Magnus Hagander wrote:
> Bruce Momjian wrote:
> > Bruce Momjian wrote:
> > > Magnus Hagander wrote:
> > > > Attached patch adds some error checking to the thread locking
> > > > stuff in libpq. Previously, if thread locking failed for some
> > > > reason, we would just fall through and do things without locking.
> > > > This patch makes us abort() instead. It's not the greatest thing
> > > > probably, but our API doesn't let us pass back return values...
> > > 
> > > I have looked over the patch and it seems fine, though I am
> > > concerned about the abort() case with no output.  I realize stderr
> > > might be going nowhere, but in fe-print.c we do an fprintf(stderr)
> > > for memory failures so for consistency I think we should do the
> > > same here.  If there is concern about code bloat, I suggest a macro
> > > at the top of the file for thread failure exits:
> > > 
> > > 	#define THEAD_FAILURE(str) \
> > > 	do { \
> > > 		fprintf(stderr, libpq_gettext("Thread failure:
> > > %s\n")); \ exit(1); \
> > > 	} while(0)
> > 
> > Oh, this is Tom saying he doesn't like stderr and the added code lines
> > for failure:
> > 
> > 	http://archives.postgresql.org/pgsql-patches/2008-04/msg00254.php
> > 
> > I think the macro and consistency suggest doing as I outlined.
> 
> Does this one look like what you're suggesting?

Yep.

-- 
  Bruce Momjian  <bruce@[EMAIL PROTECTED]
>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

-- 
Sent via pgsql-patches mailing list (pgsql-patches@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
 




 8 Posts in Topic:
libpq thread-locking
magnus@[EMAIL PROTECTED]   2008-05-07 21:26:59 
Re: libpq thread-locking
bruce@[EMAIL PROTECTED]   2008-05-08 14:07:22 
Re: libpq thread-locking
bruce@[EMAIL PROTECTED]   2008-05-08 14:09:21 
Re: libpq thread-locking
magnus@[EMAIL PROTECTED]   2008-05-16 16:04:38 
Re: libpq thread-locking
ac@[EMAIL PROTECTED] (An  2008-05-16 10:26:30 
Re: libpq thread-locking
bruce@[EMAIL PROTECTED]   2008-05-16 11:04:21 
Re: libpq thread-locking
magnus@[EMAIL PROTECTED]   2008-05-16 20:31:03 
Re: libpq thread-locking
magnus@[EMAIL PROTECTED]   2008-05-16 16:35:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 20:59:12 CDT 2008.