Tom Lane [Fri, 1 Nov 2002 22:52:34 +0000 (22:52 +0000)]
Arrange to compile flex output files as inclusions into other files
(usually bison output files), not as standalone files. This hack
works around flex's insistence on including <stdio.h> before we are
able to include postgres.h; postgres.h will already be read before
the compiler starts to read the flex output file. Needed for largefile
support on some platforms.
Tom Lane [Fri, 1 Nov 2002 17:55:23 +0000 (17:55 +0000)]
After elog(PANIC), exit with abort() not proc_exit(). This allows a
core file to be produced for debugging, and avoids trying to run the
normal proc-exit cleanup hooks, which are likely to cause additional
problems if the system is hosed.
Tom Lane [Thu, 31 Oct 2002 21:34:17 +0000 (21:34 +0000)]
Code review for statement_timeout patch. Fix some race conditions
between signal handler and enable/disable code, avoid accumulation of
timing error due to trying to maintain remaining-time instead of
absolute-end-time, disable timeout before commit not after.
Tom Lane [Thu, 31 Oct 2002 19:25:29 +0000 (19:25 +0000)]
Fix miscalculation of remaining free space during tuple chain moving.
Only affects machines where MAXALIGN > 4, and is a boundary-condition
case even there, but still surprising that it's not been identified
before. Also reduce tuple chain move give-up messages from WARNING
to DEBUG1, since they are not unexpected conditions.
Bruce Momjian [Mon, 28 Oct 2002 20:05:18 +0000 (20:05 +0000)]
Update from Neil Conway:
< * Add floor(float8) and other missing functions
> * -Add floor(float8) and other missing functions 174c174
< * Improve concurrency of hash indexes (Neil Conway)
> * Improve concurrency of hash indexes (Neil) 277c277
< o Allow array declarations and other data types in PL/PgSQl DECLARE
> o Allow array declarations and other data types in PL/PgSQL DECLARE 293c293
< * -Have pg_dump use ADD PRIMARY KEY after COPY, for performance (Neil Conway)
> * -Have pg_dump use ADD PRIMARY KEY after COPY, for performance (Neil) 474c474
< * Precompile SQL functions to avoid overhead (Neil Conway)
> * Precompile SQL functions to avoid overhead (Neil) 549c549
< * Neil is Neil Conway <nconway@klamath.dyndns.org>
> * Neil is Neil Conway <neilc@samurai.com>
Tom Lane [Fri, 25 Oct 2002 22:17:32 +0000 (22:17 +0000)]
Add dummy variable declaration to PG_FUNCTION_INFO_V1() to prevent
'empty declaration' warnings from compilers that care about such things.
Per discussion back before 7.2 release; we didn't do it then because
we'd already missed all the beta cycle ...
Tom Lane [Fri, 25 Oct 2002 22:08:44 +0000 (22:08 +0000)]
Remove #warning directive, which is nonstandard and isn't really
buying us anything to make it worth the porting risk. Per discussion
quite some time ago.
Tom Lane [Thu, 24 Oct 2002 23:35:55 +0000 (23:35 +0000)]
Code review for connection timeout patch. Avoid unportable assumption
that tv_sec is signed; return a useful error message on timeout failure;
honor PGCONNECT_TIMEOUT environment variable in PQsetdbLogin; make code
obey documentation statement that timeout=0 means no timeout.
Tom Lane [Thu, 24 Oct 2002 22:09:00 +0000 (22:09 +0000)]
Function-call-style type coercions should be treated as explicit
coercions, not implicit ones. For example, 'select abstime(1035497293)'
should succeed because there is an explicit binary coercion from int4
to abstime.
Tom Lane [Tue, 22 Oct 2002 22:44:36 +0000 (22:44 +0000)]
Perform transaction cleanup operations in a less ad-hoc, more
principled order; in particular ensure that all shared resources
are released before we release transaction locks. The code used
to release locks before buffer pins, which might explain an ancient
note I have about a bufmgr assertion failure I'd seen once several
years ago, and been unable to reproduce since. (Theory: someone
trying to drop a relation might be able to reach FlushRelationBuffers
before the last user of the relation had gotten around to dropping
his buffer pins.)
Tom Lane [Mon, 21 Oct 2002 22:06:20 +0000 (22:06 +0000)]
Fix places that were using IsTransactionBlock() as an (inadequate) check
that they'd get to commit immediately on finishing. There's now a
centralized routine PreventTransactionChain() that implements the
necessary tests.
Bruce Momjian [Mon, 21 Oct 2002 20:33:21 +0000 (20:33 +0000)]
When I removed the cube based stuff from eathdistance I accidentally
left a reference to cube in a comment in the regression test (that also
shows up in the expected output). This doesn't cause any real problem,
but people who read the comment might be confused. Attached is a diff to
remove the reference.
Bruce Momjian [Mon, 21 Oct 2002 20:32:33 +0000 (20:32 +0000)]
Cleanup for CLUSTERDB failure:
On Sat, Oct 19, 2002 at 12:11:32AM +0200, Peter Eisentraut wrote:
> $ ./clusterdb
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
> clusterdb: While clustering peter, the following failed:
> $
>
> This could probably handled a little more gracefully.
Yes, sorry. A patch for this is attached. Please apply.
Tom Lane [Mon, 21 Oct 2002 19:59:14 +0000 (19:59 +0000)]
Remove unnecessary (and inadequate) check of IsTransactionBlock() in
pgstat_vacuum_tabstat(). Assume that caller (namely, VACUUM) has done
the appropriate state checking beforehand.