]> granicus.if.org Git - postgresql/log
postgresql
19 years agoCause Win32 to output to the event log rather than stderr by default.
Bruce Momjian [Sun, 27 Feb 2005 01:02:57 +0000 (01:02 +0000)]
Cause Win32 to output to the event log rather than stderr by default.

Magnus Hagander

19 years agoAllow Win32 to support the O_SYNC open flag as an wal_sync_method method.
Bruce Momjian [Sun, 27 Feb 2005 00:53:29 +0000 (00:53 +0000)]
Allow Win32 to support the O_SYNC open flag as an wal_sync_method method.

Magnus Hagander

19 years agoAdd documentation on how statistics are used by the planner.
Bruce Momjian [Sun, 27 Feb 2005 00:49:28 +0000 (00:49 +0000)]
Add documentation on how statistics are used by the planner.

Mark Kirkwood

19 years agoAdd routines to dbsize to return the index size and total relation size.
Bruce Momjian [Sat, 26 Feb 2005 23:31:15 +0000 (23:31 +0000)]
Add routines to dbsize to return the index size and total relation size.
Improve documentation.

Ed L.

19 years agoAdjust OS-specific kernel settings to mention old and new BSD methods of
Bruce Momjian [Sat, 26 Feb 2005 23:19:05 +0000 (23:19 +0000)]
Adjust OS-specific kernel settings to mention old and new BSD methods of
adjusting values:

> But to be on the safe side, it would make sense to do something similar
> to the BSD section, and comment about older distributions maybe needing
> to manipulate /proc/kernel/* directly.

Mark Kirkwood

19 years agoFinish up the flat-files project: get rid of GetRawDatabaseInfo() hack
Tom Lane [Sat, 26 Feb 2005 18:43:34 +0000 (18:43 +0000)]
Finish up the flat-files project: get rid of GetRawDatabaseInfo() hack
in favor of looking at the flat file copy of pg_database during backend
startup.  This should finally eliminate the various corner cases in which
backend startup fails unexpectedly because it isn't able to distinguish
live and dead tuples in pg_database.  Simplify locking on pg_database
to be similar to the rules used with pg_shadow and pg_group, and eliminate
FlushRelationBuffers operations that were used only to reduce the odds
of failure of GetRawDatabaseInfo.
initdb forced due to addition of a trigger to pg_database.

19 years agoClarify PGPASSWORD usage:
Bruce Momjian [Sat, 26 Feb 2005 18:39:04 +0000 (18:39 +0000)]
Clarify PGPASSWORD usage:

! authentication.  Use of this environment variable is not
! recommended for security reasons (some operating systems
! allow non-root users to see process environment variables via
! <application>ps</>); instead consider using  the
! <filename>~/.pgpass</> file (see <xref linkend="libpq-pgpass">).

19 years agoCorrect overstatement in locking docs: we said ExclusiveLock is never
Tom Lane [Sat, 26 Feb 2005 18:37:17 +0000 (18:37 +0000)]
Correct overstatement in locking docs: we said ExclusiveLock is never
taken automatically, but this is only true with respect to user tables.

19 years agoState PGPASSWORD is "not recommended" rather than "depricated".
Bruce Momjian [Sat, 26 Feb 2005 14:21:40 +0000 (14:21 +0000)]
State PGPASSWORD is "not recommended" rather than "depricated".

19 years agoIn accordance to
Teodor Sigaev [Fri, 25 Feb 2005 16:13:29 +0000 (16:13 +0000)]
In accordance to
http://www.pgsql.ru/db/mw/msg.html?mid=2045361

change TimeATD to/from Datum macros.

Re-initdb is needed.

19 years agoAdd linking from /port to bcc makefile.
Bruce Momjian [Fri, 25 Feb 2005 15:57:33 +0000 (15:57 +0000)]
Add linking from /port to bcc makefile.

19 years agoFix float8->int64 transformation
Teodor Sigaev [Fri, 25 Feb 2005 14:03:04 +0000 (14:03 +0000)]
Fix float8->int64 transformation

19 years agoPlease find enclosed a patch, per Dennis Bj<C3><B6>rklund, that uses -f
Bruce Momjian [Fri, 25 Feb 2005 04:56:01 +0000 (04:56 +0000)]
Please find enclosed a patch, per Dennis Bj<C3><B6>rklund, that uses -f
for input files rather than <.  This makes error messages, &c. more
expressive.

David Fetter

19 years agoFix plpgsql error message for dropped temporary tables.
Bruce Momjian [Fri, 25 Feb 2005 04:18:27 +0000 (04:18 +0000)]
Fix plpgsql error message for dropped temporary tables.

19 years agoClarify object ownership language to prevent confusion with database
Bruce Momjian [Fri, 25 Feb 2005 02:34:56 +0000 (02:34 +0000)]
Clarify object ownership language to prevent confusion with database
ownership.

19 years agoUpdatge wording.
Bruce Momjian [Fri, 25 Feb 2005 00:45:30 +0000 (00:45 +0000)]
Updatge wording.

19 years agoFix markup.
Bruce Momjian [Fri, 25 Feb 2005 00:32:55 +0000 (00:32 +0000)]
Fix markup.

19 years agoFix HTML markup and add NULL sorting item to existing NULL FAQ item.
Bruce Momjian [Fri, 25 Feb 2005 00:32:15 +0000 (00:32 +0000)]
Fix HTML markup and add NULL sorting item to existing NULL FAQ item.

Greg Sabino Mullan

19 years agoAdd:
Bruce Momjian [Fri, 25 Feb 2005 00:24:10 +0000 (00:24 +0000)]
Add:

> * Improve psql's handling of multi-line queries

19 years agoAdd wording about UTF8:
Bruce Momjian [Thu, 24 Feb 2005 23:39:29 +0000 (23:39 +0000)]
Add wording about UTF8:

<    like towupper().
>    like towupper().  However, UTF8 already works with normal
>    locales but provides no ordering.

19 years agoDone:
Bruce Momjian [Thu, 24 Feb 2005 14:14:41 +0000 (14:14 +0000)]
Done:

>  o -Change PL/PgSQL to use palloc() instead of malloc()

19 years agoWe aren't supposed to try to run test programs until after we've
Tom Lane [Thu, 24 Feb 2005 02:12:15 +0000 (02:12 +0000)]
We aren't supposed to try to run test programs until after we've
verified that AC_TRY_RUN works.

19 years agoClean up printf arg-control test, per Kurt Roeckx.
Tom Lane [Thu, 24 Feb 2005 01:34:45 +0000 (01:34 +0000)]
Clean up printf arg-control test, per Kurt Roeckx.

19 years agoMy patch this morning was overly hasty; revert code to original state.
Tom Lane [Thu, 24 Feb 2005 01:11:40 +0000 (01:11 +0000)]
My patch this morning was overly hasty; revert code to original state.

19 years agoMinor code cleanup: remove a variable that was assigned to but never
Neil Conway [Wed, 23 Feb 2005 23:27:54 +0000 (23:27 +0000)]
Minor code cleanup: remove a variable that was assigned to but never
subsequently referenced.

Found by: Coverity
Fixed by: Sean Chittenden

19 years agoThis patch optimizes the md5_text() function (which is used to
Neil Conway [Wed, 23 Feb 2005 22:46:17 +0000 (22:46 +0000)]
This patch optimizes the md5_text() function (which is used to
implement the md5() SQL-level function). The old code did the
following:

1. de-toast the datum
2. convert it to a cstring via textout()
3. get the length of the cstring via strlen()

Since we are treating the datum context as a blob of binary data,
the latter two steps are unnecessary. Once the data has been
detoasted, we can just use it as-is, and derive its length from
the varlena metadata.

This patch improves some run-of-the-mill md5() computations by
just under 10% in my limited tests, and passes the regression tests.

I also noticed that md5_text() wasn't checking the return value
of md5_hash(); encountering OOM at precisely the right moment
could result in returning a random md5 hash. This patch corrects
that. A better fix would be to make md5_hash() only return on
success (and/or allocate via palloc()), but since it's used in
the frontend as well I don't see an easy way to do that.

19 years agoUn-break plpgsql build by removing unwanted _() usage.
Tom Lane [Wed, 23 Feb 2005 16:23:07 +0000 (16:23 +0000)]
Un-break plpgsql build by removing unwanted _() usage.
This would be a completely inappropriate place to apply localization
anyway.

19 years agoProperly undef _(x) gettext macro.
Bruce Momjian [Wed, 23 Feb 2005 04:34:21 +0000 (04:34 +0000)]
Properly undef _(x) gettext macro.

19 years agoDocument that only a table's owner may TRUNCATE it. Per Keith Worthington.
Tom Lane [Tue, 22 Feb 2005 19:06:18 +0000 (19:06 +0000)]
Document that only a table's owner may TRUNCATE it.  Per Keith Worthington.

19 years agoThis patch changes makes some significant changes to how compilation
Neil Conway [Tue, 22 Feb 2005 07:18:27 +0000 (07:18 +0000)]
This patch changes makes some significant changes to how compilation
and parsing work in PL/PgSQL:

- memory management is now done via palloc(). The compiled representation
  of each function now has its own memory context. Therefore, the storage
  consumed by a function can be reclaimed via MemoryContextDelete().

  During compilation, the CurrentMemoryContext is the function's memory
  context. This means that a palloc() is sufficient to allocate memory
  that will have the same lifetime as the function itself. As a result,
  code invoked during compilation should be careful to pfree() temporary
  allocations to avoid leaking memory. Since a lot of the code in the
  backend is not careful about releasing palloc'ed memory, that means
  we should switch into a temporary memory context before invoking
  backend functions. A temporary context appropriate for such allocations
  is `compile_tmp_cxt'.

- The ability to use palloc() allows us to simply a lot of the code in
  the parser. Rather than representing lists of elements via ad hoc
  linked lists or arrays, we can use the List type. Rather than doing
  malloc followed by memset(0), we can just use palloc0().

- We now check that the user has supplied the right number of parameters
  to a RAISE statement. Supplying either too few or too many results in
  an error (at runtime).

- PL/PgSQL's parser needs to accept arbitrary SQL statements. Since we
  do not want to duplicate the SQL grammar in the PL/PgSQL grammar, this
  means we need to be quite lax in what the PL/PgSQL grammar considers
  a "SQL statement". This can lead to misleading behavior if there is a
  syntax error in the function definition, since we assume a malformed
  PL/PgSQL construct is a SQL statement. Furthermore, these errors were
  only detected at runtime (when we tried to execute the alleged "SQL
  statement" via SPI).

  To rectify this, the patch changes the parser to invoke the main SQL
  parser when it sees a string it believes to be a SQL expression. This
  means that synctically-invalid SQL will be rejected during the
  compilation of the PL/PgSQL function. This is only done when compiling
  for "validation" purposes (i.e. at CREATE FUNCTION time), so it should
  not impose a runtime overhead.

- Fixes for the various buffer overruns I've patched in stable branches
  in the past few weeks. I've rewritten code where I thought it was
  warranted (unlike the patches applied to older branches, which were
  minimally invasive).

- Various other minor changes and cleanups.

- Updates to the regression tests.

19 years agoAdd semicolon so snprintf.c goto has a statement to attach to:
Bruce Momjian [Tue, 22 Feb 2005 04:57:24 +0000 (04:57 +0000)]
Add semicolon so snprintf.c goto has a statement to attach to:

nochar:
    /* nothing */
    ; /* semicolon required because a goto has to be attached to a statement */

19 years agoUse _() macro consistently rather than gettext(). Add translation
Bruce Momjian [Tue, 22 Feb 2005 04:43:23 +0000 (04:43 +0000)]
Use _() macro consistently rather than gettext().  Add translation
macros around strings that were missing them.

19 years agoAdd:
Bruce Momjian [Tue, 22 Feb 2005 04:08:01 +0000 (04:08 +0000)]
Add:

>  * Add internationalized message strings

19 years agoAdd support to port/snprintf.c for position parameter specification:
Bruce Momjian [Tue, 22 Feb 2005 03:56:22 +0000 (03:56 +0000)]
Add support to port/snprintf.c for position parameter specification:

+ # Determine if printf supports %1$ argument selection, e.g. %5$ selects
+ # the fifth argument after the printf print string.
+ # This is not in the C99 standard, but in the Single Unix Specification (SUS).
+ # It is used in our langauge translation strings.

Nicolai Tufar with configure changes by Bruce.

19 years agoUpdate initdb locale/encoding documentation description. Backpatch to
Bruce Momjian [Tue, 22 Feb 2005 02:54:19 +0000 (02:54 +0000)]
Update initdb locale/encoding documentation description.  Backpatch to
8.0.X.

19 years agoTry to get Borland CC to compile.
Bruce Momjian [Mon, 21 Feb 2005 21:22:32 +0000 (21:22 +0000)]
Try to get Borland CC to compile.

Backpatch to 8.0.X which doesn't work right now.

19 years agoAdd port mention:
Bruce Momjian [Mon, 21 Feb 2005 18:51:07 +0000 (18:51 +0000)]
Add port mention:

< * Add the client IP address to pg_stat_activity
> * Add the client IP address and port to pg_stat_activity

19 years agoUpdate Russian FAQ.
Bruce Momjian [Mon, 21 Feb 2005 17:33:54 +0000 (17:33 +0000)]
Update Russian FAQ.

Viktor Vislobokov

19 years agoClarify item:
Bruce Momjian [Mon, 21 Feb 2005 17:30:33 +0000 (17:30 +0000)]
Clarify item:

< * Allow server configuration parameters to be remotely modified
> * Allow pg_hba.conf settings to be controlled via SQL
>
>   This would require a new global table that is dumped to flat file for
>   use by the postmaster.  We do a similar thing for pg_shadow currently.
>

19 years agoSimplify defines
Teodor Sigaev [Mon, 21 Feb 2005 14:09:49 +0000 (14:09 +0000)]
Simplify defines

19 years agoFix memory leak for timestamp(with and w/o tz) and indexes
Teodor Sigaev [Mon, 21 Feb 2005 10:03:57 +0000 (10:03 +0000)]
Fix memory leak for timestamp(with and w/o tz) and indexes

19 years agoTrivial fix: change the reference to further documentation of pathkeys to
Neil Conway [Mon, 21 Feb 2005 06:43:04 +0000 (06:43 +0000)]
Trivial fix: change the reference to further documentation of pathkeys to
point to its new location.

19 years agoFix two typos, per report from Hashem Masoud.
Neil Conway [Mon, 21 Feb 2005 06:12:14 +0000 (06:12 +0000)]
Fix two typos, per report from Hashem Masoud.

19 years agoClarify item:
Bruce Momjian [Mon, 21 Feb 2005 04:58:52 +0000 (04:58 +0000)]
Clarify item:

< * Consider use of open/fcntl(O_DIRECT) to minimize OS caching
> * Consider use of open/fcntl(O_DIRECT) to minimize OS caching,
>   especially for WAL writes

19 years agoUpdates to the bibliography. Patch from Michael Fuhr.
Neil Conway [Mon, 21 Feb 2005 02:21:03 +0000 (02:21 +0000)]
Updates to the bibliography. Patch from Michael Fuhr.

19 years agoDocument the "register" and "unregister" pg_ctl subcommands, for use on
Neil Conway [Mon, 21 Feb 2005 02:13:26 +0000 (02:13 +0000)]
Document the "register" and "unregister" pg_ctl subcommands, for use on
Windows. Patch from Magnus Hagander.

19 years agoUse SnapshotNow instead of SnapshotSelf for reading the catalogs
Tom Lane [Sun, 20 Feb 2005 22:02:19 +0000 (22:02 +0000)]
Use SnapshotNow instead of SnapshotSelf for reading the catalogs
during flat-file writing.  The only difference is that SnapshotSelf
would consider tuples of the 'current command' within the current
transaction as valid, where SnapshotNow wouldn't.  We can eliminate
the need for this with one extra CommandCounterIncrement call before
we start reading the catalogs.

19 years agoRemove some no-longer-needed kluges for bootstrapping, in particular
Tom Lane [Sun, 20 Feb 2005 21:46:50 +0000 (21:46 +0000)]
Remove some no-longer-needed kluges for bootstrapping, in particular
the AMI_OVERRIDE flag.  The fact that TransactionLogFetch treats
BootstrapTransactionId as always committed is sufficient to make
bootstrap work, and getting rid of extra tests in heavily used code
paths seems like a win.  The files produced by initdb are demonstrably
the same after this change.

19 years agoRename macro to MAKE_EXPIRED_TUPLES_VISIBLE.
Bruce Momjian [Sun, 20 Feb 2005 15:01:42 +0000 (15:01 +0000)]
Rename macro to MAKE_EXPIRED_TUPLES_VISIBLE.

19 years agoFix MAKE_ALL_TUPLES_VISIBLE define.
Bruce Momjian [Sun, 20 Feb 2005 15:00:16 +0000 (15:00 +0000)]
Fix MAKE_ALL_TUPLES_VISIBLE define.

19 years agoMove define MAKE_ALL_TUPLES_VISIBLE to a more logical place.
Bruce Momjian [Sun, 20 Feb 2005 14:57:47 +0000 (14:57 +0000)]
Move define MAKE_ALL_TUPLES_VISIBLE to a more logical place.

19 years agoI have added a define, MAKE_ALL_TUPLES_VISIBLE, to help people recover
Bruce Momjian [Sun, 20 Feb 2005 04:56:00 +0000 (04:56 +0000)]
I have added a define, MAKE_ALL_TUPLES_VISIBLE, to help people recover
deleted tuples. Of course it is only to be used for disaster recovery.

19 years agoFlat file cleanup phase 2: make it work for pg_group. The flat group
Tom Lane [Sun, 20 Feb 2005 04:45:59 +0000 (04:45 +0000)]
Flat file cleanup phase 2: make it work for pg_group.  The flat group
file now identifies group members by usesysid not name; this avoids
needing to depend on SearchSysCache which we can't use during startup.
(The old representation was entirely broken anyway, since we did not
regenerate the file following RENAME USER.)  It's only a 95% solution
because if the group membership list is big enough to be toasted out
of line, we cannot read it during startup.  I think this will do for
the moment, until we have time to implement the planned pg_role
replacement for pg_group.

19 years agoAdd code to prevent transaction ID wraparound by enforcing a safe limit
Tom Lane [Sun, 20 Feb 2005 02:22:07 +0000 (02:22 +0000)]
Add code to prevent transaction ID wraparound by enforcing a safe limit
in GetNewTransactionId().  Since the limit value has to be computed
before we run any real transactions, this requires adding code to database
startup to scan pg_database and determine the oldest datfrozenxid.
This can conveniently be combined with the first stage of an attack on
the problem that the 'flat file' copies of pg_shadow and pg_group are
not properly updated during WAL recovery.  The code I've added to
startup resides in a new file src/backend/utils/init/flatfiles.c, and
it is responsible for rewriting the flat files as well as initializing
the XID wraparound limit value.  This will eventually allow us to get
rid of GetRawDatabaseInfo too, but we'll need an initdb so we can add
a trigger to pg_database.

19 years agoNew arrangement to always let the bgwriter do checkpoints broke
Tom Lane [Sat, 19 Feb 2005 23:16:15 +0000 (23:16 +0000)]
New arrangement to always let the bgwriter do checkpoints broke
CHECKPOINT and some other commands in the context of a standalone
backend.  Allow a standalone backend to do its own checkpoints.

19 years agoEnsure that the resolved datatype of any unknown Param is propagated
Tom Lane [Sat, 19 Feb 2005 19:33:08 +0000 (19:33 +0000)]
Ensure that the resolved datatype of any unknown Param is propagated
into the sub-SELECT targetlist when it appears in the context
INSERT INTO foo SELECT $1 ...  Per report from Abhijit Menon-Sen.

19 years agoFix typo in SGML.
Bruce Momjian [Sat, 19 Feb 2005 04:39:52 +0000 (04:39 +0000)]
Fix typo in SGML.

19 years agoAdd reference to the NewbieDoc Docbook Guide.
Bruce Momjian [Sat, 19 Feb 2005 04:34:17 +0000 (04:34 +0000)]
Add reference to the NewbieDoc Docbook Guide.

19 years agoConvert MemoryContextSwitchTo() into an inline function when using GCC.
Tom Lane [Fri, 18 Feb 2005 21:52:34 +0000 (21:52 +0000)]
Convert MemoryContextSwitchTo() into an inline function when using GCC.

19 years agoUpdate question text:
Bruce Momjian [Tue, 15 Feb 2005 04:35:37 +0000 (04:35 +0000)]
Update question text:

    <H4><A name="4.20">4.20</A>) Why do I get "missing oid" errors when
    accessing temporary tables in PL/PgSQL functions?</H4>

Merlin Moncure

19 years agoUpdate Momjain book URL.
Bruce Momjian [Tue, 15 Feb 2005 04:03:46 +0000 (04:03 +0000)]
Update Momjain book URL.

19 years agoUpdate URL for Momjian book.
Bruce Momjian [Tue, 15 Feb 2005 04:02:25 +0000 (04:02 +0000)]
Update URL for Momjian book.

19 years agoChange wording:
Bruce Momjian [Tue, 15 Feb 2005 03:54:19 +0000 (03:54 +0000)]
Change wording:

<   The agreed syntax is:
>   The proposed syntax is:

19 years agoAdd mention of syntax for GRANT ALL:
Bruce Momjian [Tue, 15 Feb 2005 03:53:00 +0000 (03:53 +0000)]
Add mention of syntax for GRANT ALL:

>   The agreed syntax is:
>  GRANT SELECT ON ALL TABLES IN public TO phpuser;
>  GRANT SELECT ON NEW TABLES IN public TO phpuser;
>

19 years agoUpdate comment on VACUUM FULL.
Bruce Momjian [Tue, 15 Feb 2005 03:50:07 +0000 (03:50 +0000)]
Update comment on VACUUM FULL.

Manfred Koizar

19 years agoFix typo:
Bruce Momjian [Tue, 15 Feb 2005 03:17:41 +0000 (03:17 +0000)]
Fix typo:

<  o Allow COPY FROM ... CVS to interpret newlines and carriage
>  o Allow COPY FROM ... CSV to interpret newlines and carriage

19 years agoAdd:
Bruce Momjian [Tue, 15 Feb 2005 02:27:36 +0000 (02:27 +0000)]
Add:

> * Add xpath_array() to /contrib/xml2 to return results as an array

19 years agoDocument usage of gettext_noop().
Bruce Momjian [Tue, 15 Feb 2005 01:03:47 +0000 (01:03 +0000)]
Document usage of gettext_noop().

19 years agoImprove documentation of signal usage for HAVE_SIGPROCMASK and
Bruce Momjian [Mon, 14 Feb 2005 23:02:35 +0000 (23:02 +0000)]
Improve documentation of signal usage for HAVE_SIGPROCMASK and
non-HAVE_SIGPROCMASK cases in pqinitmask().

19 years agoImprove documentation of signal usage for HAVE_SIGPROCMASK and
Bruce Momjian [Mon, 14 Feb 2005 23:02:03 +0000 (23:02 +0000)]
Improve documentation of signal usage for HAVE_SIGPROCMASK and
non-HAVE_SIGPROCMASK cases in pqinitmask().

19 years agoAdd:
Bruce Momjian [Mon, 14 Feb 2005 19:51:17 +0000 (19:51 +0000)]
Add:

> * Allow the creation of indexes with mixed ascending/descending specifiers

19 years agoALTER LANGUAGE RENAME has never worked. Per Sergey Yatskevich.
Tom Lane [Mon, 14 Feb 2005 06:17:44 +0000 (06:17 +0000)]
ALTER LANGUAGE RENAME has never worked.  Per Sergey Yatskevich.

19 years agoMinor consistency improvement.
Neil Conway [Mon, 14 Feb 2005 00:54:26 +0000 (00:54 +0000)]
Minor consistency improvement.

19 years agoAdd:
Bruce Momjian [Mon, 14 Feb 2005 00:03:57 +0000 (00:03 +0000)]
Add:

> * Make src/port/snprintf.c thread-safe

19 years agoPrint file name and errno string on rmtree failure.
Bruce Momjian [Sun, 13 Feb 2005 16:50:44 +0000 (16:50 +0000)]
Print file name and errno string on rmtree failure.

Backpatch to 8.0.X.

19 years agoWrite some real documentation about the index access method API.
Tom Lane [Sun, 13 Feb 2005 03:04:15 +0000 (03:04 +0000)]
Write some real documentation about the index access method API.

19 years agoMove plpgsql DEBUG from DEBUG2 to DEBUG1 because it is a user-requested
Bruce Momjian [Sun, 13 Feb 2005 01:25:50 +0000 (01:25 +0000)]
Move plpgsql DEBUG from DEBUG2 to DEBUG1 because it is a user-requested
DEBUG.

19 years agoClarify:
Bruce Momjian [Sun, 13 Feb 2005 00:10:41 +0000 (00:10 +0000)]
Clarify:

< * Add IP address to pg_stat_activity
> * Add the client IP address to pg_stat_activity

19 years agoAdd:
Bruce Momjian [Sun, 13 Feb 2005 00:09:34 +0000 (00:09 +0000)]
Add:

> * Add IP address to pg_stat_activity

19 years agoMove plpgsql DEBUG from DEBUG2 to DEBUG1 because it is a user-requested
Bruce Momjian [Sat, 12 Feb 2005 23:53:42 +0000 (23:53 +0000)]
Move plpgsql DEBUG from DEBUG2 to DEBUG1 because it is a user-requested
DEBUG.

Fix a few places where DEBUG1 crept in that should have been DEBUG2.

19 years agoAdd a regression test to verify that the stack depth checker actually
Tom Lane [Fri, 11 Feb 2005 22:15:12 +0000 (22:15 +0000)]
Add a regression test to verify that the stack depth checker actually
works (and max_stack_depth is not set too high for the platform).
Inspired by trouble report from Brian Betts.

19 years agoUpdate to Russian FAQ, HEAD and 8.0.X.
Bruce Momjian [Fri, 11 Feb 2005 04:53:51 +0000 (04:53 +0000)]
Update to Russian FAQ, HEAD and 8.0.X.

19 years agoMake clearer warning about using 'now' with DEFAULT:
Bruce Momjian [Fri, 11 Feb 2005 04:31:54 +0000 (04:31 +0000)]
Make clearer warning about using 'now' with DEFAULT:

SELECT CURRENT_TIMESTAMP;
SELECT now();
SELECT TIMESTAMP 'now';  -- incorrect for use with DEFAULT

19 years agoMention that some psql environment variables come from libpq and note
Bruce Momjian [Fri, 11 Feb 2005 04:19:05 +0000 (04:19 +0000)]
Mention that some psql environment variables come from libpq and note
more variables can be found in the libpq manual section.

Mention .pgpass in the psql manual page section dealing with connection
parameters and point to the libpq section for more details.

Backpatch to 8.0.X.

19 years agoAdjust input routines for float4, float8 and oid to reject the empty string
Neil Conway [Fri, 11 Feb 2005 04:09:05 +0000 (04:09 +0000)]
Adjust input routines for float4, float8 and oid to reject the empty string
as valid input (it was previously treated as 0). This input was deprecated
in 8.0 (and a warning was emitted). Regression tests updated.

19 years agoFix ANALYZE to accumulate some minimal statistics for an all-null column.
Tom Lane [Fri, 11 Feb 2005 00:41:12 +0000 (00:41 +0000)]
Fix ANALYZE to accumulate some minimal statistics for an all-null column.
Per gripes from Mike Mascari and Bernd Heller.

19 years agoFix SPI cursor support to allow scanning the results of utility commands
Tom Lane [Thu, 10 Feb 2005 20:36:28 +0000 (20:36 +0000)]
Fix SPI cursor support to allow scanning the results of utility commands
that return tuples (such as EXPLAIN).  Per gripe from Michael Fuhr.
Side effect: fix an old bug that unintentionally disabled backward scans
for all SPI-created cursors.

19 years agoFixed changelog entry to list correct bug reporter.
Michael Meskes [Thu, 10 Feb 2005 08:08:52 +0000 (08:08 +0000)]
Fixed changelog entry to list correct bug reporter.

19 years agoFixed more parsing bugs in other CREATE statements as pointed out by TANIDA
Michael Meskes [Thu, 10 Feb 2005 08:06:35 +0000 (08:06 +0000)]
Fixed more parsing bugs in other CREATE statements as pointed out by TANIDA
Yutaka <tanida@sra.co.jp>.

19 years agoAdd some index entries for RAISE and exception handling in PL/PgSQL. Per
Neil Conway [Thu, 10 Feb 2005 06:08:22 +0000 (06:08 +0000)]
Add some index entries for RAISE and exception handling in PL/PgSQL. Per
suggestion from Rainer Brandt.

19 years agoImprovements to documentation of shared memory configuration under
Neil Conway [Thu, 10 Feb 2005 05:14:58 +0000 (05:14 +0000)]
Improvements to documentation of shared memory configuration under
FreeBSD. From Mark Kirkwood, editorializing by Neil Conway.

19 years agoUse now() rather than 'now' in an example in the PL/PgSQL docs. From David
Neil Conway [Thu, 10 Feb 2005 05:01:07 +0000 (05:01 +0000)]
Use now() rather than 'now' in an example in the PL/PgSQL docs. From David
Fetter and Ben Calvert.

19 years agoUpdate pginstaller URL to http://www.postgresql.org/ftp/win32/.
Bruce Momjian [Thu, 10 Feb 2005 04:52:31 +0000 (04:52 +0000)]
Update pginstaller URL to http://www.postgresql.org/ftp/win32/.

Backpatch to 8.0.X.

19 years agoALTER TABLE ADD COLUMN exhibits a significant memory leak when adding a
Neil Conway [Wed, 9 Feb 2005 23:17:26 +0000 (23:17 +0000)]
ALTER TABLE ADD COLUMN exhibits a significant memory leak when adding a
column with a default expression. In that situation, we need to rewrite
the heap relation. To evaluate the new default expression, we use
ExecEvalExpr(); however, this can allocate memory in the current memory
context, and ATRewriteTable() does not switch out of the active portal's
heap memory context. The end result is a rather large memory leak (on
the order of gigabytes for a reasonably sized table).

This patch changes ATRewriteTable() to switch to the per-tuple memory
context before beginning the per-tuple loop. It also removes an explicit
heap_freetuple() in the loop, since that is no longer needed.

In an unrelated change, I noticed the code was scanning through the
attributes of the new tuple descriptor for each tuple of the old table.
I changed this to use precomputation, which should slightly speed up
the loop.

Thanks to steve@deefs.net for reporting the leak.

19 years agoFixed bug in parsing of CREATE AS statement.
Michael Meskes [Wed, 9 Feb 2005 11:26:44 +0000 (11:26 +0000)]
Fixed bug in parsing of CREATE AS statement.

19 years agoSpacing:
Bruce Momjian [Tue, 8 Feb 2005 03:23:51 +0000 (03:23 +0000)]
Spacing:

< *  Allow the PITR process to be debugged and data examined
> * Allow the PITR process to be debugged and data examined

19 years agoIt seems like most people don't want automatic failover so I am removing
Bruce Momjian [Tue, 8 Feb 2005 03:21:02 +0000 (03:21 +0000)]
It seems like most people don't want automatic failover so I am removing
the item:

<  o Automatic failover
<
<    The proper solution to this will probably the use of a master/slave
<    replication solution like Sloney and a connection pooling tool like
<    pgpool.
<

19 years agoBetter late than never: document that the GiST API changed in 8.0 in the
Neil Conway [Sun, 6 Feb 2005 22:31:50 +0000 (22:31 +0000)]
Better late than never: document that the GiST API changed in 8.0 in the
"incompatibilities" section of the release notes.

19 years agoDocument array behavior for out-of-range subscripts.
Tom Lane [Sun, 6 Feb 2005 20:59:30 +0000 (20:59 +0000)]
Document array behavior for out-of-range subscripts.

19 years agoRepair CLUSTER failure after ALTER TABLE SET WITHOUT OIDS. Turns out
Tom Lane [Sun, 6 Feb 2005 20:19:08 +0000 (20:19 +0000)]
Repair CLUSTER failure after ALTER TABLE SET WITHOUT OIDS.  Turns out
there are corner cases involving dropping toasted columns in which the
previous coding would fail, too: the new version of the table might not
have any TOAST table, but we'd still propagate possibly-wide values of
dropped columns forward.