2. Get rid of locking when updating statistics in vacuum.
3. Use QuerySnapshot in COPY TO and call SetQuerySnashot
in main tcop loop before FETCH and COPY TO.
redundant) SearchSysCache searches per table column in an INSERT, which
accounted for a good percentage of the CPU time for INSERT ... VALUES().
Now it only does two searches in the typical case.
through MAXBACKENDS array entries used to be fine when MAXBACKENDS = 64.
It's not so cool with MAXBACKENDS = 1024 (or more!), especially not in a
frequently-used routine like SIDelExpiredDataEntries. Repair by making
procState array size be the soft MaxBackends limit rather than the hard
limit, and by converting SIGetProcStateLimit() to a macro.
do the right thing: look for a NOTICE message from the backend before we
close our side of the socket. 6.4 libpq did not reliably print the backend's
hara-kiri message, 'The Postmaster has informed me ...', because it only
did the right thing if connection closure was detected during a read
attempt instead of a write attempt.
BT_READ/BT_WRITE are BUFFER_LOCK_SHARE/BUFFER_LOCK_EXCLUSIVE now.
Also get rid of #define BT_VERSION_1 - we use version 1 as default
for near two years now.
not be marked inFromCl any longer. Otherwise the planner gets confused
and joins over them where in fact it does not have to.
Adjust hasSubLinks now with a recursive lookup - could be wrong in
multi action rules because parse state isn't reset correctly and all
actions in the rule are marked hasSubLinks if one of them has.
Jan
aggregate functions, as in
select a, b from foo group by a;
The ungrouped reference to b is not kosher, but formerly we neglected to
check this unless there was an aggregate function somewhere in the query.
this file in interfaces/
It will all need to be checked in. I used the char *rcsid[] method for
cvs ids so it can be strings | grep'd to find version numbers. The new
version for the library is 3.0.
Run configure from src/ to create the Makefile and it should be good to
go.
I did minimal documentation references in the README, I'll see if I can
get something to Tom Lockhart rather quickly.
Vince.
SelectStmt and CursorStmt tried to parse FOR UPDATE ... / FOR READ ONLY.
Cursor now checks that it is read only by looking at forUpdate of Query.
SelectStmt handles FOR READ ONLY too.
Jan
will pass through rather than spitting up. This is necessary to handle
cases where coerce_type causes a subexpression to be retransformed, as in
SELECT count(*) + 1.0 FROM table
remove optimizer's arbitrary limit on how large a join it will use hashing
for. (The limit was too large to prevent the problems we'd been seeing,
anyway...)
fixed-size hashtable. This should prevent 'hashtable out of memory' errors,
unless you really do run out of memory. Note: target size for hashtable
is now taken from -S postmaster switch, not -B, since it is local memory
in the backend rather than shared memory.
looks
like someone just didn't add support for multiple segments for
truncation.
The following patch seems to do the right thing, for me at least.
It passed my tests, my data looks right(no data that shouldn't be in
there) and regression is ok.
Ole Gjerde
segments, and my indexes had 3(Yes, it DOES work!).
DROP TABLE removed ALL segments from the table, but only the main index
segment.
So it looks like removing the table itself is using mdunlink in md.c,
while removing indexes uses FileNameUnlink() which only unlinks 1 file.
As far as I can tell, calling FileNameUnlink() and mdunlink() is basically
the same, except mdunlink() deletes any extra segments.
I've done some testing and it seems to work. It also passes regression
tests(except float8, geometry and rules, but that's normal).
If this patch is right, this fixes all known multi-segment problems on
Linux.
Ole Gjerde
configtype.patch simply fixes a typo in config.h.in
pg_dump.c.patch Updates a bunch of error messages to include a reason
from
the backend, and also removes a couple of unnecessary
if's
Ole Gjerde
lists are now plain old garden-variety Lists, allocated with palloc,
rather than specialized expansible-array data allocated with malloc.
This substantially simplifies their handling and eliminates several
sources of memory leakage.
Several basic types of erroneous queries (syntax error, attempt to
insert a duplicate key into a unique index) now demonstrably leak
zero bytes per query.
The
offending code
has been removed, the action is now always dependent :-)
I suggest the following patch, to finally make trigger regression happy
again:
<<refint1.patch>>
After that you can remove the following from TODO:
Remove ERROR: check_primary_key: even number of arguments should be
specified
Trigger regression test fails
Andreas
and lock syntax as fully parsed tokens.
Two keywords for isolation are non-reserved SQL92
(COMMITTED, SERIALIZABLE).
All other new keywords are non-reserved Postgres (not SQL92)
(ACCESS, EXCLUSIVE, MODE, SHARE).
Add syntax to allow CREATE [GLOBAL|LOCAL] TEMPORARY TABLE, throwing an
error if GLOBAL is specified.
constraints. Reported by Tom Lane.
Now, check for duplicate indices and retain the one which is a primary-key.
Adjust elog NOTICE messages to surround table and column names with single
quotes.
-d4 now prints compressed trees from nodeToString()
-d5 prints pretty trees via nodeDisplay()
new pg_options: pretty_plan, pretty_parse, pretty_rewritten
Jan
on connection. This patch changes it to use PQconnectdb rather than
{fe_setauthsvc,PQsetdb}. This still isn't the complete solution, as
there
is no provision for user,password in class PgEnv, but it does get rid of
the error message. Tested with gcc version egcs-2.91.60 19981201
(egcs-1.1.1 release) under NetBSD-1.3K/i386.
Cheers,
Patrick Welche
files to be closed automatically at transaction abort or commit, should
they still be open. Also close any still-open stdio files allocated with
AllocateFile at abort/commit. This should eliminate problems with leakage
of file descriptors after an error. Also, put in some primitive buffered-IO
support so that psort.c can use virtual files without severe performance
penalties.
"SYSTEM", and unpack the files in the uuencoded .tar.gz file at the end in
src/test/regress so that the int2, int4 and geometry tests pass on NetBSD/i386.
They just fail on different wording of error messages and eg printing "0"
rather than "-0". At a guess the same will be true for the other NetBSD ports,
but I can't test them.
Cheers,
Patrick
about certain to fail anytime it decided the relation to be hashed was
too big to fit in memory --- the code for 'batching' a series of hashjoins
had multiple errors. I've fixed the easier problems. A remaining big
problem is that you can get 'hashtable out of memory' if the code's
guesstimate about how much overflow space it will need turns out wrong.
That will require much more extensive revisions to fix, so I'm committing
these fixes now before I start on that problem.
arrayfuncs.patch fixes a small bug in my previous patches for
arrays
array-regress.patch adds _bpchar and _varchar to regression tests
--
Massimo Dal Zotto
been applied. The patches are in the .tar.gz attachment at the end:
varchar-array.patch this patch adds support for arrays of bpchar() and
varchar(), which where always missing from postgres.
These datatypes can be used to replace the _char4,
_char8, etc., which were dropped some time ago.
block-size.patch this patch fixes many errors in the parser and other
program which happen with very large query statements
(> 8K) when using a page size larger than 8192.
This patch is needed if you want to submit queries
larger than 8K. Postgres supports tuples up to 32K
but you can't insert them because you can't submit
queries larger than 8K. My patch fixes this problem.
The patch also replaces all the occurrences of `8192'
and `1<<13' in the sources with the proper constants
defined in include files. You should now never find
8192 hardwired in C code, just to make code clearer.
--
Massimo Dal Zotto
to save a little bit of backend startup time. This way, the first
backend started after a VACUUM will rebuild the init file with up-to-date
statistics for the critical system indexes.
the database encoding and the client encoding match the encoding expected
by the test. So, force both of them to be set from the MULTIBYTE
environment var. This allows regress tests to be run successfully in
multibyte environments other than the compiled-in default.
it failed to cover the case where high bits of char are 100 or 101.
Not sure if fix is right, but it agrees with pg_utf_mblen ... and it
doesn't lock up ...
can be generated in a buffer and then sent to the frontend in a single
libpq call. This solves problems with NOTICE and ERROR messages generated
in the middle of a data message or COPY OUT operation.
instead of doing a kill(self, SIGQUIT) and expecting the signal handler
to do it. Also, clean up inconsistent definitions of the sigjmp buffer
in the several files that already referenced it.
and related files. Also remove float.c's gratuitous redeclaration of
isinf() ... looks like there are more decls in there that ought to be
in config.h, but I'll leave well enough alone for now ...
expression context (ie, not at the top level of a WHERE clause). Examples
like this one work now:
SELECT name, value FROM t1 as touter WHERE
(value/(SELECT AVG(value) FROM t1 WHERE name = touter.name)) > 0.75;
delete the default argument from the node. This prevents the executor
from spitting up on the untransformed argument expression. Typical
failure was:
select (case f1 when 'val' then 'subst' else f1 end) from t1;
ERROR: copyObject: don't know how to copy 704
MyProcPid global variable is set to 0 when postgres starts as a command
(not as a backend daemon). This leads issuing SIGQUIT to the process group,
not the process itself. As a result, parent sh gets core dumped in the
Wisconsin benchmark test.
- change temp -> temp_bench ("temp" is now a reserved word)
- fix bugs in queries
- add -B 256 option to run the postgres command
(without this, postgres seems to fail with hashjoin)
rather than reusing the input storage.
Also made the same fix to int8smaller(), though there wasn't a symptom,
and went through and verified that other pass-by-reference data types
do the same thing. Not an issue for the by-value types.
relation, rather than zeroes. This prevents the optimizer from making
foolish choices (ie, using nested-loop plans) on never-yet-vacuumed tables.
This is a hack, of course. Keeping accurate track of these statistics
would be a cleaner solution, but it's far from clear that it'd be worth
the cost of doing so. In any case we're not going to do that for 6.5.
In the meantime, this quick hack provides a useful performance improvement
in the regression tests and in many real-world scenarios.
in rules regression test, in order to eliminate bogus test 'failures'
that occur due to platform-dependent and join-implementation-dependent
ordering of tuples. I'm not sure that I got all of the SELECTs that need
ordering clauses --- we may need some more. But this takes care of the
diffs between my platform and Jan's.
sourced with \i (tried to read data from the terminal, rather than from
the source file; this breaks pg_dump scripts read with \i). Also, \o file
followed by COPY TO STDOUT wrote to terminal not designated file.
All better now.
time zone.
Previously, localtime() rotated a date with a day of month field which
exceeded the actual range into the next months, masking the fact that
a bad date had been specified.
Regression tests pass.
Previously, dates falling within Unix system time range were run through
a call to localtime() to get the time zone, if it was not specified.
This had the effect that dates with DOMs which were larger than would be
valid for that month were "rotated" into the following months.
syntax for CREATE OPERATOR with SORT parameters. Fixed.
It is now actually possible to dump and reload a database containing
fully specified user-definable operators ...
indexes.
1. Index Scan using plural indexids never scan backward
as to the order of indexids.
2. The cursor using Index scan is not usable after moving
past the end.
This patch solves above bugs.
Moreover the change of _bt_first() would be useful to extend
ORDER BY patch by Jan Wieck for all descending order cases.
Hiroshi Inoue
not-yet-defined operator in commutator, negator, etc links. This is
necessary in order to ensure that a pg_dump dump of user-defined operators
can be reloaded. There may still be a bug lurking here, because it's
provoking a 'Buffer Leak' notice message in one case. See my mail to
pgsql-hackers.
hashjoin's hashFunc() so that it does the right thing with pass-by-value
data types (the old code would always return 0 for int2 or char values,
which would work but would slow things down a lot). Extend opr_sanity
regress test to catch more kinds of errors.
called through fmgr. Someday we should try to actually execute the function,
but that looks like it might be a major feature addition.
Not something to try during beta phase.
it with configure-script tests to see whether const, inline, volatile, etc
work or not. (Curiously, configure was already doing the work to see if
const and inline were OK, but the results were not getting plugged into
config.h :-(.)
1. Fix problems of PAGER and \? command
2. Add -E option that shows actual queries sent by \dt and friends
3. Add version number in startup banners for psql
There are two subdirectories (ISO8859-7 and koi8-to-win1251) containing
tests for Greek locale and server<=>client recoding feature (recently
submitted by Tatsuo Ishii <t-ishii@sra.co.jp>; we've debugged his patches
together in the field of Cyrillic support).
function is found in prosrc field of pg_proc, not proname. This allows
multiple aliases of a built-in to all be implemented as direct builtins,
without needing a level of indirection through an SQL function. Replace
existing SQL alias functions with builtin entries accordingly.
Save a few K by not storing string names of builtin functions in fmgr's
internal table (if you really want 'em, get 'em from pg_proc...).
Update opr_sanity with a few more cross-checks.
2. Much faster btree tuples deletion in the case when first on page
index tuple is deleted (no movement to the left page(s)).
3. Remember blkno of new root page in BTPageOpaque of
left/right siblings when root page is splitted.
I have solved some problems with dynamic loading on NT. It is possible
to
run succesfully both trigger and plpgsql regression tests. The patch is
in
the included file "diff".
Dan
but others declare it as extern char *. gcc complains (quite rightly too).
Worked around it by rearranging the order of inclusions so that we don't
have to explicitly declare yytext; this should work with either variant.
change functionality, but makes the code more ANSI C'ish.
My AIX xlc compiler barfs on all of these. Can someone please
review and apply to current.
<<port.patch>>
Thanks
Andreas
in
different directories. The patch gave the option of specifying a dir
for
the tk script and if they were both in the same directory then it didn't
mind being empty. It's small so I'm including it. It was tested with
autoconf 2.12.
Vince.
would be a Bad Thing.
For what it's worth, I found another case in libpq where you can get a T
message without a D that my utility patch needs to handle. I have
attached
the updated patch against the 6.4.2 version of
src/interfaces/libpq/fe-exec.c
Jerry Gay
results in a bogus datetime value under AlphaLinux. (Note that
the link to submit a port-specific bug on your website is broken)
-Test Case:
----------
testdb=> create table dttest (dt datetime);
testdb=> insert into dttest values ('now');
--------------------------------------------------------------------------
Solution:
---------
The basic problem is the typedefs of AbsoluteTime and RelativeTime,
which are both 'int32'. These types appear to be used synonymously
with the 'time_t' type, which on AlphaLinux is typedef'd as a 'long
int', which is 64-bits (not 32). The solution included here fixes
the datetime type (it now passes the regression test), but does not
pass the absolute and relative time regression tests. Presumably, a
more thorough investigation of how these types are used is warranted.
The included patch is from the v6.3.2 source, but can be applied to
the v6.4.2 source. Please note that there is also a RedHat-specific
patch distributed with the PostgreSQL source package from RedHat
that was applied first.
Rich Edwards
Just in case you'd like to see what I was talking about, I am
attaching
my patch to src/interfaces/libpq/fe-exec.c to prevent utility functions
called from SPI from locking up the client.
Jerry Gay
authentifica
tion
working with postgresql-6.4.2 and KTH-KRB Ebones
(http://www.pdc.kth.se/kth-kr
b) on a dec alpha running DU 4.0D using the native compiler. The
following
patch does the trick.
The rationale behind this is as follows. The KTH-KRB code header files
defines
lots of lengths like INST_SZ,REALM_SZ and KRB_SENDAUTH_VLEN. It also has
a
habit of doing things like
chararray[LENGTH] = '\0'
to ensure null terminated strings. In my instance this just happens to
blat
the kerberos principal instance string leading to error like
pg_krb4_recvauth: kerberos error: Can't decode authenticator
(krb_rd_req
)
The application code that comes with KTH-KRB uses "KRB_SENDAUTH_VLEN +
1" and
sometimes uses "INST_SZ + 1" so it seems safest to put that 1 char
buffer in
the appropriate place.
Rodney McDuff
NetBSD/macppc
LinuxPPC
FreeBSD 2.2.6-RELEASE
All of them seem happy with the regression test. Note that, however,
compiling with optimization enabled on NetBSD/macppc causes an initdb
failure (other two platforms are ok). After checking the asm code, we
are suspecting that might be a compiler(egcs) bug.
Tatsuo Ishii
Removed char16 and replaced with an example using Point
as suggested by Tom Lane. The dept field was changed to
the cubicle field denoting the row(x) and column(y) of
the employee's cube in the corporate jungle. The C function
builds a 'compromise' cubicle from two suggested ones.
I'll try and patchup the documentation next.
Clark
I've been working on the following TODO list item:
* psql \d on index with char()/varchar() fields shows improper length
I've attached a simple patch to fix this.
-Ryan
records using a sub form, i.e. entering a new order/orderlines or master
and
detail tables. The problem is caused by a SQL statement that Access97
makes
involving NULL. The syntax that fails is "column_name" = NULL. The
following attachment was provided by -Jose'-. It contains a very small
enhancement to gram.y that will allow Access97 to work properly with sub
forms. Can this enhancement be added to release 6.5?
<<gram.patch>>
Thanks, Michael
the handling of negative numbers and commas. The attached path attempts
to fix these.
However the getValue method does not yet insert commas into the
generated string.
Also in getValue there is an incorrect assumption that the currency
symbol is '$', it should of course be '£'!. I have no idea on how to go
about fixing this one.
Alvin
I would like some feedback on what the hash function for the int8 hash
function
in the ./backend/access/hash/hashfunc.c should return.
Also, could someone (maybe Tomas Lockhart?) look-over the patch and make
sure
the system table entries are correct? I've tried to research them as
much as I
could, but some of them are still not clear to me.
Thanks,
-Ryan
and pg_operator. The lone error in pg_operator was reported as a bug
by Michael Reifenberger; the multiple errors in pg_proc would only have
been noticed if one invoked the functions by name rather than using
operator syntax. I guess few people do that.
palloc.h again. Move exporting of backend header files out of libpq's
Makefile (whatever was it doing there in the first place?) and into
backend/Makefile.
_copyResult didn't copy subPlan structure completely. _copyAgg is still
busted, apparently because of changes from EXCEPT/INTERSECT patch
(get_agg_tlist_references is no longer sufficient to find all aggregates).
No time to look at that tonight, however.
so remove them from MergeJoin node. Hack together a partial
solution for commuted mergejoin operators --- yesterday
a mergejoin int4 = int8 would crash if the planner decided to
commute it, today it works. The planner's representation of
mergejoins really needs a rewrite though.
Also, further testing of mergejoin ops in opr_sanity regress test.
+
+ Tue Feb 23 17:32:25 CET 1999
+
+ - Other than a struct a union itself cannot be specified as variable.
+
+ Fri Feb 26 07:18:25 CET 1999
+
+ - Synced preproc.y with gram.y.
+
+ Sat Feb 27 20:30:03 CET 1999
+
+ - Added automatic allocating for NULL pointers.
portability problem. Included patches should be applied to both
current and 6.4 tree. I have tested on LinuxPPC, FreeBSD and Solaris
2.6. Now the inet regression tests on these platforms are all happy.
---
Tatsuo Ishii
+
+ Son Feb 21 14:10:47 CET 1999
+
+ - Fixed variable detection in libecpg.
+
+ Mon Feb 22 19:47:45 CET 1999
+
+ - Added 'at <db_connection>' option to all commands it is apllicable
+ to. Due to changing the API of some libecpg functions this
+ requires me to increase the major version number.
+ - Synced pgc.l with scan.l.
+ - Added support for unions.
+ - Set library version to 3.0.0
+ - Set ecpg version to 3.0.0
file early enough to use in nodes/.
Try to be more complete for rules on generating parse.h,
but it still does not work any better than before. Should be able to
make correctly if parser/gram.y is updated even without a "make clean"
but so far not there yet.
shared memory space allocation. It's a wonder we have not seen bug
reports traceable to this area ... it's quite clear that the routine
dir_realloc() has never worked correctly, for example.
Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
NOT_USED" for current. I have tested these patches in that the
postgres binaries are identical.
+
+ Fri Feb 19 21:40:14 CET 1999
+
+ - Fixed bug in libecpg that caused it to start transactions only for
+ the first connection.
+ - Set library version to 2.7.1
of MAXBACKENDS is now 1024, since all it's costing is about 32 bytes of memory
per array slot. configure's --with-maxbackends switch now controls DEF_MAXBACKENDS
which is simply the default value of the postmaster's -N switch. Thus,
the out-of-the-box configuration will still limit you to 64 backends,
but you can go up to 1024 backends simply by restarting the postmaster with
a different -N switch --- no rebuild required.
(--with-maxbackends). Add a postmaster switch (-N backends) that allows
the limit to be reduced at postmaster start time. (You can't increase it,
sorry to say, because there are still some fixed-size arrays.)
Grab the number of semaphores indicated by min(MAXBACKENDS, -N) at
postmaster startup, so that this particular form of bogus configuration
is exposed immediately rather than under heavy load.
Fix problem with date_part() for timespan (had an offset of one)
when given decade, century, and millenium as arguments.
Reported by Ricardo J.C.Coelho.