| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-hackers a couple days ago.
Notes/caveats:
- added regression tests for the new functionality, all
regression tests pass on my machine
- added pg_dump support
- updated PL/PgSQL to support per-statement triggers; didn't
look at the other procedural languages.
- there's (even) more code duplication in trigger.c than there
was previously. Any suggestions on how to refactor the
ExecXXXTriggers() functions to reuse more code would be
welcome -- I took a brief look at it, but couldn't see an
easy way to do it (there are several subtly-different
versions of the code in question)
- updated the documentation. I also took the liberty of
removing a big chunk of duplicated syntax documentation in
the Programmer's Guide on triggers, and moving that
information to the CREATE TRIGGER reference page.
- I also included some spelling fixes and similar small
cleanups I noticed while making the changes. If you'd like
me to split those into a separate patch, let me know.
Neil Conway
|
|
|
|
| |
but do it correctly now.
|
| |
|
|
|
|
|
|
|
|
|
| |
before commit, not after :-( --- the original coding is not only unsafe
if an error occurs while it's processing, but it generates an invalid
sequence of WAL entries. Resurrect 7.2 logic for deleting items when
no longer needed. Use an enum instead of random macros. Editorialize
on names used for routines and constants. Teach backend/nodes routines
about new field in CreateTable struct. Add a regression test.
|
|
|
|
|
|
| |
for temp tables.
Gavin Sherry
|
|
|
|
|
|
|
|
| |
postgres.h or c.h includes a system header (such as stdio.h or
stdlib.h), there's no need to specifically include it in any of the .c
files in the backend.
Neil Conway
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
principled order; in particular ensure that all shared resources
are released before we release transaction locks. The code used
to release locks before buffer pins, which might explain an ancient
note I have about a bufmgr assertion failure I'd seen once several
years ago, and been unable to reproduce since. (Theory: someone
trying to drop a relation might be able to reach FlushRelationBuffers
before the last user of the relation had gotten around to dropping
his buffer pins.)
|
|
|
|
|
|
| |
that they'd get to commit immediately on finishing. There's now a
centralized routine PreventTransactionChain() that implements the
necessary tests.
|
|
|
|
|
| |
nearly so, by postponing write of flat password file until transaction
commit.
|
|
|
|
|
|
|
| |
in our write/flush operation any WAL entries that got queued while we
were waiting to get the WALWriteLock. This improves throughput when
transactions are small enough that several can be committed per WAL
write (ie, per disk revolution).
|
|
|
|
|
|
| |
recent WAL activity has occurred. Without this, it's possible that a
later crash might leave tuples on disk with un-updated commit status
bits.
|
| |
|
|
|
|
| |
because c.h has sys/types.h.
|
| |
|
|
|
|
|
|
|
|
|
| |
to false provides more SQL-spec-compliant behavior than we had before.
I am not sure that setting it false is actually a good idea yet; there
is a lot of client-side code that will probably be broken by turning
autocommit off. But it's a start.
Loosely based on a patch by David Van Wie.
|
|
|
|
|
| |
* Remove wal_files postgresql.conf option because WAL files are
now recycled
|
|
|
|
| |
Original patch from Thomas.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The local buffer manager is no longer used for newly-created relations
(unless they are TEMP); a new non-TEMP relation goes through the shared
bufmgr and thus will participate normally in checkpoints. But TEMP relations
use the local buffer manager throughout their lifespan. Also, operations
in TEMP relations are not logged in WAL, thus improving performance.
Since it's no longer necessary to fsync relations as they move out of the
local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code
is no longer needed and has been removed: there's no concept of a dirty
relation anymore in md.c/fd.c, and we never fsync anything but WAL.
Still TODO: improve local buffer management algorithms so that it would
be reasonable to increase NLocBuffer.
|
|
|
|
| |
location feature.
|
| |
|
|
|
|
|
|
|
| |
in the relcache. It's rather silly that we have reference count leak
checks in bufmgr and in catcache, but not in relcache which will normally
have many fewer entries. Chris K-L would have caught at least one bug
in his recent DROP patch if he'd had this.
|
| |
|
|
|
|
|
|
|
|
|
| |
SharedBufferChanged
BufferRelidLastDirtied
BufferTagLastDirtied
BufferDirtiedByMe
Manfred Koizar
|
|
|
|
|
|
|
|
|
|
|
| |
HeapTupleHeaderData in setter and getter macros called
HeapTupleHeaderGetXmin, HeapTupleHeaderSetXmin etc.
It also introduces a "virtual" field xvac by defining
HeapTupleHeaderGetXvac and HeapTupleHeaderSetXvac. Xvac is used by
VACUUM, in fact it is stored in t_cmin.
Manfred Koizar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Changes to avoid collisions with WIN32 & MFC names...
> 1. Renamed:
> a. PROC => PGPROC
> b. GetUserName() => GetUserNameFromId()
> c. GetCurrentTime() => GetCurrentDateTime()
> d. IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim
>
> 2. Added _P to some lex/yacc tokens:
> CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT
Jan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of link() under Cygwin:
http://archives.postgresql.org/pgsql-cygwin/2002-04/msg00072.php
Note that it appears that BeOS and Netware also have the above or
similar problem.
I have only verified that PostgreSQL builds under Cygwin with this
patch.
Since I cannot reproduce the problem, I cannot verify that the proposed
patch solves it. Nevertheless, both Barry Pederson and David P.
Caldwell
attest that this patch solves the problem. See the following for
details:
http://archives.postgresql.org/pgsql-cygwin/2002-05/msg00043.php
http://archives.postgresql.org/pgsql-cygwin/2002-05/msg00040.php
Jason Tishler
|
|
|
|
|
| |
and just slow down normal operations (only fractionally, but a cycle saved
is a cycle earned). Improve documentation of AMI_OVERRIDE behavior.
|
|
|
|
|
|
|
|
| |
exemplified by bug #671. Moving the storage to relcache turned out to
be a bad idea because relcache might decide to discard the info. Instead,
open and close the relcache entry on each sequence operation, and use
a record of the current XID to discover whether we already hold
AccessShareLock on the sequence.
|
|
|
|
|
|
|
|
|
|
|
| |
in snapshots, per my proposal of a few days ago. Also, tweak heapam.c
routines (heap_insert, heap_update, heap_delete, heap_mark4update) to
be passed the command ID to use, instead of doing GetCurrentCommandID.
For catalog updates they'll still get passed current command ID, but
for updates generated from the main executor they'll get passed the
command ID saved in the snapshot the query is using. This should fix
some corner cases associated with functions and triggers that advance
current command ID while an outer query is still in progress.
|
|
|
|
|
|
|
| |
allows the example in the CREATE SCHEMA ref page to actually work now.
Also, clean up when the transaction that initially creates a temp-table
namespace is later aborted. Simplify internal representation of search
path by folding special cases into the main list.
|
|
|
|
|
|
|
|
|
| |
GUC support. It's now possible to set datestyle, timezone, and
client_encoding from postgresql.conf and per-database or per-user
settings. Also, implement rollback of SET commands that occur in a
transaction that later fails. Create a SET LOCAL var = value syntax
that sets the variable only for the duration of the current transaction.
All per previous discussions in pghackers.
|
|
|
|
|
| |
Re-add warning if the locale prevents LIKE-optimization. Done within
initdb now.
|
|
|
|
| |
Ulrich Neumann
|
|
|
|
|
|
|
|
| |
compiled for integer date/time storage and to check the length of
storage for the locale fields in the same data structure.
Slightly reword some of the error messages to be more accurate on
possible recovery options (e.g. recompile *or* re-initdb).
Bump version number on this file.
|
|
|
|
| |
and/or with GUC variables.
|
|
|
|
|
|
|
| |
path. The default behavior if no per-user schemas are created is that
all users share a 'public' namespace, thus providing behavior backwards
compatible with 7.2 and earlier releases. Probably the semantics and
default setting will need to be fine-tuned, but this is a start.
|
|
|
|
| |
temp table entries in pg_class have the names the user would expect.
|
|
|
|
|
|
| |
per recent pghackers discussion: force a new WAL record at first nextval
after a checkpoint, and ensure that xlog is flushed to disk if a nextval
record is the only thing emitted by a transaction.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Change all current CVS messages of NOTICE to WARNING. We were going
to do this just before 7.3 beta but it has to be done now, as you will
see below.
o Change current INFO messages that should be controlled by
client_min_messages to NOTICE.
o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
to always go to the client.
o Remove INFO from the client_min_messages options and add NOTICE.
Seems we do need three non-ERROR elog levels to handle the various
behaviors we need for these messages.
Regression passed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
now just below FATAL in server_min_messages. Added more text to
highlight ordering difference between it and client_min_messages.
---------------------------------------------------------------------------
REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
|
|
|
|
|
| |
elog(LOG, "XLogWrite: new log file created - "
"consider increasing 'wal_files' in postgresql.conf.");
|
|
|
|
|
|
| |
per my proposal of a couple days ago. This will eliminate the unable-
to-restart-database class of problem that we have seen reported half a
dozen times with 7.1.*.
|
|
|
|
|
|
|
|
|
|
|
| |
'volatile' pointers to access those structures, so that optimizing
compilers will not decide to move the structure accesses outside of the
spinlock-acquire-to-spinlock-release sequence. There are no known bugs
in these uses at present, but based on bad experience with lwlock.c,
it seems prudent to ensure that we protect these other uses too.
Per pghackers discussion around 12-Dec. (Note: it should not be
necessary to worry about structures protected by LWLocks, since the
LWLock acquire and release operations are not inline macros.)
|
| |
|
|
|
|
|
|
| |
do not use the undo pointer anyway. This is a quick-hack solution for
the three-way deadlock condition discussed in pghackers 17-Dec-01.
Need to find a better way of doing it.
|
|
|
|
| |
initdb/regression tests pass.
|
|
|
|
|
|
|
|
|
|
|
| |
so that only one signal number is used not three. Flags in shared
memory tell the reason(s) for the current signal. This method is
extensible to handle more signal reasons without chewing up even more
signal numbers, but the immediate reason is to keep pg_pwd reloads
separate from SIGHUP processing in the postmaster.
Also clean up some problems in the postmaster with delayed response to
checkpoint status changes --- basically, it wouldn't schedule a checkpoint
if it wasn't getting connection requests on a regular basis.
|
| |
|
|
|
|
| |
spacing. Also adds space for one-line comments.
|