Tom Lane [Sat, 13 Sep 2003 22:25:38 +0000 (22:25 +0000)]
Avoid corner cases where aset.c would unnecessarily make malloc()
requests of sizes that aren't powers of 2. Per observation from
David Schultz, 28-Aug.
Tom Lane [Sat, 13 Sep 2003 21:44:50 +0000 (21:44 +0000)]
With Joe Conway's concurrence, remove srandom() call from normal_rand().
This was the last piece of code that took it upon itself to reset the
random number sequence --- now we only have srandom() in postmaster start,
backend start, and explicit setseed() operations.
Tom Lane [Sat, 13 Sep 2003 21:12:38 +0000 (21:12 +0000)]
Okay, I've had it with mktime() bugs. While chasing Torello Querci's
recent gripe, I discovered not one but two undocumented, undesirable
behaviors of glibc's mktime. So, stop using it entirely, and always
rely on inversion of localtime() to determine the local time zone.
It's not even very much slower, as it turns out that mktime (at least
in the glibc implementation) also does repeated reverse-conversions.
Bruce Momjian [Sat, 13 Sep 2003 16:44:49 +0000 (16:44 +0000)]
With pg_autovacuum becoming increasingly popular it's important to
have a working stats collector. This test is able to discover the
problem that was present in 7.4 Beta 2.
Bruce Momjian [Sat, 13 Sep 2003 16:43:38 +0000 (16:43 +0000)]
When I sent in the sslmode patch I forgot to update the
comments/examples in pg_hba.conf. This patch remedies that, adds a brief
explanation of the connection types, and adds a missing period in the
docs.
Bruce Momjian [Sat, 13 Sep 2003 16:26:18 +0000 (16:26 +0000)]
> OK, well as we wait on the fix for the stats system, let me submit my
> patch for pg_autovacuum. This patch assumes that the stats system will
> be fixed so that all inserts, updates and deletes performed on shared
> tables reguardless of what database those commands were executed from,
> will show up in the stats shown in each database.
I had to make a further change to this to take quotes off the 'last
ANALYZE' in order for it to not overquote the relation name, so
there's a _little_ work left to get it to play well.
I have deployed it onto several boxes that should be doing some
vacuuming over the weekend, and it is now certainly hitting pg_
tables.
I would like to present a CVS-oriented patch; unfortunately, I had to
change the indentation patterns when editing some of it :-(. The
following _may_ be good; not sure...
Bruce Momjian [Sat, 13 Sep 2003 14:49:51 +0000 (14:49 +0000)]
Attempt threading in this order:
* use non-*_r function names if they are all thread-safe
* (NEED_REENTRANT_FUNCS=no)
* use *_r functions if they exist (configure test)
* do our own locking and copying of non-threadsafe functions
Tom Lane [Fri, 12 Sep 2003 20:18:51 +0000 (20:18 +0000)]
Revert to our pre-7.4 behavior of identifying Unix-socket connections in
ps status as '[local]', not as 'localhost' as the code has been doing
recently. That's too easily confused with TCP loopback connections,
and there is no good reason to change the behavior anyway.
Tom Lane [Fri, 12 Sep 2003 19:33:59 +0000 (19:33 +0000)]
Someone (possibly me) foolishly reduced the response for failing
to create a TCP/IP socket from FATAL to LOG. This was unwise;
historically we have expected socket conflicts to abort postmaster
startup. Conflicts on port numbers with another postmaster can only
be detected reliably at the TCP socket level.
Bruce Momjian [Thu, 11 Sep 2003 21:42:20 +0000 (21:42 +0000)]
This patch fixes a few missed GUC variables that were still upper case,
makes a few more small improvements to runtime.sgml, and makes some SGML
conventions more consistent.
Some "feature not supported" errors are better syntax errors, because the
feature they complain about isn't a feature or cannot be implemented without
definitional changes.
Barry Lind [Mon, 8 Sep 2003 17:30:22 +0000 (17:30 +0000)]
This set of changes applies a patch from KHO at redhat to add some SQLState
support to the jdbc driver.
That patch needed some work: it assumed the sqlcode in a server message was
fixed in its position, the patch lost the ability to pass exceptions, and the
patch missed a couple of places where server errors where being received.
In addition to fixing the above, I also added full support for the V3 protocol
error message syntax, I reversed the order of arguments in the PSQLException
constructor to more closely follow the constructors for SQLException, I changed
the new constructors that take PSQLState to take Object for additional
parameters as the old ones did.
Still todo are to add SQLState values to all existing exceptions thrown in the
driver and add support for parsing the V3 protocol format for notices.
Tom Lane [Sun, 7 Sep 2003 15:26:54 +0000 (15:26 +0000)]
Remove geqo_random_seed parameter. Having geqo reset the global random()
sequence every time it's called is bogus --- it interferes with user
control over the seed, and actually decreases randomness overall
(because a seed based on time(NULL) is pretty predictable). If you really
want a reproducible result from geqo, do 'set seed = 0' before planning
a query.
Tom Lane [Sun, 7 Sep 2003 14:44:40 +0000 (14:44 +0000)]
Remove check on source address of a statistics packet. Check was broken
by recent IPv6 changes, and since it's redundant with a kernel-level check
anyway, it seems not worth trying to fix it. Per recent discussions.
Bruce Momjian [Sun, 7 Sep 2003 03:43:57 +0000 (03:43 +0000)]
Changes for MinGW/WIN32:
o allow configure to see include/port/win32 include files
o add matching Win32 accept() prototype
o allow pg_id to compile with native Win32 API
o fix invalide mbvalidate() function calls (existing bug)
o allow /scripts to compile with native Win32 API
o add win32.c to Win32 compiles (already in *.mak files)
Tom Lane [Sun, 7 Sep 2003 02:18:01 +0000 (02:18 +0000)]
load_file() has to remove pre-existing shlibs that match the new file
on either name or inode; otherwise load_external_function() won't do
anything. At least on Linux, it appears that recompiling a shlib leads
to a new file with a different inode, so the old code failed to detect
a match.
Make all valid uses of the COLLATE clause yield the same result: a syntax
error. There is no point in providing some kind of forward compatibility
now, because no one can tell what a future implementation will look like.
Tom Lane [Thu, 4 Sep 2003 22:06:27 +0000 (22:06 +0000)]
Reimplement hash index locking algorithms, per my recent proposal to
pghackers. This fixes the problem recently reported by Markus KrÌutner
(hash bucket split corrupts the state of scans being done concurrently),
and I believe it also fixes all the known problems with deadlocks in
hash index operations. Hash indexes are still not really ready for prime
time (since they aren't WAL-logged), but this is a step forward.