1. 17 8月, 2005 3 次提交
  2. 16 8月, 2005 7 次提交
  3. 15 8月, 2005 7 次提交
  4. 14 8月, 2005 2 次提交
    • T
      Tweak catalog cache management algorithms to reduce cost of · f60d176a
      Tom Lane 提交于
      SearchCatCacheList and ReleaseCatCacheList.  Previously, we incremented
      and decremented the refcounts of list member tuples along with the list
      itself, but that's unnecessary, and very expensive when the list is big.
      It's cheaper to change only the list refcount.  When we are considering
      deleting a cache entry, we have to check not only its own refcount but
      its parent list's ... but it's easy to arrange the code so that this
      check is not made in any commonly-used paths, so the cost is really nil.
      The bigger gain though is to refrain from DLMoveToFront'ing each individual
      member tuple each time the list is referenced.  To keep some semblance
      of fair space management, lists are just marked as used or not since the
      last cache cleanout search, and we do a MoveToFront pass only when about
      to run a cleanout.  In combination, these changes reduce the costs of
      SearchCatCacheList and ReleaseCatCacheList from about 4.5% of pgbench
      runtime to under 1%, according to my gprof results.
      f60d176a
    • T
      Make pg_stat_file() use OUT parameters so that the user doesn't have to · 2af9a44f
      Tom Lane 提交于
      remember the output parameter set for himself.  It's a bit of a kluge
      but fixing array_in to work in bootstrap mode looks worse.
      I removed the separate pg_file_length() function, as it no longer has any
      real notational advantage --- you can write (pg_stat_file(...)).length.
      2af9a44f
  5. 13 8月, 2005 21 次提交
    • B
      Remove API file. · f547909d
      Bruce Momjian 提交于
      Marko Kreen
      f547909d
    • B
      CREATE TABLE has optional column names, so change {} to []. · 03be45fb
      Bruce Momjian 提交于
      Alvaro.
      03be45fb
    • B
      The large one adds support for RSA keys and reorganizes · 87688ddf
      Bruce Momjian 提交于
      the pubkey functions a bit.  The actual RSA-specific code
      there is tiny, most of the patch consists of reorg of the
      pubkey code, as lots of it was written as elgamal-only.
      
      ---------------------------------------------------------------------------
      
      The SHLIB section was copy-pasted from somewhere and contains
      several unnecessary libs.  This cleans it up a bit.
      
       -lcrypt
         we don't use system crypt()
      
       -lssl, -lssleay32
         no SSL here
      
       -lz in win32 section
         already added on previous line
      
       -ldes
         The chance anybody has it is pretty low.
         And the chance pgcrypto works with it is even lower.
      
      Also trim the win32 section.
      
      ---------------------------------------------------------------------------
      
      It is already disabled in Makefile, remove code too.
      
      ---------------------------------------------------------------------------
      
      I was bit hasty making the random exponent 'k' a prime.  Further researh
      shows that Elgamal encryption has no specific needs in respect to k,
      any random number is fine.
      
      It is bit different for signing, there it needs to be 'relatively prime'
      to p - 1,  that means GCD(k, p-1) == 1, which is also a lot lighter than
      full primality.  As we don't do signing, this can be ignored.
      
      This brings major speedup to Elgamal encryption.
      
      ---------------------------------------------------------------------------
      
      o  pgp_mpi_free: Accept NULLs
      o  pgp_mpi_cksum: result should be 16bit
      o  Remove function name from error messages - to be similar to other
         SQL functions, and it does not match anyway the called function
      o  remove couple junk lines
      
      ---------------------------------------------------------------------------
      
      o  Support for RSA encryption
      o  Big reorg to better separate generic and algorithm-specific code.
      o  Regression tests for RSA.
      
      ---------------------------------------------------------------------------
      
      o  Tom stuck a CVS id into file.  I doubt the usefulness of it,
         but if it needs to be in the file then rather at the end.
         Also tag it as comment for asciidoc.
      o  Mention bytea vs. text difference
      o  Couple clarifications
      
      ---------------------------------------------------------------------------
      
      There is a choice whether to update it with pgp functions or
      remove it.  I decided to remove it, updating is pointless.
      
      I've tried to keep the core of pgcrypto relatively independent
      from main PostgreSQL, to make it easy to use externally if needed,
      and that is good.  Eg. that made development of PGP functions much
      nicer.
      
      But I have no plans to release it as generic library, so keeping such
      doc
      up-to-date is waste of time.  If anyone is interested in using it in
      other products, he can probably bother to read the source too.
      
      Commented source is another thing - I'll try to make another pass
      over code to see if there is anything non-obvious that would need
      more comments.
      
      ---------------------------------------------------------------------------
      
      Marko Kreen
      87688ddf
    • B
      Add documentation: · abecf1af
      Bruce Momjian 提交于
      >>>I think a more accurate description would be "permissions not
      >>>inherited by children," and that isn't necessarily a bug.
      >>
      >>I agree it may not be a bug - but it's more than the permissions not
      >>being inherited: the parent is affected.
      >
      >
      > Not really, once you understand what's happening.  Unless you use
      > FROM ONLY, selecting from the parent selects from the parent *and*
      > its children.  The parent itself isn't affected, as queries with
      > FROM ONLY should demonstrate.  I understand what you're saying --
      > that there's an apparent effect on the parent -- but there really
      > isn't.
      
      Sean Burlington
      abecf1af
    • B
      Disable strtoul() ERANGE check on Win32, because it isn't thread safe, · f810cfb2
      Bruce Momjian 提交于
      and it isn't really required.
      f810cfb2
    • B
      Reverse out Assert addition. · 27639809
      Bruce Momjian 提交于
      27639809
    • T
      Pass the type OID as the typioparam for all non-array types, rather than · 59c016aa
      Tom Lane 提交于
      only composite types as we did in 8.0.  Per discussion with Martijn
      van Oosterhout.
      59c016aa
    • B
      Back out plpython makefile change. · bb2ffe9a
      Bruce Momjian 提交于
      bb2ffe9a
    • B
      Improve documention on loading large data sets into plperl. · fab177e6
      Bruce Momjian 提交于
      David Fetter
      fab177e6
    • B
      This patch fixes the event type used to log output from the · ed63689b
      Bruce Momjian 提交于
      stderr-in-service or output-from-syslogger-in-service code. Previously
      everything was flagged as ERRORs there, which caused all instances to
      log "LOG: logger shutting down" as error...
      
      Please apply for 8.1. I'd also like it considered for 8.0 since logging
      non-errors as errors can be cause for alarm amongst people who actually
      look at their logs...
      
      Magnus Hagander
      ed63689b
    • T
      Un-break plperl for non-set case. · 65790b9e
      Tom Lane 提交于
      65790b9e
    • B
      [ backpatched to 8.0.X.] · 7d781c62
      Bruce Momjian 提交于
      > >> 3) I restarted the postmaster both times. I got this error
      > both times.
      > >> :25: ERROR:  could not load library "C:/Program
      > >> Files/PostgreSQL/8.0/lib/testtrigfuncs.dll": dynamic load error
      >
      > > Yes. We really need to look at fixing that error message. I had
      > > forgotten it completely :-(
      >
      > > Bruce, you think we can sneak that in after feature freeze? I would
      > > call it a bugfix :-)
      >
      > Me too.  That's been on the radar for awhile --- please do
      > send in a patch.
      
      Here we go, that wasn't too hard :-)
      
      Apart from adding the error handling, it does one more thing: it changes
      the errormode when loading the DLLs. Previously if a DLL was broken, or
      referenced other DLLs that couldn't be found, a popup dialog box would
      appear on the screen. Which had to be clicked before the backend could
      continue. This patch also disables the popup error message for DLL
      loads.
      
      I think this is something we should consider doing for the entire
      backend - disable those popups, and say we deal with it ourselves. What
      do you other win32 hackers thinnk about this?
      
      In the meantime, this patch fixes the error msgs. Please apply for 8.1
      and please consider a backpatch to 8.0.
      
      
      Magnus Hagander
      7d781c62
    • B
      > Gavin Sherry <swm@linuxworld.com.au> writes: · 479a8fd6
      Bruce Momjian 提交于
      > > I ran across this yesterday on HEAD:
      >
      > > template1=# grant select on foo, foo to swm;
      > > ERROR:  tuple already updated by self
      >
      > Seems to fail similarly in every version back to 7.2; probably further,
      > but that's all I have running at the moment.
      >
      > > We could do away with the error by producing a unique list of object names
      > > -- but that would impose an extra cost on the common case.
      >
      > CommandCounterIncrement in the GRANT loop would be easier, likely.
      > I'm having a hard time getting excited about it though...
      
      Yeah, its not that exciting but that error message would throw your
      average user.
      
      I've attached a patch which calls CommandCounterIncrement() in each of the
      grant loops.
      
      Gavin Sherry
      479a8fd6
    • B
      More rsi assignment line too. · abc8a0a0
      Bruce Momjian 提交于
      abc8a0a0
    • T
      Fix up canonicalize_path to do the right thing in all cases (I think ... · 0d1ebe01
      Tom Lane 提交于
      this was harder than it seemed at first glance).  Also push code for
      checking for ".." in file names into path.c where it belongs.
      0d1ebe01
    • B
      Fix this: · 9cc5caea
      Bruce Momjian 提交于
      	$ ./configure --without-docdir
      	..
      	$ cd contrib/pgstattuple/
      	$ make install
      	mkdir -p -- /contrib
      	mkdir: cannot create directory `/contrib': Permission denied
      	make: *** [installdirs] Error 1
      
      ISHIDA Akio
      9cc5caea
    • B
      Cleanups for FreeBSD linking (PIC) and plpython compiles. · 2c07d6bf
      Bruce Momjian 提交于
      FreeBSD ports, supplied by Jim C. Nasby
      2c07d6bf
    • B
      > The attached patch moves a plperl sanity check into the correct · 60672b59
      Bruce Momjian 提交于
      > position. Performing the check in the existing position allows the call
      > to go through to perl first, possibly resulting in a SEGV.
      
      Andrew Dunstan
      60672b59
    • B
      88a2b5c1
    • B
    • B
      Modify canonicalize_path() so if we would return a trailing "..", throw · 35379e90
      Bruce Momjian 提交于
      an error instead.
      35379e90