Commit Graph

15300 Commits

Author SHA1 Message Date
Bruce Momjian 4f70680177 Make ecpg thread safe.
Lee Kindness
2003-06-15 04:07:58 +00:00
Bruce Momjian ffa3bfbc30 Move thread os defines into template files. 2003-06-14 19:21:42 +00:00
Bruce Momjian 467839df26 Handle threading in two more gethostbyname calls. 2003-06-14 18:20:33 +00:00
Bruce Momjian a16a031411 Make libpq thread-safe with configure --with-threads option.
Lee Kindness
2003-06-14 17:49:54 +00:00
Bruce Momjian 62b532b736 Add thread.c for libpq threading, and hook it into libpq/configure. 2003-06-14 14:35:42 +00:00
Bruce Momjian 02d847fe9f Add --with-threads configure option to control threaded libpq. 2003-06-13 23:10:08 +00:00
Michael Meskes 26188e8c17 - Enable FETCH without INTO.
- Compatibility functions for INFORMIX handling of DECLARE statement.
2003-06-13 10:50:58 +00:00
Tom Lane a2d08b99c2 Okay, recognize freebsd 2.* and 3.* too. 2003-06-13 02:21:03 +00:00
Tom Lane bee114c38b Expect FreeBSD 5.* to have standard float arithmetic. 2003-06-13 01:50:50 +00:00
Tom Lane 716200179f Fix broken markup. 2003-06-12 18:34:06 +00:00
Bruce Momjian 41a10a13b1 Add thread-enable compile variables into libpq. 2003-06-12 17:31:50 +00:00
Tom Lane cc2fc4a71b Fix SQL function executor for case where last command of a function is
not a SELECT.  We didn't use to allow that, but we do now.
2003-06-12 17:29:26 +00:00
Tom Lane ccd99a5eb5 <sys/socket.h> requires <sys/types.h> to already have been included
on some platforms.
2003-06-12 16:05:10 +00:00
Bruce Momjian 889dd3c00d Mention need for swap on Linux, and kill -9. 2003-06-12 15:58:19 +00:00
Bruce Momjian 8d2d92c5f0 Document default Linux autocommit behavior, and show workaround. 2003-06-12 15:31:02 +00:00
Michael Meskes b4117d8b1b Install all header files. 2003-06-12 12:52:24 +00:00
Bruce Momjian b14295cfe4 Attached is the complete diff against current CVS.
Compiles on BCC 5.5 and VC++ 6.0 (with warnings).

Karl Waclawek
2003-06-12 08:15:29 +00:00
Bruce Momjian dc4ee8a833 Back out patch that got bundled into another patch. 2003-06-12 08:11:07 +00:00
Bruce Momjian a647e30ba3 New patch with corrected README attached.
Also quickly added mention that it may be a qualified schema name.

Rod Taylor
2003-06-12 08:02:57 +00:00
Bruce Momjian ef2ba42717 Attached is a patch that enhances the output of psql's HTML mode.
The output now validates as HTML 4.01 Strict, XHTML 1.0 strict,
and XHTML 1.1 (assuming you wrap it in a valid html/body document).

It also wraps the output of PGRES_COMMAND_OK if the HTML tag is on,
for full compliance: this is why html_escaped_print has to be
externalized.

Greg Sabino Mullane greg@turnstep.com
2003-06-12 07:52:51 +00:00
Bruce Momjian e9cda08b2b Brief note about sequence cache not being cleared in other backends.
Actually clear the cache in the backend making the alteration.  This
follows in the footsteps of setval().

Rod Taylor
2003-06-12 07:49:43 +00:00
Bruce Momjian b4cea00a1f IPv6 cleanups.
Kurt Roeckx
Andrew Dunstan
2003-06-12 07:36:51 +00:00
Bruce Momjian e5549a272d Back out this patch because it is patched inside a later patch.
---------------------------------------------------------------------------

here is a patch that allows CIDR netmasks in pg_hba.conf. It allows two
address/mask forms:

. address/maskbits, or
. address netmask (as now)

If the patch is accepted I will submit a documentation patch to cover
it.

This is submitted by agreement with Kurt Roeckx, who has worked on a
patch that covers this and other IPv6 issues.
2003-06-12 07:00:57 +00:00
Bruce Momjian 1cef8ea790 I succeeded by fixing up setup.py:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
--- setup.py~   Tue Mar 19 08:21:14 2002
+++ setup.py    Wed May 14 15:10:30 2003
@@ -30,8 +30,8 @@
        optional_libs=[ 'libpqdll', 'wsock32', 'advapi32' ]
        data_files = [ 'libpq.dll' ]
 else:
-       include_dirs=['/usr/include/pgsql']
-       library_dirs=['usr/lib/pgsql']
+       include_dirs=['../../include','../libpq','/usr/include/pgsql']
+       library_dirs=['../libpq','/usr/lib/pgsql']
        optional_libs=['pq']
        data_files = []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

George Young
2003-06-12 02:15:09 +00:00
Bruce Momjian b78961b0da Here is a patch that allows CIDR netmasks in pg_hba.conf. It allows two
address/mask forms:

. address/maskbits, or
. address netmask (as now)

If the patch is accepted I will submit a documentation patch to cover
it.

This is submitted by agreement with Kurt Roeckx, who has worked on a
patch that covers this and other IPv6 issues.

Andrew Dunstan
2003-06-12 02:12:58 +00:00
Bruce Momjian 310c084921 Add Linux restart --- Slawomir Sudnik
Add "-l $PGLOG" for restart --- Darko Prenosil
2003-06-12 02:02:24 +00:00
Bruce Momjian acd1536d9f Up to now, SerializableSnapshot and QuerySnapshot are malloc'ed and
free'd for every transaction or statement, respectively.  This patch
puts these data structures into static memory, thus saving a few CPU
cycles and two malloc calls per transaction or (in isolation level
READ COMMITTED) per query.

Manfred Koizar
2003-06-12 01:42:21 +00:00
Bruce Momjian 752a4dac50 psql: tab completion for \encoding
Ian Barwick
2003-06-12 01:38:08 +00:00
Bruce Momjian 9243664dd4 This patch updates pg_autovacuum in several ways:
* A few bug fixes
* fixes solaris compile and crash issue
* decouple vacuum analyze and analyze thresholds
* detach from tty (dameonize)
* improved logging layout
* more conservative default configuration
* improved, expanded and updated README

please apply and 1st convenience, or before code freeze which ever comes
first :-)

At this point I think I have brought pg_autovacuum and its client side
design as far as I think it should go.  It works, keeping file sizes in
check, helps performance and give the administrator a fair amount
flexibility in configuring it.

Next up is to do the FSM based design that is integrated into the back
end.

p.s. Thanks to Christopher Browne for his help.

Matthew T. O'Connor
2003-06-12 01:36:44 +00:00
Bruce Momjian 4e1f986098 I found the libpq function PGunescapeBytea a little slow. It was taking a
minute and a half to decode a 500Kb on a fairly fast machine. I think the
culprit is sscanf.

I attach a patch that replaces the function with one used to perform the same
task in pyPgSQL (a Python interface to PostgreSQL). This code was written by
Billy Allie, author of pyPgSQL. I've changed a few variable names to match
those in the original code and removed a bit of Pythonness.

Billy has kindly looked at the code and points out that it is slightly
stricter than the original implementation and if it encounters an invalid
bytea such as '\12C' it drops the unescape '\' and outputs '12C'.

The code is licensed by the author under a BSD license.

I've performed limited testing of the function by putting JPEGs into
PostgreSQL, extracting them using them using the new function and diffing
against the original files.

The new function is significantly faster on my machine with the JPEGs being
decoded in less than a second. I attach a modified libpq example program that
I used for my testing.

Ben Lamb.
2003-06-12 01:17:19 +00:00
Bruce Momjian 0abe7431c6 This patch extracts page buffer pooling and the simple
least-recently-used strategy from clog.c into slru.c.  It doesn't
change any visible behaviour and passes all regression tests plus a
TruncateCLOG test done manually.

Apart from refactoring I made a little change to SlruRecentlyUsed,
formerly ClogRecentlyUsed:  It now skips incrementing lru_counts, if
slotno is already the LRU slot, thus saving a few CPU cycles.  To make
this work, lru_counts are initialised to 1 in SimpleLruInit.

SimpleLru will be used by pg_subtrans (part of the nested transactions
project), so the main purpose of this patch is to avoid future code
duplication.

Manfred Koizar
2003-06-11 22:37:46 +00:00
Bruce Momjian 240dc5cddc Add add_missing_from GUC variable.
Nigel J. Andrews
2003-06-11 22:13:22 +00:00
Bruce Momjian 9ffdd91bba Done:
* -Add config variable to prevent auto-adding missing FROM-clause tables
2003-06-11 21:39:00 +00:00
Tom Lane 6a276b7bfd Update expected file to match new _int.sql. 2003-06-11 19:43:36 +00:00
Bruce Momjian a237dd2b30 Add missing intarray files. 2003-06-11 19:31:05 +00:00
Bruce Momjian a24c5a7b12 Make "log_min_duration_statement" SUSET --- will be adjusted with new
USERLIMIT patch.
2003-06-11 18:49:00 +00:00
Bruce Momjian 47d5c3d5e7 Changes:
1 intarray: bugfix for int[]-int[] operation
2 intarray: split _int.c to several files (_int.c now is unused)
3 ntarray (gist__intbig_ops opclass): use special type for index storage
4 ltree (gist__ltree_ops opclass), intarray (gist__intbig_ops): optimize
GiST's
penalty and picksplit interface functions, now use Hemming distance.

Teodor Sigaev
2003-06-11 18:44:15 +00:00
Tom Lane d2e028b1b0 Fix brain damage in deciding which python input converter to use. 2003-06-11 18:33:39 +00:00
Bruce Momjian b952d61c54 Add log_min_duration_statement.
Christopher Kings-Lynne
2003-06-11 18:01:14 +00:00
Tom Lane 8bfe93c5c8 pg_dump and pg_restore were stripping quotes and downcasing some but
not all SQL identifiers taken from command line arguments.  We decided
years ago that that was a bad idea: identifiers taken from the command
line should be treated as literally correct.  Remove the inconsistent
code that has crept in recently.  Also fix pg_dump so that the combination
of --schema and --table does what you'd expect, namely dump exactly one
table from exactly one schema.  Per gripe from Deepak Bhole of Red Hat.
2003-06-11 16:29:42 +00:00
Tom Lane 7481b7d1e4 Update anonymous-CVS instructions. 2003-06-11 15:28:55 +00:00
Bruce Momjian 17386ac453 Well, the discussion about SSL a bit back perked my interest and I did
some reading on the subject.

1) PostgreSQL uses ephemeral keying, for its connections (good thing)

2) PostgreSQL doesn't set the cipher list that it allows (bad thing,
   fixed)

3) PostgreSQL's renegotiation code wasn't text book correct (could be
   bad, fixed)

4) The rate of renegotiating was insanely low (as Tom pointed out, set
   to a more reasonable level)

I haven't checked around much to see if there are any other SSL bits
that need some review, but I'm doing some OpenSSL work right now
and'll send patches for improvements along the way (if I find them).
At the very least, the changes in this patch will make security folks
happier for sure.  The constant renegotiation of sessions was likely a
boon to systems that had bad entropy gathering means (read: Slowaris
/dev/rand|/dev/urand != ANDIrand).  The new limit for renegotiations
is 512MB which should be much more reasonable.

Sean Chittenden
2003-06-11 15:05:50 +00:00
Bruce Momjian 535756649f During looking stuff up for a discussion on -general, I realized that
I'd placed the check for newly created matching pk rows for on update no
action earlier than it needed to be so that it'd check even when the key
values hadn't changed.  This patch moves it to after checking for NULLs
in the old row and comparing the values since the select's probably more
expensive.

Stephan Szabo
2003-06-11 15:02:25 +00:00
Bruce Momjian 9167a566d6 Add missing DLLIMPORT for cpu_index_tuple_cost to
src/include/optimizer/cost.h.

This is required to compile the PostGIS extension module with Cygwin
http://postgis.refractions.net

Norman Vine
2003-06-11 15:01:15 +00:00
Tom Lane 15e2cf7d81 Now that I look, that link doesn't belong there at all, does it? 2003-06-11 14:14:50 +00:00
Tom Lane 67e307b851 Fix busted markup. 2003-06-11 14:07:00 +00:00
Tom Lane bd48e09f2a Remove platform-specific executable; does not belong in distribution. 2003-06-11 14:02:57 +00:00
Peter Eisentraut 8a2922dcb2 Represent grant options in the information schema. 2003-06-11 09:23:55 +00:00
Bruce Momjian 65fb311a97 Add Rendezvous support to postmaster, from Chris Campbell 2003-06-11 06:56:07 +00:00
Michael Meskes 1ca0b6d047 Make sure a variable is no longer referenced when it is removed.
Fixed counting bug in parsing "->" operator.
Removed that silly debugging function I accidently committed last night.
2003-06-11 06:39:13 +00:00