Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-16 Thread Tom Lane
Martijn van Oosterhout writes: > However, thinking about it, what they're doing can't possibly work. To > override malloc/free, you need to load the library *before* the C > library. Having the postmaster do it after startup is way too late. Yeah, I was wondering about that too. At the very leas

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-16 Thread Martijn van Oosterhout
On Fri, Jun 16, 2006 at 02:51:41PM +0100, Simon Riggs wrote: > On Wed, 2006-06-14 at 20:07 -0400, Tom Lane wrote: > > Josh Berkus writes: > > > I just noticed (the hard way) that in 8.2CVS, the PG_MODULE_MAGIC header > > > is > > > now *required* for all loadable modules. This includes non-pg

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-16 Thread Simon Riggs
On Wed, 2006-06-14 at 20:07 -0400, Tom Lane wrote: > Josh Berkus writes: > > I just noticed (the hard way) that in 8.2CVS, the PG_MODULE_MAGIC header is > > now *required* for all loadable modules. This includes non-pg modules, > > such as Solaris' libumem (performance improvement for malloc).

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-16 Thread Bruce Momjian
Martijn van Oosterhout wrote: -- Start of PGP signed section. > On Fri, Jun 16, 2006 at 12:01:53AM -0400, Bruce Momjian wrote: > > OK, new text: > > > > The magic block required in all PostgreSQL-supported libraries > > is checked to guarantee compatibility. For this reason, non-PostgreSQ

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-16 Thread Martijn van Oosterhout
On Fri, Jun 16, 2006 at 12:01:53AM -0400, Bruce Momjian wrote: > OK, new text: > > The magic block required in all PostgreSQL-supported libraries > is checked to guarantee compatibility. For this reason, non-PostgreSQL > libraries cannot be loaded in this way. Heh. "guarantee"?

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-15 Thread Josh Berkus
Bruce, > The magic block required in all PostgreSQL-supported libraries > is checked to guarantee compatibility. For this reason, non-PostgreSQL > libraries cannot be loaded in this way. Um, that's identical to the old text. Try: The magic block is required in all PostgreSQL-

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-15 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Josh Berkus wrote: > >>> The magic block present in all PostgreSQL-supported libraries > >>> is checked to guarantee compatibility. For this reason, non-PostgreSQL > >>> libraries cannot be loaded in this way. > >> > >> you need "must be" before "prese

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-15 Thread Tom Lane
Bruce Momjian writes: > Josh Berkus wrote: >>> The magic block present in all PostgreSQL-supported libraries >>> is checked to guarantee compatibility. For this reason, non-PostgreSQL >>> libraries cannot be loaded in this way. >> >> you need "must be" before "present". > Uh, the point is not

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-15 Thread Bruce Momjian
Josh Berkus wrote: > Bruce, > > > The magic block present in all PostgreSQL-supported libraries > > is checked to guarantee compatibility. For this reason, non-PostgreSQL > > libraries cannot be loaded in this way. > > you need "must be" before "present". > > Also, this is in runt

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-15 Thread Josh Berkus
Bruce, > The magic block present in all PostgreSQL-supported libraries > is checked to guarantee compatibility. For this reason, non-PostgreSQL > libraries cannot be loaded in this way. you need "must be" before "present". Also, this is in runtime-config.sgml? -- --Josh J

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-15 Thread Bruce Momjian
Josh Berkus wrote: > Andrew, > > > Worth a comment in the config file? > > Possibly. Or the docs. SGML config docs updated: The magic block present in all PostgreSQL-supported libraries is checked to guarantee compatibility. For this reason, non-PostgreSQL libraries c

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-15 Thread Josh Berkus
Andrew, > Worth a comment in the config file? Possibly. Or the docs. -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-14 Thread Andrew Dunstan
Josh Berkus wrote: Never mind, Neil C. just pointed out that we shouldn't be using preload_libraries for libumem anyway -- it's sloppy. However, I do think that we should brace ourselves for a slew of bug reports; if the Sun testing guys are misusing preload_libraries this way, they won'

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-14 Thread Josh Berkus
All, > FATAL:  incompatible library "/usr/lib/libumem.so": missing magic block > HINT:  Extension libraries are now required to use the   > PG_MODULE_MAGIC macro. > > Should we really be requiring PG_MODULE_MAGIC for stuff that wasn't > built with PG? This seems like a way to break a lot of peop

Re: [HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-14 Thread Tom Lane
Josh Berkus writes: > I just noticed (the hard way) that in 8.2CVS, the PG_MODULE_MAGIC header is > now *required* for all loadable modules. This includes non-pg modules, > such as Solaris' libumem (performance improvement for malloc). What is libumem and why are you trying to load it as a dy

[HACKERS] Re-thing PG_MODULE_MAGIC

2006-06-14 Thread Josh Berkus
Hey, I just noticed (the hard way) that in 8.2CVS, the PG_MODULE_MAGIC header is now *required* for all loadable modules. This includes non-pg modules, such as Solaris' libumem (performance improvement for malloc). FATAL:  incompatible library "/usr/lib/libumem.so": missing magic block HINT: