Commit Graph

18411 Commits

Author SHA1 Message Date
Bruce Momjian
bf831f6e9f Back out timezone detection patch. Tom already applied it. 2004-09-02 01:15:06 +00:00
Bruce Momjian
525449be27 This patch attempts to fix the issue with localized timezones on
Windows.

Recap: When running on a localized windows version, the timezone name
returned is also localized, and therefor does not match our lookup
table.

Solution: The registry contains both the name of the timezone in english
and the localized name. The patch adds code to scan the registry for the
localized name and gets the english name from that, and then rescans the
table.

I have tested this on a Swedish WinXP, and it works without problems.
The registry layout is the same in Win2k, but I haven't specifically
tested it. It's also the same on different languages but again only
Swedish is tested.

Magnus Hagander
2004-09-02 01:03:59 +00:00
Bruce Momjian
528ac10c7c The current implementation of dbsize doesn't handle tables in
tablespaces correctly, and is quite restricted on objects covered (only
tables and databases, but not tablespaces and indexes).

The attached patch contributes:

- database_size(name)
- relation_size(text)
These are the well-known functions, tablespace-aware.

- pg_tablespace_size(oid)
- pg_database_size(oid)
- pg_relation_size(oid)
Tablespace-aware implementations, used by the upper functions.
pg_relation_size will report sizes of indexes as well.

- pg_size_pretty(bigint)
Formatting of sizes, to display '146MB' instead of '152885668'

Andreas Pflug
2004-09-02 00:55:22 +00:00
Tom Lane
e814e4bfe5 Remove obsolete comment. 2004-09-02 00:22:16 +00:00
Tom Lane
e41acf4029 Tweak prettyprinting rules for saner indenting of UNION, INTERSECT,
EXCEPT constructs.
2004-09-01 23:58:38 +00:00
Bruce Momjian
453c670b61 Fix bcc to compile libpq by creating include file for path.c. 2004-09-01 23:45:16 +00:00
Bruce Momjian
4fa8b44749 Realign libpq and psql for need for path.c under Win32 VC and BCC. 2004-09-01 23:35:16 +00:00
Bruce Momjian
bd9b951191 Back out Cygwin timezone change until we have a more global solution. 2004-09-01 18:59:35 +00:00
Tom Lane
93dc1d4685 Fix mistaken comment. 2004-09-01 18:04:32 +00:00
Tom Lane
272cc8e265 Whack Wisconsin benchmark around until it actually works again.
It's still useless because it tests a standalone backend, but at least
the bit rot is repaired.
2004-09-01 17:25:40 +00:00
Tom Lane
d1b2260cdc Add code to be able to match the timezone name on localized Windows
systems.  Magnus Hagander.
2004-09-01 16:21:50 +00:00
Tom Lane
0b143dd725 Remove a stray reference to sequences as having tablespaces. 2004-09-01 14:09:19 +00:00
Dennis Bjorklund
b3d3e27bb8 Translation updates 2004-09-01 10:11:08 +00:00
Tom Lane
3ff8cc45ad Add a note about the difference between Postgres' treatment of the rights
of an object owner and the SQL spec's treatment of these rights.
2004-09-01 04:13:11 +00:00
Bruce Momjian
33f395eada Cast _timezone to int from time_t for Cygwin. 2004-09-01 04:02:06 +00:00
Bruce Momjian
90e1ac9292 Add index mention:
<P>In pre-8.0 releases, indexes often can not be used unless the data
    types exactly match the index's column types.  This is particularly
    true of int2, int8, and numeric column indexes.</P>
2004-09-01 03:28:15 +00:00
Bruce Momjian
2a5f83c17c src/bin/psql/tab-complete.c =~ s/CONVERSATION/CONVERSION/;
Greg Sabino Mullane
2004-09-01 00:10:01 +00:00
Tom Lane
e19f6bcf64 needs_toast_table() should ignore dropped columns. 2004-08-31 23:27:05 +00:00
Tom Lane
1239a01a72 Code review for recent changes in guc-file.l. Avoid multiple frees,
use of already-freed strings, other silliness.  Also fix reporting of
config file syntax errors so that it actually works reasonably well
(eg, points at the correct line).  Use palloc instead of malloc for
temporary storage to reduce code clutter.
2004-08-31 22:43:58 +00:00
Tom Lane
c32416ebb7 Code review for various recent GUC hacking. Don't elog(ERROR) when
not supposed to (fixes problem with postmaster aborting due to mistaken
postgresql.conf change); don't call superuser() when not inside a
transaction (fixes coredump when, eg, try to set log_statement from
PGOPTIONS); some message style guidelines enforcement.
2004-08-31 19:28:51 +00:00
Tom Lane
617d6ea7df Fix unintended assignment of sequences to the containing schema's
default tablespace --- they should always go in the database's default
tablespace.  Adjust heap_create() API so that it is passed the relkind
to make this easier; should simplify any further tweaking of the same
sort.
2004-08-31 17:10:36 +00:00
Tom Lane
a421b4e850 FlushRelationBuffers was also being a bit cavalier about whether the
relation is already opened by smgr.
2004-08-31 16:13:06 +00:00
Tom Lane
556110f4e0 copy_relation_data was mistakenly assuming that the source relation
would always be already open at the smgr level.  Per bug report from
Fabien Coelho.
2004-08-31 15:56:39 +00:00
Bruce Momjian
b4456e6d6a Define lstat with parameters, rather than just redefining the symbol. 2004-08-31 11:29:56 +00:00
Bruce Momjian
2e88d29f88 Fix typo in lstat() macro exposed by new tablespace code. 2004-08-31 11:25:33 +00:00
Tom Lane
8c603f2c95 Replace log_filename_prefix with more general log_filename parameter,
to allow DBA to choose the form in which log filenames reflect the
current time.  Also allow for truncating instead of appending to
pre-existing files --- this is convenient when the log filename pattern
rewrites the same names cyclically.  Per Ed L.
2004-08-31 04:53:44 +00:00
PostgreSQL Daemon
25aba1cafd tag configure beta2 2004-08-31 04:08:33 +00:00
Tom Lane
332ee2dc41 Improve spinlock selftest to make it able to detect misdeclaration of
the slock_t datatype (ie, declared type smaller than what the hardware
TAS instruction needs).
2004-08-30 23:47:20 +00:00
Tom Lane
17364edce6 slock_t must be int not char for MIPS. 7.4 got this right, but the
info was apparently mistranscribed in s_lock code rearrangement.
2004-08-30 22:49:07 +00:00
Tom Lane
26b7c04b37 Avoid ambiguity, as per suggestion from Peter Stricker. 2004-08-30 21:29:12 +00:00
Tom Lane
8226f503ef Rather than referring to src/tutorial/README, put the build instructions
for the tutorial files right here.
2004-08-30 21:25:27 +00:00
Tom Lane
c7040429e7 Fix obviously-utterly-untested noTocComments code. 2004-08-30 19:44:14 +00:00
Tom Lane
64cb889106 Ensure that the remainder of the current pg_clog page is zeroed during
startup, just to be sure that there's no leftover junk there.
2004-08-30 19:00:42 +00:00
Tom Lane
9cf4eaa00b Fix failure to advance nextXID beyond subtransactions whose XIDs appear
only within COMMIT or ABORT records.
2004-08-30 19:00:03 +00:00
Bruce Momjian
af8406bb2a Remove item because it is on the open item list:
< * Fix oid2name and dbsize for tablespaces
2004-08-30 16:08:20 +00:00
Tom Lane
303e46ea93 Tweak md.c logic to cope with the situation where WAL replay tries to
write into a high-numbered segment of a relation that was later deleted.
We need to temporarily recreate missing segment files, instead of
failing.
2004-08-30 03:52:43 +00:00
Tom Lane
09c6ac9513 Dept. of second thoughts: it'd be a good idea to flush buffers
during replay of CREATE DATABASE as well as the first time around.
Else it's possible that the copy operation will copy obsolete blocks.
We are still a long way from guaranteeing anything about using a
recently-written database as a CREATE template, but this seems needed
to ensure the existing behavior holds up during replay.
2004-08-30 03:50:24 +00:00
Bruce Momjian
3afd7eaffd Add Win32 service capability to pg_autovacuum.
Dave Page
2004-08-30 03:31:29 +00:00
Bruce Momjian
15d3f9f6b7 Another pgindent run with lib typedefs added. 2004-08-30 02:54:42 +00:00
Tom Lane
166300f318 Add note that contrib/rserv is gone. 2004-08-30 00:47:31 +00:00
Tom Lane
79abc3b0de Add explicit note that empty-string array element values now have to
be written with quotes.  Minor copy-editing too.
2004-08-30 00:33:52 +00:00
Tom Lane
50742aed68 Add WAL logging for CREATE/DROP DATABASE and CREATE/DROP TABLESPACE.
Fix TablespaceCreateDbspace() to be able to create a dummy directory
in place of a dropped tablespace's symlink.  This eliminates the open
problem of a PANIC during WAL replay when a replayed action attempts
to touch a file in a since-deleted tablespace.  It also makes for a
significant improvement in the usability of PITR replay.
2004-08-29 21:08:48 +00:00
Bruce Momjian
ee66401f31 Update typedefs with /lib info. 2004-08-29 17:31:42 +00:00
Tom Lane
b83e592671 Replace bcopy by memmove for more portability. 2004-08-29 16:43:05 +00:00
Tom Lane
0ffe11abd3 Widen xl_len field of XLogRecord header to 32 bits, so that we'll have
a more tolerable limit on the number of subtransactions or deleted files
in COMMIT and ABORT records.  Buy back the extra space by eliminating the
xl_xact_prev field, which isn't being used for anything and is rather
unlikely ever to be used for anything.
This does not force initdb, but you do need to do pg_resetxlog if you
want to upgrade an existing 8.0 installation without initdb.
2004-08-29 16:34:48 +00:00
Bruce Momjian
b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian
90cb9c3051 Update with new typedefs. Remove java and c++ parts of readme. 2004-08-29 04:49:45 +00:00
Bruce Momjian
da9a8649d8 Update copyright to 2004. 2004-08-29 04:13:13 +00:00
Bruce Momjian
466c1290df Fix for postmaster.c function win32_waitpid(int *exitstatus) call to
Win32 WaitForMultipleObjects:

	ret = WaitForMultipleObjects(win32_numChildren, win32_childHNDArray,
	FALSE, 0);

Problem is 'win32_numChildren' could be more then 64 ( function supports
), problem basically arise ( kills postgres ) when you create more then
64 connections and terminate some of them sill leaving more then 64.

Claudio Natoli
2004-08-29 03:16:30 +00:00
Bruce Momjian
71fce6ce1b Adjust regression expected file for new grant language hint. 2004-08-29 03:14:07 +00:00