Bruce Momjian [Mon, 26 Apr 2004 15:24:42 +0000 (15:24 +0000)]
Please find attached a small patch against current cvs head, so that
'information_schema' is considered a system schema by various
pg_stat*_*_{tables,sequences} views.
Bruce Momjian [Mon, 26 Apr 2004 15:06:49 +0000 (15:06 +0000)]
Please find a attached a small patch that adds accessor functions
for "aclitem" so that it is not an opaque datatype.
I needed these functions to browse aclitems from user land. I can load
them when necessary, but it seems to me that these accessors for a
backend type belong to the backend, so I submit them.
Neil Conway [Sun, 25 Apr 2004 23:50:58 +0000 (23:50 +0000)]
Tiny assorted fixes: correct a typo in a comment in vacuumlazy.c, remove
some unused #include directives from bufmgr.c, and clarify comments in
bufmgr.h and buf.h
Neil Conway [Sat, 24 Apr 2004 22:53:44 +0000 (22:53 +0000)]
Document that PQoidValue(), PQcmdTuples(), and PQoidStatus() now work
when the command that generated the PGresult was an EXECUTE of an
appropriate prepared statement.
Neil Conway [Fri, 23 Apr 2004 20:32:20 +0000 (20:32 +0000)]
Add ceiling() as an alias for ceil(), and power() as an alias for pow().
Regression tests and documentation have both been updated.
SQL2003 requires that both ceiling() and ceil() be present, so I have
documented both spellings. SQL2003 doesn't mention pow() as far as I
can see, so I decided to replace pow() with power() in the documentation:
there is little reason to encourage the continued usage of a function
that isn't compliant with the standard, given a standard-compliant
alternative.
RELEASE NOTES: should state that pow() is considered deprecated
(although I don't see the need to ever remove it.)
Bruce Momjian [Thu, 22 Apr 2004 03:48:38 +0000 (03:48 +0000)]
Attached is are a few small fixes for dbmirror.
1. Fixed bug where sequences were being mirrored incorrectly if they
exceeded 127
2. Fixed a bug in the perl script with mirroring sequences(John
Burtenshaw sent an email to patches describing the bug in March but I
htink he forgot to attach his patch)
3. The dates/times in the transaction files will always use 2 digits.
Bruce Momjian [Thu, 22 Apr 2004 02:58:21 +0000 (02:58 +0000)]
This patch makes the EXECUTE command's completion tag return the
completion tag of the actual statement executed. This allows the
correct update count to be returned for UPDATE/INSERT/DELETE
statements.
Bruce Momjian [Thu, 22 Apr 2004 02:39:10 +0000 (02:39 +0000)]
Please find attached a small patch so that "pg_restore" ignores some sql
errors. This is the second submission, which integrates Tom comments about
localisation and exit code. I also added some comments about one sql
command which is not ignored.
Tom Lane [Wed, 21 Apr 2004 18:24:26 +0000 (18:24 +0000)]
Tweak indexscan and seqscan code to arrange that steps from one page to
the next are handled by ReleaseAndReadBuffer rather than separate
ReleaseBuffer and ReadBuffer calls. This cuts the number of acquisitions
of the BufMgrLock by a factor of 2 (possibly more, if an indexscan happens
to pull successive rows from the same heap page). Unfortunately this
doesn't seem enough to get us out of the recently discussed context-switch
storm problem, but it's surely worth doing anyway.
Tom Lane [Wed, 21 Apr 2004 18:06:30 +0000 (18:06 +0000)]
Another round of code cleanup on bufmgr. Use BM_VALID flag to keep track
of whether we have successfully read data into a buffer; this makes the
error behavior a bit more transparent (IMHO anyway), and also makes it
work correctly for local buffers which don't use Start/TerminateBufferIO.
Collapse three separate functions for writing a shared buffer into one.
This overlaps a bit with cleanups that Neil proposed awhile back, but
seems not to have committed yet.
Bruce Momjian [Tue, 20 Apr 2004 16:56:19 +0000 (16:56 +0000)]
Add doc mention that:
process directly. Some parameters can only be set at server start;
any changes to their entries in the configuration file will be ignored
until the server is restarted.
Bruce Momjian [Tue, 20 Apr 2004 01:00:26 +0000 (01:00 +0000)]
> >> My question is whether postgres can index null values, and if not, do I
> >> have to accept a full table scan when locating records.
> >
> > It indexes them, but "is null" is not an indexable operator, so you
> > can't directly solve the above with a 3-column index. What you can do
> > instead is use a partial index, for instance
> >
> > create index i on CUSTOMER.WCCustOrderStatusLog (WCOrderStatusID)
> > where Acknowledged is null and Processing is null;
>
> That's a very nifty trick and exactly the sort of answer I was after!
Add CREATE INDEX doc mention of using partial indexes for IS NULL
indexing; idea from Tom.
Bruce Momjian [Mon, 19 Apr 2004 23:36:48 +0000 (23:36 +0000)]
In reading the 7.4.2 docs, the sql reference page for PREPARE doesn't
reference DEALLOCATE in any way. It points to EXECUTE, but not to
DEALLOCATE. Suggested fix:
... This also means that a single prepared statement cannot be used by
multiple simultaneous database clients; however, each client can create
their own prepared statement to use. The prepared statement can be
manually cleaned up using the DEALLOCATE command.
Tom Lane [Mon, 19 Apr 2004 23:27:17 +0000 (23:27 +0000)]
Code review for ARC patch. Eliminate static variables, improve handling
of VACUUM cases so that VACUUM requests don't affect the ARC state at all,
avoid corner case where BufferSync would uselessly rewrite a buffer that
no longer contains the page that was to be flushed. Make some minor
other cleanups in and around the bufmgr as well, such as moving PinBuffer
and UnpinBuffer into bufmgr.c where they really belong.