Tom Lane [Fri, 7 Jan 2005 23:08:44 +0000 (23:08 +0000)]
Add a tip showing how functions on composite types can be used to
emulate computed fields. I suppose this is why the Berkeley boys made
it work that way in the first place, but the docs never said so anyplace.
Tom Lane [Thu, 6 Jan 2005 20:56:50 +0000 (20:56 +0000)]
Revert -Wl, change to Makefile.osf, as the allegedly more standard
syntax apparently does not work for all toolchains on that platform.
Per Honda Shigehiro.
Tom Lane [Thu, 6 Jan 2005 20:06:58 +0000 (20:06 +0000)]
Instead of a bare recv() to read the server's response to an SSL
request packet, use pqReadData(). This has the same effect since
conn->ssl isn't set yet and we aren't expecting more than one byte.
The advantage is that we will correctly detect loss-of-connection
instead of going into an infinite loop. Per report from Hannu Krosing.
Tom Lane [Thu, 6 Jan 2005 18:29:11 +0000 (18:29 +0000)]
Adjust lookup of client-side profile files (.pgpass and so on) as per
discussion on pgsql-hackers-win32 list. Documentation still needs to
be tweaked --- I'm not sure how to refer to the APPDATA folder in
user documentation.
Tom Lane [Thu, 6 Jan 2005 01:00:12 +0000 (01:00 +0000)]
Make the various places that determine the user's "home directory"
consistent. On Unix we now always consult getpwuid(); $HOME isn't used
at all. On Windows the code currently consults $USERPROFILE, or $HOME
if that's not defined, but I expect this will change as soon as the win32
hackers come to a consensus. Nothing done yet about changing the file
names used underneath $USERPROFILE.
Tom Lane [Tue, 4 Jan 2005 23:18:25 +0000 (23:18 +0000)]
Clean up code in libpq that obtains user's home directory: make a single
subroutine that can hide platform dependencies. The WIN32 path is still
a stub, but I await a fix from one of the win32 hackers.
Also clean up unnecessary #ifdef WIN32 ugliness in a couple of places.
Bruce Momjian [Tue, 4 Jan 2005 05:35:45 +0000 (05:35 +0000)]
Update wording:
< * Allow building with directories containing spaces
> * Allow building in directories containing spaces
< There are two capabilities here, first the ability to build from a
< source directory that contains spaces, and second the ability to install
< into a directory that contains spaces. The first is probably not
< possible because 'gmake' and other compiler tools do not fully support
< spaces in path names. The second is possible with proper quoting in
< the makefiles. Because PostgreSQL supports relocatable installs, it
< is possible to install into a directory that doesn't contain spaces and
< then copy the install to a directory with spaces.
> This is probably not possible because 'gmake' and other compiler tools
> do not fully support quoting of paths with spaces.
>
> * Allow installing to directories containing spaces
>
> This is possible if proper quoting is added to the makefiles for the
> install targets. Because PostgreSQL supports relocatable installs, it
> is already possible to install into a directory that doesn't contain
> spaces and then copy the install to a directory with spaces.
Bruce Momjian [Tue, 4 Jan 2005 05:13:39 +0000 (05:13 +0000)]
Update item for install with spaces:
> There are two capabilities here, first the ability to build from a
> source directory that contains spaces, and second the ability to install
> into a directory that contains spaces. The first is probably not
> possible because 'gmake' and other compiler tools do not fully support
> spaces in path names. The second is possible with proper quoting in
> the makefiles. Because PostgreSQL supports relocatable installs, it
> is possible to install into a directory that doesn't contain spaces and
> then copy the install to a directory with spaces.
Tom Lane [Mon, 3 Jan 2005 18:49:41 +0000 (18:49 +0000)]
Repair bufmgr deadlock problem reported by Michael Wildpaner. Must take
share lock on a buffer being written out before releasing BufMgrLock in
the BufferAlloc code path; if we do it later we might block on someone
who's re-pinned the buffer. I believe this is only an issue for BufferAlloc
and not the other places that call FlushBuffer. BufferSync must continue
to do it the old way since it may well be trying to write buffers that
other backends have pinned; but it should not be holding any conflicting
locks. FlushRelationBuffers is okay since it's got exclusive lock at the
relation level.
Bruce Momjian [Sat, 1 Jan 2005 16:36:57 +0000 (16:36 +0000)]
Update:
< o Disallow encodings like UTF8 which which PostgreSQL supports
> o Disallow encodings like UTF8 which PostgreSQL supports 914a915,917
>
> To fix UTF8, the data needs to be converted to UTF16 and then
> the Win32 strcoll() can be used.
Also performed an initial run through of upgrading our Copyright date to
extend to 2005 ... first run here was very simple ... change everything
where: grep 1996-2004 && the word 'Copyright' ... scanned through the
generated list with 'less' first, and after, to make sure that I only
picked up the right entries ...
Tom Lane [Thu, 30 Dec 2004 00:30:40 +0000 (00:30 +0000)]
Triggers should return TRIGGER not OPAQUE. Looks like this script got
overlooked in 7.3 updates. Not a critical fix but avoids a notice when
the resulting SQL script is executed.
Tom Lane [Wed, 29 Dec 2004 21:36:09 +0000 (21:36 +0000)]
Refactor EXEC_BACKEND code so that postmaster child processes reattach
to shared memory as soon as possible, ie, right after read_backend_variables.
The effective difference from the original code is that this happens
before instead of after read_nondefault_variables(), which loads GUC
information and is apparently capable of expanding the backend's memory
allocation more than you'd think it should. This should fix the
failure-to-attach-to-shared-memory reports we've been seeing on Windows.
Also clean up a few bits of unnecessarily grotty EXEC_BACKEND code.
Tom Lane [Tue, 28 Dec 2004 23:17:54 +0000 (23:17 +0000)]
Make libpq default to localhost connections on machines without Unix-domain
sockets, rather than failing as it formerly did. Revert the
thereby-obsoleted patch to make psql supply the localhost default.
Bruce Momjian [Mon, 27 Dec 2004 22:44:44 +0000 (22:44 +0000)]
Add:
> * Improve the background writer
>
> Allow the background writer to more efficiently write dirty buffers
> from the end of the LRU cache and use a clock sweep algorithm to
> write other dirty buffers to reduced checkpoint I/O
Tom Lane [Mon, 27 Dec 2004 19:19:24 +0000 (19:19 +0000)]
Cause pg_hba.conf file inclusion (@file stuff) to behave as documented,
that is, files are sought in the same directory as the referencing file.
Also allow absolute paths in @file constructs. Improve documentation
to actually say what is allowed in an included file.
Tom Lane [Fri, 24 Dec 2004 16:55:43 +0000 (16:55 +0000)]
Remove 'optimization' to skip resolve_symlinks() when the found
executable file isn't itself a symlink. We still need to run the
algorithm so that any directory symlinks in the path to the
executable are replaced by a true path. Noticed this on seeing
pg_config give me a completely wrong answer for --pkglibdir when
I called it through a symlink to the installation bindir.
Tom Lane [Fri, 24 Dec 2004 15:42:05 +0000 (15:42 +0000)]
Switch order of WHERE clauses in tab completion queries, as suggested
by Rod Taylor. The foo_is_visible() functions are relatively slow and
so it pays to check them after checking the name pattern match.
Tom Lane [Thu, 23 Dec 2004 22:42:15 +0000 (22:42 +0000)]
Avoid memory leakage during VACUUM FULL when an index expression or
index predicate uses temporary memory for evaluation. Per example
from Jean-Gerard Pailloncy.
Tom Lane [Wed, 22 Dec 2004 18:45:49 +0000 (18:45 +0000)]
Awhile back I added some code to StartupCLOG() to forcibly zero out
the remainder of the current clog page during system startup. While
this was a good idea, it turns out the code fails if nextXid is
exactly at a page boundary, because we won't have created the "current"
clog page yet in that case. Since the page will be correctly zeroed
when we execute the first transaction on it, the solution is just to
do nothing when exactly at a page boundary. Per trouble report from
Dave Hartwig.