Bruce Momjian [Wed, 10 Nov 2004 05:47:07 +0000 (05:47 +0000)]
Done:
<
< * psql tab completion
<
< o Provide a list of conversions after ALTER CONVERSION?
< o Support for ALTER SEQUENCE clauses
< o Add RENAME TO to ALTER TRIGGER
< o Support for ALTER USER
< o Fix ALTER (GROUP|DOMAIN|...) <sth> DROP
< o Support for ALTER LANGUAGE <sth> RENAME TO
< o Improve support for COPY
< o Improve support for ALTER TABLE
Bruce Momjian [Wed, 10 Nov 2004 02:48:41 +0000 (02:48 +0000)]
Add bitmap info:
< heap page to find matching rows.
> heap page to find matching rows, or perhaps use a mixed solution where
> tids are recorded for pages with only a few matches and per-page bitmaps
> are used for more dense pages. Another idea is to use a 32-bit bitmap
> for every page and set a bit based on the item number mod(32).
Tom Lane [Tue, 9 Nov 2004 21:30:18 +0000 (21:30 +0000)]
Put in place some defenses against being fooled by accidental match of
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.
Bruce Momjian [Tue, 9 Nov 2004 15:11:11 +0000 (15:11 +0000)]
Update bitmap index description:
< Such indexes could be more compact if there are only a few unique values.
> Such indexes could be more compact if there are only a few distinct values.
> Such indexes can also be compressed. Keeping such indexes updated can be
> costly.
Bruce Momjian [Tue, 9 Nov 2004 03:57:42 +0000 (03:57 +0000)]
Update mmap details:
< portability issues. Anonymous mmap is required to prevent I/O
< overhead.
> portability issues. Anonymous mmap (or mmap to /dev/zero) is required
> to prevent I/O overhead.
>
> * Consider mmap()'ing files into a backend?
>
> Doing I/O to large tables would consume a lot of address space or
> require frequent mapping/unmapping. Extending the file also causes
> mapping problems that might require mapping only individual pages,
> leading to thousands of mappings. Another problem is that there is no
> way to _prevent_ I/O to disk from the dirty shared buffers so changes
> could hit disk before WAL is written.
Tom Lane [Tue, 9 Nov 2004 00:34:46 +0000 (00:34 +0000)]
Use a hopefully-more-reliable method of detecting default selectivity
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...
Bruce Momjian [Mon, 8 Nov 2004 20:16:20 +0000 (20:16 +0000)]
Update:
< posix_fadvise() [fadvise]
> posix_fadvise()
>
> Posix_fadvise() can control both sequential/random file caching and
> free-behind behavior, but it is unclear how the setting affects other
> backends that also have the file open, and the feature is not supported
> on all operating systems.
>
Tom Lane [Mon, 8 Nov 2004 18:01:28 +0000 (18:01 +0000)]
Recommend that archive_command be coded to not overwrite existing files.
Add explicit documentation of the recovery configuration settings. Other
minor improvements in the PITR docs. Simon Riggs, some editorialization
by Tom Lane.
Bruce Momjian [Mon, 8 Nov 2004 15:18:16 +0000 (15:18 +0000)]
Update item description:
< * CREATE TABLE AS can not determine column lengths from expressions [atttypmod]
> * Allow CREATE TABLE AS to determine column lengths for complex
> expressions like SELECT col1 || col2
Bruce Momjian [Mon, 8 Nov 2004 14:54:00 +0000 (14:54 +0000)]
Update view info:
< * Automatically create rules on views so they are updateable, per SQL99 [view]
> * Automatically create rules on views so they are updateable, per SQL99
>
> We can only auto-create rules for simple views. For more complex
> cases users will still have to write rules.
>
Tom Lane [Mon, 8 Nov 2004 04:02:20 +0000 (04:02 +0000)]
Kris Jurka pointed out that the qualified_name production wasn't
working as intended --- for some reason, FROM a.b.c was getting
parsed as if it were a function name and not a qualified name.
I think there must be a bug in bison, because it should have
complained that the grammar was ambiguous. Anyway, fix it along
the same lines previously used for func_name vs columnref, and get
rid of the right-recursion in attrs that seems to have confused
bison.
Tom Lane [Sat, 6 Nov 2004 23:06:29 +0000 (23:06 +0000)]
Add code to find_my_exec() to resolve a symbolic link down to the
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.
Tom Lane [Sat, 6 Nov 2004 19:36:02 +0000 (19:36 +0000)]
Update pg_dump to use SET DEFAULT_TABLESPACE instead of explicit
tablespace clauses; this should improve compatibility of dump files.
Philip Warner, some rework by Tom Lane.
Tom Lane [Sat, 6 Nov 2004 17:46:38 +0000 (17:46 +0000)]
When implementing a coercion to a domain type with a combined
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).
Bruce Momjian [Sat, 6 Nov 2004 05:38:19 +0000 (05:38 +0000)]
Remove:
* Allow database recovery where tablespaces can't be created
When a pg_dump is restored, all tablespaces will attempt to be created
in their original locations. If this fails, the user must be able to
adjust the restore process.
Tom Lane [Sat, 6 Nov 2004 01:16:22 +0000 (01:16 +0000)]
Code cleanup in path.c and exec.c. Handle Windows drive and network specs
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.
Tom Lane [Fri, 5 Nov 2004 19:17:13 +0000 (19:17 +0000)]
Create 'default_tablespace' GUC variable that supplies a TABLESPACE
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.
Bruce Momjian [Thu, 4 Nov 2004 16:49:53 +0000 (16:49 +0000)]
Updates from Simon Riggs:
< that can spam more than one table.
> that can span more than one table. 239c239
< rather than just col1
> rather than just col1; also called skip-scanning. 641c641,642
< * Add free-behind capability for large sequential scans [fadvise]
> * Allow free-behind capability for large sequential scans, perhaps using
> posix_fadvise() [fadvise]
Bruce Momjian [Thu, 4 Nov 2004 16:19:46 +0000 (16:19 +0000)]
Update bitmap index entries:
< * Allow the creation of bitmap indexes which can be quickly combined
< with other bitmap indexes
> * Allow non-bitmap indexes to be combined by creating bitmaps in memory
259,261c258,259
< combined. Such indexes could be more compact if there are few unique
< value. Also, perhaps they can be lossy requiring a scan of the heap page
< to find matching rows.
> combined. They can index by tid or can be lossy requiring a scan of the
> heap page to find matching rows. 263c261,262
< * Allow non-bitmap indexes to be combined
> * Allow the creation of on-disk bitmap indexes which can be quickly
> combined with other bitmap indexes
265,266c264
< Do lookups on non-bitmap indexes and create bitmaps in memory that can be
< combined with other indexes.
> Such indexes could be more compact if there are few unique value.
Bruce Momjian [Thu, 4 Nov 2004 03:57:58 +0000 (03:57 +0000)]
Update:
< * Use bitmaps to combine existing indexes [performance]
> * Allow the creation of bitmap indexes which can be quickly combined
> with other bitmap indexes
255,257c256,266
< Bitmap indexes allow single indexed columns to be combined to
< dynamically create a composite index to match a specific query. Each
< index is a bitmap, and the bitmaps are AND'ed or OR'ed to be combined.
> Bitmap indexes index single columns that can be combined with other bitmap
> indexes to dynamically create a composite index to match a specific query.
> Each index is a bitmap, and the bitmaps are bitwise AND'ed or OR'ed to be
> combined. Such indexes could be more compact if there are few unique
> value. Also, perhaps they can be lossy requiring a scan of the heap page
> to find matching rows.
>
> * Allow non-bitmap indexes to be combined
>
> Do lookups on non-bitmap indexes and create bitmaps in memory that can be
> combined with other indexes.
Bruce Momjian [Wed, 3 Nov 2004 22:20:52 +0000 (22:20 +0000)]
Update tablespace temp usage item:
< This perhaps should use a round-robin allocation system where several
< tablespaces are used in a cycle. The cycle pointer should be global.
> It could start with a random tablespace from a supplied list and cycle
> through the list.
Bruce Momjian [Tue, 2 Nov 2004 14:49:27 +0000 (14:49 +0000)]
Update:
< * Add a GUC variable to control the tablespace for temporary objects
> * Add a GUC variable to control the tablespace for temporary objects and
> sort files
>
> This perhaps should use a round-robin allocation system where several
> tablespaces are used in a cycle. The cycle pointer should be global.
>
Tom Lane [Mon, 1 Nov 2004 22:00:30 +0000 (22:00 +0000)]
timestamptz_trunc() should only recalculate the timezone when truncating
to DAY precision or coarser; leave the timezone alone when precision is
HOUR or less. This avoids surprises for inputs near a DST transition
time, as per example from Matthew Gabeler-Lee. (The only reason we
recalculate at all is so that outputs that are supposed to represent
days will come out as local midnight, and that's not relevant for sub-day
precision.)
Tom Lane [Mon, 1 Nov 2004 21:34:44 +0000 (21:34 +0000)]
Invent pg_next_dst_boundary() and rewrite DetermineLocalTimeZone() to
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.)
Bruce Momjian [Mon, 1 Nov 2004 19:21:50 +0000 (19:21 +0000)]
That's just the lovely way windows handles a "segfault". Gotta be really
interesting for MS to catch all those dumps...
Anyway. Oops. Seems I ran my regression tests with the old psql, and
just managed to update the backend, when I tested that patch. Turns out
there are codepaths where we'd access the Critical Section before it was
initialized. Attached patch breaks the initializeation off to a separate
part and adds that one to a much earlier position in the program.
Tom Lane [Sun, 31 Oct 2004 19:14:16 +0000 (19:14 +0000)]
Use psql -q option instead of 2>/dev/null during first invocation
of psql; this should make it easier to diagnose client-side problems,
such as library version mismatch. Also, consistently use -X option
to avoid problems from weird .psqlrc settings.