aboutsummaryrefslogtreecommitdiff
path: root/src/include
Commit message (Collapse)AuthorAge
* Allow libpq to build on MS Visual Studio .NET 2003 on Windows XP.Bruce Momjian2004-12-01
|
* Change planner to use the current true disk file size as its estimate ofTom Lane2004-12-01
| | | | | | | | | | | | | | | | | a relation's number of blocks, rather than the possibly-obsolete value in pg_class.relpages. Scale the value in pg_class.reltuples correspondingly to arrive at a hopefully more accurate number of rows. When pg_class contains 0/0, estimate a tuple width from the column datatypes and divide that into current file size to estimate number of rows. This improved methodology allows us to jettison the ancient hacks that put bogus default values into pg_class when a table is first created. Also, per a suggestion from Simon, make VACUUM (but not VACUUM FULL or ANALYZE) adjust the value it puts into pg_class.reltuples to try to represent the mean tuple density instead of the minimal density that actually prevails just after VACUUM. These changes alter the plans selected for certain regression tests, so update the expected files accordingly. (I removed join_1.out because it's not clear if it still applies; we can add back any variant versions as they are shown to be needed.)
* RelOptInfo.pages should really be declared as BlockNumber, not long.Tom Lane2004-11-26
|
* A client_encoding specification coming from the connection request hasTom Lane2004-11-24
| | | | | | | | | | to be processed by GUC before InitPostgres, because any required lookup of the encoding conversion function has to be done during InitializeClientEncoding. So, I broke this last week by moving GUC processing to after InitPostgres :-(. What we can do as a compromise is process non-SUSET variables during command line scanning (the same as before), and postpone the processing of only SUSET variables. None of the SUSET variables need to be set before InitPostgres.
* Miscellaneous Cygwin build fixes from Reini Urban.Tom Lane2004-11-17
|
* Install include/port header files, and fix PGXS build to use them.Tom Lane2004-11-17
| | | | Fabien COELHO
* Fix Win32 problems with signals and sockets, by making the forkexec codeTom Lane2004-11-17
| | | | | | even uglier than it was already :-(. Also, on Windows only, use temporary shared memory segments instead of ordinary files to pass over critical variable values from postmaster to child processes. Magnus Hagander
* Rethink plpgsql's way of handling SPI execution during an exception block.Tom Lane2004-11-16
| | | | | | | | | We don't really want to start a new SPI connection, just keep using the old one; otherwise we have memory management problems as illustrated by John Kennedy's bug report of today. This requires a bit of a hack to ensure the SPI stack state is properly restored, but then again what we were doing before was a hack too, strictly speaking. Add a regression test to cover this case.
* Remove GUC USERLIMIT variable category, making the affected variablesTom Lane2004-11-14
| | | | | | | plain SUSET instead. Also delay processing of options received in client connection request until after we know if the user is a superuser, so that SUSET values can be set that way by legitimate superusers. Per recent discussion.
* Fix obsolete comments.Tom Lane2004-11-12
|
* Put in place some defenses against being fooled by accidental match ofTom Lane2004-11-09
| | | | | | | | | shared memory segment ID. If we can't access the existing shmem segment, it must not be relevant to our data directory. If we can access it, then attach to it and check for an actual match to the data directory. This should avoid some cases of failure-to-restart-after-boot without introducing any significant risk of failing to detect a still-running old backend.
* Delete the `remove-old-headers' target, as it is no longer useful. PatchNeil Conway2004-11-09
| | | | from Alvaro Herrera.
* Use a hopefully-more-reliable method of detecting default selectivityTom Lane2004-11-09
| | | | | | | | | | | estimates when combining the estimates for a range query. As pointed out by Miquel van Smoorenburg, the existing check for an impossible combined result would quite possibly fail to detect one default and one non-default input. It seems better to use the default range query estimate in such cases. To do so, add a check for an estimate of exactly DEFAULT_INEQ_SEL. This is a bit ugly because it introduces additional coupling between clauselist_selectivity and scalarltsel/scalargtsel, but it's not like there wasn't plenty already...
* Update workding on why we use is_absolute_path() as a macro.Bruce Momjian2004-11-08
|
* Add code to find_my_exec() to resolve a symbolic link down to theTom Lane2004-11-06
| | | | | | actual executable location. This allows people to continue to use setups where, eg, postmaster is symlinked from a convenient place. Per gripe from Josh Berkus.
* When implementing a coercion to a domain type with a combinedTom Lane2004-11-06
| | | | | | type-and-length coercion function, make sure that the coercion function is told the correct typmod. Fixes Kris Jurka's example of a domain over bit(N).
* Code cleanup in path.c and exec.c. Handle Windows drive and network specsTom Lane2004-11-06
| | | | | | everywhere not just some places, get rid of . and .. when joining path sections together. This should eliminate most of the ugly paths like /foo/bar/./baz that we've been generating.
* Create 'default_tablespace' GUC variable that supplies a TABLESPACETom Lane2004-11-05
| | | | | | | | | | clause implicitly whenever one is not given explicitly. Remove concept of a schema having an associated tablespace, and simplify the rules for selecting a default tablespace for a table or index. It's now just (a) explicit TABLESPACE clause; (b) default_tablespace if that's not an empty string; (c) database's default. This will allow pg_dump to use SET commands instead of tablespace clauses to determine object locations (but I didn't actually make it do so). All per recent discussions.
* Don't create $DESTDIR/include/internal/lib, as it is no longer used.Neil Conway2004-11-03
|
* Invent pg_next_dst_boundary() and rewrite DetermineLocalTimeZone() toTom Lane2004-11-01
| | | | | | | | | | | | use it, as per my proposal of yesterday. This gives us a means of determining the zone offset to impute to an unlabeled timestamp that is both efficient and reliable, unlike all our previous tries involving mktime() and localtime(). The behavior for invalid or ambiguous times at a DST transition is fixed to be really and truly "assume standard time", fixing a bug that has come and gone repeatedly but was back again in 7.4. (There is some ongoing discussion about whether we should raise an error instead, but for the moment I'll make it do what it was previously intended to do.)
* I found a corner case in which it is possible for RI_FKey_check's callTom Lane2004-10-30
| | | | | | | | | | | | | | of HeapTupleSatisfiesItself() to trigger a hint-bit update on the tuple: if the row was updated or deleted by a subtransaction of my own transaction that was later rolled back. This cannot occur in pre-8.0 of course, so the hint-bit patch applied a couple weeks ago is OK for existing releases. But for 8.0 it seems we had better fix things so that RI_FKey_check can pass the correct buffer number to HeapTupleSatisfiesItself. Accordingly, add fields to the TriggerData struct to carry the buffer ID(s) for the old and new tuple(s). There are other possible solutions but this one seems cleanest; it will allow other AFTER-trigger functions to safely do tqual.c calls if they want to. Put new fields at end of struct so that there is no API breakage.
* Trivial fix: clarify a comment.Neil Conway2004-10-27
|
* Fix tsearch build problems.Tom Lane2004-10-22
| | | | Magnus Hagander
* Add a GUC_SUPERUSER_ONLY flag to mark GUC variables that should not beTom Lane2004-10-22
| | | | | | | | examinable by non-superusers, and use it to protect the recently-added GUC variables for data directory and config files. For now I have only flagged those variables that could be used to deduce something about the server's filesystem layout, but possibly we should also mark vars related to logging settings and other admin-only information?
* In ALTER COLUMN TYPE, strip any implicit coercion operations appearingTom Lane2004-10-22
| | | | | | at the top level of the column's old default expression before adding an implicit coercion to the new column type. This seems to satisfy the principle of least surprise, as per discussion of bug #1290.
* Allow functions returning void or cstring to appear in FROM clause,Tom Lane2004-10-20
| | | | | | to make life cushy for the JDBC driver. Centralize the decision-making that affects this by inventing a get_type_func_class() function, rather than adding special cases in half a dozen places.
* Remove use of "miscadmin.h" in port C files and remove test for frontendBruce Momjian2004-10-18
| | | | in miscadmin.h.
* The attached patch fixes psql's win32 frontend-only build, by usingBruce Momjian2004-10-18
| | | | | | | pg_strcasecmp in variables.c, and #ifdef'ing out PostmasterPid in miscadmin.h. Dave Page
* Give a more user-friendly error message in situation where CREATE DATABASETom Lane2004-10-17
| | | | | | | specifies a new default tablespace and the template database already has some tables in that tablespace. There isn't any way to solve this fully without modifying the clone database's pg_class contents, so for now the best we can do is issue a better error message.
* Remove dllist.c from libpq. It's overkill for what libpq needs; we canTom Lane2004-10-16
| | | | | | | just stick a list-link into struct PGnotify instead. Result is a smaller faster and more robust library (mainly because we reduce the number of malloc's and free's involved in notify processing), plus less pollution of application link-symbol namespace.
* Give the ResourceOwner mechanism full responsibility for releasing bufferTom Lane2004-10-16
| | | | | | | | pins at end of transaction, and reduce AtEOXact_Buffers to an Assert cross-check that this was done correctly. When not USE_ASSERT_CHECKING, AtEOXact_Buffers is a complete no-op. This gets rid of an O(NBuffers) bottleneck during transaction commit/abort, which recent testing has shown becomes significant above a few tens of thousands of shared buffers.
* Remove BufferLocks[] array in favor of a single pointer to the bufferTom Lane2004-10-16
| | | | | | (if any) currently waited for by LockBufferForCleanup(), which is all that we were using it for anymore. Saves some space and eliminates proportional-to-NBuffers slowdown in UnlockBuffers().
* Repair possible failure to update hint bits back to disk, perTom Lane2004-10-15
| | | | | | | | | | http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php. This fix is intended to be permanent: it moves the responsibility for calling SetBufferCommitInfoNeedsSave() into the tqual.c routines, eliminating the requirement for callers to test whether t_infomask changed. Also, tighten validity checking on buffer IDs in bufmgr.c --- several routines were paranoid about out-of-range shared buffer numbers but not about out-of-range local ones, which seems a tad pointless.
* Fix OR-index-scan planner to recognize that a partial index is usableTom Lane2004-10-11
| | | | | | | | | | | | | | | | | | | | | for scanning one term of an OR clause if the index's predicate is implied by that same OR clause term (possibly in conjunction with top-level WHERE clauses). Per recent example from Dawid Kuroczko, http://archives.postgresql.org/pgsql-performance/2004-10/msg00095.php Also, fix a very long-standing bug in index predicate testing, namely the bizarre ordering of decomposition of predicate and restriction clauses. AFAICS the correct way is to break down the predicate all the way, and then for each component term see if you can prove it from the entire restriction set. The original coding had a purely-implementation-artifact distinction between ANDing at the top level and ANDing below that, and proceeded to get the decomposition order wrong everywhere below the top level, with the result that even slightly complicated AND/OR predicates could not be proven. For instance, given create index foop on foo(f2) where f1=42 or f1=1 or (f1 = 11 and f2 = 55); the old code would fail to match this index to the query select * from foo where f1 = 11 and f2 = 55; when it obviously ought to match.
* Use native Cygwin symlinks so tablespaces work on Win95/98/ME whichBruce Momjian2004-10-11
| | | | don't support junction points. Doesn't affect native Win32.
* Fix pg_indexes view so that it shows the index's tablespace not theTom Lane2004-10-11
| | | | | | parent table's tablespace, as per gripe from Michael Kleiser. Choose a more plausible column order for this view and pg_tables. Update documentation of these views, which was missed in original patch.
* Adjust configuration-files GUC behavior as per my recent proposal.Tom Lane2004-10-09
| | | | | | | | The vars are renamed to data_directory, config_file, hba_file, and ident_file, and are guaranteed to be set to accurate absolute paths during postmaster startup. This commit does not yet do anything about hiding path values from non-superusers.
* Whack some sense into the configuration-file-location patch.Tom Lane2004-10-08
| | | | | | | Refactor code into something reasonably understandable, cause use of the feature to not fail in standalone backends or in EXEC_BACKEND case, fix sloppy guc.c table entries, make the documentation minimally usable.
* Fix problems with SQL functions returning rowtypes that have droppedTom Lane2004-10-07
| | | | | | | | | | | | columns. The returned tuple needs to have appropriate NULL columns inserted so that it actually matches the declared rowtype. It seemed convenient to use a JunkFilter for this, so I made some cleanups and simplifications in the JunkFilter code to allow it to support this additional functionality. (That in turn exposed a latent bug in nodeAppend.c, which is that it was returning a tuple slot whose descriptor didn't match its data.) Also, move check_sql_fn_retval out of pg_proc.c and into functions.c, where it seems to more naturally belong.
* Prevent install error message when doing cmp on empty tree.Bruce Momjian2004-10-07
|
* Adjust comments previously moved to column 1 by pgident.Bruce Momjian2004-10-07
|
* Document what the "rep; nop" x86 assembler sequence is actually equivalentNeil Conway2004-10-06
| | | | to, and what it is intended to do.
* Fix improper defines for uid_t and gid_t. Had them backwards.Bruce Momjian2004-10-06
|
* Use #define instead of typedef for plperl because perl definesBruce Momjian2004-10-06
| | | | uid_t/gid_t too.
* Here is a patch to fix win32 ssl builds. Summary of changes:Bruce Momjian2004-10-06
| | | | | | | | | | | | | | | | | | | | | * Links with -leay32 and -lssleay32 instead of crypto and ssl. On win32, "crypto and ssl" is only used for static linking. * Initializes SSL in the backend and not just in the postmaster. We cannot pass the SSL context from the postmaster through the parameter file, because it contains function pointers. * Split one error check in be-secure.c. Previously we could not tell which of three calls actually failed. The previous code also returned incorrect error messages if SSL_accept() failed - that function needs to use SSL_get_error() on the return value, can't just use the error queue. * Since the win32 implementation uses non-blocking sockets "behind the scenes" in order to deliver signals correctly, implements a version of SSL_accept() that can handle this. Also, add a wait function in case SSL_read or SSL_write() needs more data. Magnus Hagander
* please find attached an alternate submission which addresses open itemBruce Momjian2004-10-06
| | | | | | | | | | | | | "make pgxs install by default". It is up to the committers to chose. (1) there is only one "install" target. no more "install-all-headers". it simplifies/changes several makefiles. (2) the documentation reflects the change. (3) a minor fix on pgxs to use a nicer patch without a double slash. Fabien Coelho
* Fix typo in recent Win32 typedef change.Bruce Momjian2004-10-05
|
* Remove unused Win32 defines, convert them to typdefs, per suggestionBruce Momjian2004-10-05
| | | | from Peter.
* Remove arithmetic operators on the 1-byte-char datatype, as per proposalsTom Lane2004-10-04
| | | | | | | made several times in the past. Add coercion functions between "char" and integer so that a workaround is possible if needed. Initdb forced.
* Correct the volatility labeling of ten timestamp-related functions,Tom Lane2004-10-04
| | | | | per discussion from Friday. initdb not forced in this commit but I intend to do that later.