aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* More paranoia about global variables containing references to long-Tom Lane2000-05-26
| | | | since-closed file descriptors...
* After closing frontend socket, set MyProcPort->sock = -1 to ensure thatTom Lane2000-05-26
| | | | | | | | | subsequent I/O attempts fail cleanly. I'm speculating about failure scenarios in which we do pq_close, then something in a proc_exit routine opens a file (re-using that kernel FD number), then something else fails and tries to write an elog message to the frontend ... message ends up in opened file, oops. No known examples of this but it seems like a potential hole.
* Add some elog(DEBUG)'s to help diagnose mdblindwrt failures.Tom Lane2000-05-25
|
* Clean up sloppy coding of _outAExpr().Tom Lane2000-05-25
|
* Modify raw parsetree representation returned by gram.y for SubLinks:Tom Lane2000-05-25
| | | | | | | | the oper field should be a valid Node structure so it can be dumped by outfuncs.c without risk of coredump. (We had been using a raw pointer to character string, which surely is NOT a valid Node.) This doesn't cause any backwards compatibility problems for stored rules, since raw unanalyzed parsetrees are never stored.
* Do table renaming in a sane order: physical file rename must happenTom Lane2000-05-25
| | | | | | | *last*, after all updating of system catalogs. In old code, an error detected during TypeRename left the relation hosed. Also, add a call to flush the relation's relcache entry, rather than trusting to shared cache invalidation to flush it for us.
* heap_drop() should flush the relcache entry for theTom Lane2000-05-25
| | | | relation being dropped.
* On solaris, createdb/dropdb fails because of strange behavior of system().Tatsuo Ishii2000-05-25
| | | | | (it returns error with errno ECHILD upon successful completion of commands). This fix ignores an error from system() if errno == ECHILD.
* Make setproctitle update for every query.Bruce Momjian2000-05-24
|
* comment cleanupBruce Momjian2000-05-23
|
* Fix problem in which sloppily-coded test in ExecInitIndexScan wouldTom Lane2000-05-23
| | | | | | | | | | | | think that both sides of indexqual look like index keys. An example is create table inside (f1 float8 primary key); create table outside (g1 float8, g2 float8); select * from inside,outside where f1 = atan2(g1+1, g2); ERROR: ExecInitIndexScan: both left and right ops are rel-vars (note that failure is potentially platform-dependent). Solution is a cleanup I had had in mind to make anyway: functional index keys should be represented as Var nodes in the fixed indexqual, just like regular index keys.
* CleanupBruce Momjian2000-05-22
|
* I am attempting to integrate postgres (v 7.0) with an open sourceBruce Momjian2000-05-22
| | | | | | | | | | | | | | | | | | | | project I am working on (Recall - a distributed, fault-tolerant, replicated, storage framework @ http://www.fault-tolerant.org). Recall is written in C++. I need to include the postgres headers and there are some problems when including the headers w/C++. Attached is a patch generated from postgres/src that fixes my problems. I was hoping to get this into the main source. It's very small (2k) and 3 files are changed: backend/utils/fmgr/fmgr.c, backend/utils/Gen_fmgrtab.sh.in, and include/access/tupdesc.h. In C++, you get a multiply defined symbol because the variable (FmgrInfo *fmgr_pl_finfo) is defined in the header (the patch moves it to the .c file). The other problem in tupdesc.h is the use of typeid is a problem in c++ (I renamed it to oidtypeid). Thanks, Neal Norwitz
* Remove calls to getprotobyname(), which we now know leaks memory onTom Lane2000-05-21
| | | | | | some platforms --- and I also see that it is documented as not thread- safe on HPUX and possibly other platforms. No good reason not to just use IPPROTO_TCP constant from <netinet/in.h> instead.
* Repair memory leaks that caused CacheCxt to grow without bound. WeTom Lane2000-05-21
| | | | | | | | | really ought to fix relcache entry construction so that it does not do so much with CurrentMemoryContext = CacheCxt. As is, relatively harmless leaks in either sequential or index scanning translate to permanent leaks if they occur when called from relcache build. For the moment, however, the path of least resistance is to repair all such leaks...
* Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS isTom Lane2000-05-21
| | | | | defined then statistics about memory usage of all the global memory contexts are printed after each commit.
* Clean up grotty references to CacheCxt (externs inside functions,Tom Lane2000-05-20
| | | | duplicate global declarations, no points for style at all!)
* Enhance multibyte support.Tatsuo Ishii2000-05-20
| | | | SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya
* Add KEEPALIVE option to the socket of backend. This will automaticallyTatsuo Ishii2000-05-20
| | | | terminate the backend that has no frontend anymore.
* Revise FlushRelationBuffers/ReleaseRelationBuffers per discussion withTom Lane2000-05-19
| | | | | | | | | | | | | | | | | | | | | Hiroshi. ReleaseRelationBuffers now removes rel's buffers from pool, instead of merely marking them nondirty. The old code would leave valid buffers for a deleted relation, which didn't cause any known problems but can't possibly be a good idea. There were several places which called ReleaseRelationBuffers *and* FlushRelationBuffers, which is now unnecessary; but there were others that did not. FlushRelationBuffers no longer emits a warning notice if it finds dirty buffers to flush, because with the current bufmgr behavior that's not an unexpected condition. Also, FlushRelationBuffers will flush out all dirty buffers for the relation regardless of block number. This ensures that pg_upgrade's expectations are met about tuple on-row status bits being up-to-date on disk. Lastly, tweak BufTableDelete() to clear the buffer's tag so that no one can mistake it for being a still-valid buffer for the page it once held. Formerly, the buffer would not be found by buffer hashtable searches after BufTableDelete(), but it would still be thought to belong to its old relation by the routines that sequentially scan the shared-buffer array. Again I know of no bugs caused by that, but it still can't be a good idea.
* Correct busted syntax of CC invocation for tas.s.Tom Lane2000-05-19
|
* Change remove function warning for built-ins.Bruce Momjian2000-05-18
|
* Throw NOTICE on built-in function removalBruce Momjian2000-05-18
|
* Reduce COPY IN lock from AccessExclusive to a more reasonableTom Lane2000-05-18
| | | | | | | RowExclusive (my fault). Also, install a check to prevent people from trying COPY BINARY to stdout/from stdin. No way that will work unless we redesign the frontend COPY protocol ... which is not worth the trouble in the near future ...
* Several compilation and run-time problems occur when building on SGIBruce Momjian2000-05-16
| | | | | | | | | | | | IRIX systems using the native compilers. A summary is: - Various files use "//" as a comment delimiter in c files. - Problems caused by assuming "char" is signed. cash.in: building -signed the rules regression test fails as described in FAQ_QNX4. If CHAR_MAX is "255U" then ((signed char)CHAR_MAX) is -1. postmaster.c: random number regression test failed without this change. - Some generic build issues and warning message cleanup. David Kaelbling
* Remove configure check for how to abbreviate 'tr A-Z a-z', and insteadTom Lane2000-05-16
| | | | | | | just use the portable form, tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz There were a bunch of places that weren't paying attention to configure's result anyway (including configure itself!?); clean them up too.
* Finally fix LISTEN problem.Bruce Momjian2000-05-14
|
* Tweak selectivity for area-based operators. Still a crock...Tom Lane2000-05-13
|
* This is the second time I've answered this exact same problem in twoBruce Momjian2000-05-12
| | | | | | | | | | | | | | | | | | | | | days. It seems to be a FAQ, and I think I know why. When creating a 'c' language function, CREATE FUNCTION is fed the shared object filename, and seems to succeed. Only when trying to use the function is an error thrown, by which time the coder thinks something's wrong with executing the code, not with loading it. I think I once saw it proposed to load shared objects at function creation time, but that idea was shot down on the grounds of resident memory bloat, ISTR. Here's a patch for a compromise: all it does is stat() the file, just like the loader code does, so that the errors caused by non existent files, and no directory 'x' permissions (the most common ones, it seems), get caught while the developer is still thinking about code loading. It doesn't catch all errors (like the code not being readable by the postgres user) but seems to catch the most common, without actually opening the file. What do you think? Ross
* Squash some more CLUSTER bugs. Never has worked on multiple-columnTom Lane2000-05-12
| | | | | | | | | | | | indexes, apparently, nor on functional indexes with more than one input column (force of natts = 1 was in the wrong branch of IF statement). Coredumped if source relation contained any uncommitted tuples, due to failure to test for success return from heap_fetch. Fetched tuple was passed directly to heap_insert, which clobbers the TID and commit status in the tuple header it's given, which meant that the source relation's tuples all got trashed as the copy proceeded. Abort partway through, and you're left with a lot of missing tuples. I wonder what else is lurking here ...
* Repair list-vs-node confusion that resulted in failure for INNER JOIN ON.Tom Lane2000-05-12
| | | | | Make it behave correctly when there are more than two tables being joined, also. Update regression test expected outputs.
* Makefile CFLAGS cleanups.Bruce Momjian2000-05-11
|
* Fix CLUSTER ... or at least undo the bit-rot it's suffered since 6.5.Tom Lane2000-05-11
| | | | | It's still pretty fundamentally bogus :-(. Freebie side benefit: ALTER TABLE RENAME works on indexes now.
* Make the indexes on pg_group be shared system relations.Tom Lane2000-05-05
|
* Don't leak a file descriptor when updating pg_pwd file. Also, check forTom Lane2000-05-04
| | | | failure of rename() call.
* Modify getdatabaseencoding(), pg_encoding_to_char()Tatsuo Ishii2000-05-02
| | | | | | pg_char_to_encoding() in multibyte disbaled case so that it does not throw an error, rather return HARD CODED default value (currently SQL_ASCII). This would solve the "non-mb backend vs. mb-enabled frontend" problem.
* Reset CurrentMemoryContext to TopMemoryContext at the beginning of errorTom Lane2000-04-30
| | | | | | | | | | | | cleanup, ie, as soon as we have caught the longjmp. This ensures that current context will be a valid context throughout error cleanup. Before it was possible that current context was pointing at a context that would get deleted during cleanup, leaving any subsequent pallocs in deep trouble. I was able to provoke an Assert failure when compiled with asserts + -DCLOBBER_FREED_MEMORY, if I did something that would cause an error to be reported by the backend large-object code, because indeed that code operates in a context that gets deleted partway through xact abort --- and CurrentMemoryContext was still pointing at it! Boo hiss.
* Remove bogus 'xid loop detected' check, which actually wasn't detectingTom Lane2000-04-30
| | | | loops, but just arbitrarily failing at 1000 locks.
* Setting statistic options from SET PG_OPTIONS caused a backend crashTom Lane2000-04-28
| | | | | because StatFp never got set in that case. Set it immediately before use to eliminate such problems.
* Except_Intersect_Rewrite() failed to ignore resjunk targetlist entries,Tom Lane2000-04-27
| | | | | thus causing failure if one sub-select had resjunk entries that the other did not (cf. bug report from Espinosa 4/27/00).
* Repair problem noted by Elphick: make_rels_by_joins failed to handleTom Lane2000-04-27
| | | | | | | | cases where joinclauses were present but some joins have to be made by cartesian-product join anyway. An example is SELECT * FROM a,b,c WHERE (a.f1 + b.f2 + c.f3) = 0; Even though all the rels have joinclauses, we must join two of them in cartesian style before we can use the join clause...
* -D switch to postmaster should override any PGDATA environment variableTom Lane2000-04-27
| | | | | that might be hanging about. Now it does ... amazing nobody noticed this before ...
* Tweak outUnique to include uniqColIdx[] field in the printout. This doesTom Lane2000-04-26
| | | | | not cause any compatibility problems because stored rules don't contain plan nodes --- in fact, we don't even have a readfunc for Unique nodes.
* On HPUX, shl_load should be called with options BIND_IMMEDIATE ratherTom Lane2000-04-26
| | | | | | | than BIND_DEFERRED. That way, if the loaded library has unresolved references, shl_load fails cleanly. As we had it, shl_load would succeed and then the dynlinker would call abort() when we try to call into the loaded library. abort()ing a backend is uncool.
* change reindex ERROR/NOTICE messageHiroshi Inoue2000-04-25
|
* Check that user-specified opclass in CREATE INDEX corresponds to operatorsTom Lane2000-04-25
| | | | that will actually work on the column datatype.
* Produce an appropriate error message when opclass is not supported byTom Lane2000-04-23
| | | | | specified index access method. Clean up wording of some existing error messages, too.
* 7.0 buffer manager can support different backends running with differentTom Lane2000-04-23
| | | | fsync settings, so the -F option no longer needs to be treated as secure.
* Clean up const-vs-not-const compiler warning in MULTIBYTE code.Tom Lane2000-04-20
| | | | 'Twas my fault, I think.
* Correct error in rewriter that caused SELECT count(*) FROM viewTom Lane2000-04-20
| | | | | | | to give wrong results: it should be looking at inJoinSet not inFromCl. Also, make 'modified' flag be local to ApplyRetrieveRule: we should append a rule's quals to the query iff that particular rule applies, not if we have fired any previously-considered rule for the query!