Commit Graph

18059 Commits

Author SHA1 Message Date
Bruce Momjian 57d2665108 Fix Makefile syntax. Forgot to test this. 2004-06-19 15:14:17 +00:00
Bruce Momjian 3101181e9e Add changes to support threads on Win32 native port at some point in the future. 2004-06-19 04:43:18 +00:00
Bruce Momjian af70d57825 Enable thread safety for win32.mak build of PostgreSQL.
Andreas Pflug
2004-06-19 04:22:17 +00:00
Bruce Momjian 1181ea6a78 Add:
> * Fix oid2name and dbsize for tablespaces
2004-06-19 01:48:13 +00:00
Tom Lane f7ca71a76b Replace createdb's obsolete --location switch with --tablespace.
I kept the same abbreviated letter -D, in hopes of maintaining some
modicum of backwards compatibility (though it's doubtful whether anyone
is really using scripts that invoke createdb -D ...)
2004-06-18 21:47:24 +00:00
Tom Lane 984c8a48f4 initlocation is history. (It's still mentioned in manage-ag.sgml,
but I'll leave that file alone so as not to mess up the doc patch
I trust Gavin is working on.)
2004-06-18 21:24:06 +00:00
Bruce Momjian b33c7231e5 Add:
> * Allow reporting of which objects are in which tablespaces
> * Allow database recovery where tablespaces can't be created
211a213,214
> 	o Add ALTER TABLESPACE to change location, name, owner
> 	o Allow objects to be moved between tablespaces
2004-06-18 18:35:53 +00:00
Bruce Momjian 9e24182952 Remove tablespaces TODO.detail. 2004-06-18 16:04:13 +00:00
Bruce Momjian 0d1ffd36c4 Done:
> * -Add the concept of dataspaces/tablespaces (Gavin)
2004-06-18 16:03:20 +00:00
Tom Lane 2467394ee1 Tablespaces. Alternate database locations are dead, long live tablespaces.
There are various things left to do: contrib dbsize and oid2name modules
need work, and so does the documentation.  Also someone should think about
COMMENT ON TABLESPACE and maybe RENAME TABLESPACE.  Also initlocation is
dead, it just doesn't know it yet.

Gavin Sherry and Tom Lane.
2004-06-18 06:14:31 +00:00
Bruce Momjian 474875f443 The attached patch adds some index entries pointing to the cursor
reference pages.  Please apply.

Alvaro Herrera
2004-06-17 12:41:02 +00:00
Michael Meskes 5f3edded81 Added patch by ISHIDA Akio to allow indicators in execute statements. 2004-06-17 11:52:25 +00:00
Bruce Momjian 1d2dbf0797 Improve comment. 2004-06-16 03:01:32 +00:00
Bruce Momjian e854bc4ac7 Do PGAC_FUNC_GETPWUID_R_5ARG and PGAC_FUNC_STRERROR_R_INT tests with the
same thread flags that will be used to compile thread.c.  Add comment to
make sure no one breaks it.
2004-06-16 02:58:28 +00:00
Tom Lane d70a42e642 Represent type-specific length coercion functions as pg_cast entries,
eliminating the former hard-wired convention about their names.  Allow
pg_cast entries to represent both type coercion and length coercion in
a single step --- this is represented by a function that takes an
extra typmod argument, just like a length coercion function.  This
nicely merges the type and length coercion mechanisms into something
at least a little cleaner than we had before.  Make use of the single-
coercion-step behavior to fix integer-to-bit coercion so that coercing
to bit(n) yields the rightmost n bits of the integer instead of the
leftmost n bits.  This should fix recurrent complaints about the odd
behavior of this coercion.  Clean up the documentation of the bit string
functions, and try to put it where people might actually find it.
Also, get rid of the unreliable heuristics in ruleutils.c about whether
to display nested coercion steps; instead require parse_coerce.c to
label them properly in the first place.
2004-06-16 01:27:00 +00:00
Tom Lane 8e7349b738 Fix doc bug: to_timestamp() returns timestamptz, not plain timestamp. 2004-06-14 19:01:09 +00:00
Tom Lane bbe42a1514 Arrange to explicitly stop the pgstat processes at the same time we
begin the shutdown checkpoint; there isn't anything left for them to do,
so we may as well ensure that they shut down sooner rather than later.
Per discussion.
2004-06-14 18:08:19 +00:00
Bruce Momjian f4b0d28aa0 New wording:
<   in-progress when the server terminates abruptly
>   in-progress when the server terminated abruptly
2004-06-14 13:44:00 +00:00
Bruce Momjian 8b8bbfff45 New wording:
<   in-progress when the server crashed
>   in-progress when the server terminates abruptly
2004-06-14 13:42:47 +00:00
Tatsuo Ishii 2990b8a4a6 Add missing PQclear(). 2004-06-14 11:00:12 +00:00
Bruce Momjian dd83b34d38 Updated wording:
< * Remove unreferenced table files and temp tables during database vacuum
<   or postmaster startup (Bruce)
> * Remove unreferenced table files created by transactions that were
>   in-progress when the server crashed
>
2004-06-13 23:42:59 +00:00
Bruce Momjian 75c8e51b08 Re-add:
> * Remove unreferenced table files and temp tables during database vacuum
>   or postmaster startup (Bruce)
2004-06-13 23:39:30 +00:00
Tom Lane 950d047ec5 Give inet/cidr datatypes their own hash function that ignores the inet vs
cidr type bit, the same as network_eq does.  This is needed for hash joins
and hash aggregation to work correctly on these types.  Per bug report
from Michael Fuhr, 2004-04-13.
Also, improve hash function for int8 as suggested by Greg Stark.
2004-06-13 21:57:28 +00:00
Peter Eisentraut 0e338bba42 Remove README.CVS when making a distribution. 2004-06-13 21:51:36 +00:00
Peter Eisentraut c0dff99dbc Translation update 2004-06-13 21:41:33 +00:00
Tom Lane ba0f9ff3ba Code review for recently-added network functions. Get it to work when
log_hostname is enabled, clean up documentation.
2004-06-13 19:56:52 +00:00
Tom Lane 88961fc45d Correct erroneous table title, per Halley Pacheco de Oliveira. 2004-06-13 17:51:08 +00:00
Tom Lane 83db69bebc Now needs to include <ctype.h>. 2004-06-12 20:31:43 +00:00
Tom Lane 4832c53e10 Some editorializing on 7.4.3 release notes. 2004-06-12 19:30:29 +00:00
Bruce Momjian aa5fe4ae76 Improve release wording. 2004-06-12 04:22:15 +00:00
Bruce Momjian b24e361d11 Markup fix. 2004-06-12 04:08:02 +00:00
Bruce Momjian 342e3b06f8 Fix markup 2004-06-12 04:02:53 +00:00
Bruce Momjian a1c4b9efe4 Update release notes for 7.4.3. 2004-06-12 03:54:51 +00:00
Bruce Momjian eebad1a74f ECPG preprocessor for PostgreSQL 7.4.1, 7.4.2 doubles const,
volatile, static, and register keywords before variables,
declared as VARCHAR.

Sergey N. Yatskevich
2004-06-11 17:32:39 +00:00
Tom Lane bbf0ebadaf StrategyDirtyBufferList wasn't being careful to honor max_buffers limit.
Bug is only latent given that sole caller is passing NBuffers, but it
could bite someone in the rear someday.
2004-06-11 17:20:39 +00:00
Bruce Momjian 2597056cc3 Use sizeof() rather than strlen() in array size. 2004-06-11 17:09:13 +00:00
Tom Lane e6cba71503 Add some code to Assert that when we release pin on a buffer, we are
not holding the buffer's cntx_lock or io_in_progress_lock.  A recent
report from Litao Wu makes me wonder whether it is ever possible for
us to drop a buffer and forget to release its cntx_lock.  The Assert
does not fire in the regression tests, but that proves little ...
2004-06-11 16:43:24 +00:00
Bruce Momjian 8d64b56206 Cleanup use of Win32 START by using "" for title. No need for temp
batch files anymore.
2004-06-11 16:36:31 +00:00
Bruce Momjian 800910fe97 Add URL about Win32 quoting behavior. 2004-06-11 16:10:09 +00:00
Bruce Momjian eae2a7204f Another fix for Win32 START. 2004-06-11 04:17:21 +00:00
Bruce Momjian 1261fe18ff The attached tiny patch removes spurious carriage returns that might be
copied by the script that generates psql's help. (You can get the
spurious CRs if you use a CVS client on Windows that does line end
translation.)  Elsewhere, the patch should be totally benign.

This removes quite a number of the compile warnings I posted the other
day.

Andrew Dunstan
2004-06-11 03:56:46 +00:00
Bruce Momjian 3a8cdf33aa >> It certainly doesn't. There still was a bug with the locale stuff,
>> though - the GUC variable was not set in the child
>processes. So "show
>> lc_collate" would *always* return "C", for example. attached
>patch fixes
>> this.
>
>Hm.  Why were these vars not propagated by the regular
>mechanism for GUC
>variables (write_nondefault_variables or whatever it's called)?  If the
>problem is that it's not accepting PGC_INTERNAL values, then we need to
>fix it there not here, because otherwise we'll have to pass all the
>PGC_INTERNAL variables through the backend_variables file, which seems
>like a recipe for more of the same sort of bug.


Good point :-(

I think the problem is not only that it specifically does not deal with
PGC_INTERNAL variables. The problem is in the fact that
write_nondefault_variables is called *before* the locale is read
(because the locale is read from pg_control and not from any of the
"usual" ways to read it).

Attached patch is another stab at fixing it. It makes postmaster dump a
new copy of the file once it has started the database (before it accepts
any connections), which is when it will know about these parameters.
Also updates the reading code to set the context to the one where the
variable was originally set (PGC_POSTMASTER won't work for PGC_INTERNAL,
and the other way around).

We still pass lc_collate through the special file, because
set_config_option on lc_collate will speficially *not* call setlocale(),
and we need that call. But we no longer call set_config_option from
there.

Magnus Hagander
2004-06-11 03:54:54 +00:00
Bruce Momjian a28d04e6ee This patch updates pgpipe() on win32 to log exactly which part of the
call fails when it does. (As it is now, there is no way to figure out
the point of error). Shouldn't be a problem since it's most defintily
not a performance-critical path (only called on pgstat startup ATM).

This should help us debug the pipe error message that's on the win32
status page (which I myself have never been able to reproduce, and thus
haven't figured out a better way to debug yet)

Magnus Hagander
2004-06-11 03:48:35 +00:00
Tom Lane 7643bed58e When using extended-query protocol, postpone planning of unnamed statements
until Bind is received, so that actual parameter values are visible to the
planner.  Make use of the parameter values for estimation purposes (but
don't fold them into the actual plan).  This buys back most of the
potential loss of plan quality that ensues from using out-of-line
parameters instead of putting literal values right into the query text.

This patch creates a notion of constant-folding expressions 'for
estimation purposes only', in which case we can be more aggressive than
the normal eval_const_expressions() logic can be.  Right now the only
difference in behavior is inserting bound values for Params, but it will
be interesting to look at other possibilities.  One that we've seen
come up repeatedly is reducing now() and related functions to current
values, so that queries like ... WHERE timestampcol > now() - '1 day'
have some chance of being planned effectively.

Oliver Jowett, with some kibitzing from Tom Lane.
2004-06-11 01:09:22 +00:00
Bruce Momjian 5fe8c7d6e5 More restructuring to use Win32 START with paths needing quotes. 2004-06-11 00:57:25 +00:00
Bruce Momjian 6cc4175b25 Attached is a patch that takes care of the PATHSEP issue. I made a more
extensive change then what was suggested. I found the file path.c that
contained a lot of "Unix/Windows" agnostic functions so I added a function
there instead and removed the PATHSEP declaration in exec.c altogether. All
to keep things from scattering all over the code.

I also took the liberty of changing the name of the functions
"first_path_sep" and "last_path_sep". Where I come from (and I'm apparently
not alone given the former macro name PATHSEP), they should be called
"first_dir_sep" and "last_dir_sep". The new function I introduced, that
actually finds path separators, is now the "first_path_sep". The patch
contains changes on all affected places of course.

I also changed the documentation on dynamic_library_path to reflect the
chagnes.

Thomas Hallgren
2004-06-10 22:26:24 +00:00
Bruce Momjian d4117de50a More quoting cleanups for Win32's pg_ctl. 2004-06-10 22:20:53 +00:00
Tom Lane 3485cc3a7c Adjust cost_nonsequential_access() to have more reasonable behavior
when random_page_cost has a small value.  Per Manfred Koizar, though
I didn't use his equation exactly.
2004-06-10 21:02:00 +00:00
Bruce Momjian 387b38bec4 Done:
> * -Print table names with constraint names in error messages, or make constraint
2004-06-10 19:04:49 +00:00
Tom Lane 36af1dd299 Make ALTER TABLE ADD SERIAL work reasonably in inheritance cases, too. 2004-06-10 18:34:45 +00:00