Commit Graph

21666 Commits

Author SHA1 Message Date
Tom Lane cefcbbf1fd Push the responsibility for handling ignore_killed_tuples down into
_bt_checkkeys(), instead of checking it in the top-level nbtree.c routines
as formerly.  This saves a little bit of loop overhead, but more importantly
it lets us skip performing the index key comparisons for dead tuples.
2005-12-07 19:37:53 +00:00
Tom Lane f1b059af12 A couple of tiny performance hacks in _bt_step(). Remove PageIsEmpty
checks, which were once needed because PageGetMaxOffsetNumber would
fail on empty pages, but are now just redundant.  Also, don't set up
local variables that aren't needed in the fast path --- most of the
time, we only need to advance offnum and not step across a page boundary.
Motivated by noticing _bt_step at the top of OProfile profile for a
pgbench run.
2005-12-07 18:03:48 +00:00
Bruce Momjian 10a2df28c0 Update:
<   at initdb time or optionally later.
>   at initdb time or optionally later.  Consider O_SYNC when
>   O_DIRECT exists.
2005-12-07 17:29:14 +00:00
Tom Lane 6de1fef52c Fix incorrect SPI example, per Yoshihisa Nakano. 2005-12-07 15:39:25 +00:00
Tom Lane a9b1ff4c1d Fix a couple of lingering references to POSTQUEL query syntax, per Simon. 2005-12-07 15:27:42 +00:00
Tom Lane 13ea825b6d Spell "explicitly" correctly, per Simon. 2005-12-07 15:20:56 +00:00
Bruce Momjian 823702be9d Improve lazy vacuum wording. 2005-12-07 14:35:45 +00:00
Teodor Sigaev 9551ab2fe9 Fix small memory leak 2005-12-07 13:30:15 +00:00
Teodor Sigaev 4f94b49a31 Improve word parser.
- allow ~ in filenames
 - -8.2.1 now is '-' and '8.2.1' instead of '-8.2' '.' '3'
 - '.text' now is not a file
2005-12-07 13:12:54 +00:00
Bruce Momjian 95aca45010 Clarify vacuum lazy can shrink a file under certain circumstances. 2005-12-07 05:35:53 +00:00
Tom Lane 887a7c61f6 Get rid of slru.c's hardwired insistence on a fixed number of slots per
SLRU area.  The number of slots is still a compile-time constant (someday
we might want to change that), but at least it's a different constant for
each SLRU area.  Increase number of subtrans buffers to 32 based on
experimentation with a heavily subtrans-bashing test case, and increase
number of multixact member buffers to 16, since it's obviously silly for
it not to be at least twice the number of multixact offset buffers.
2005-12-06 23:08:34 +00:00
Bruce Momjian 3001b4697d Update iconv wording, per Peter. 2005-12-06 21:00:53 +00:00
Bruce Momjian 371879ca8e Add:
> * Add GUC variable to run a command on database panic or
>   smart/fast/immediate shutdown
2005-12-06 20:47:05 +00:00
Bruce Momjian 40c729ae6c Highlight diff idea for iconv. 2005-12-06 20:25:42 +00:00
Bruce Momjian 363fcbafa1 iconv uses UTF-8, not UTF8. 2005-12-06 20:19:17 +00:00
Bruce Momjian 394fedfd72 Document method of removing invalid UTF8 escape sequences from dump
file.  Backpatch to 8.1.X.

Paul Lindner
2005-12-06 19:26:43 +00:00
Bruce Momjian af2e8a872d Documentation cleanup mention:
non-ascii                       convert to & escapes
2005-12-06 18:45:18 +00:00
Bruce Momjian dae896b67d Since my name has a non-ascii-letter in it, it's often spelled wrong. In
the latest release notes there is a latin1 character that shouldn't be
there so I made a patch to fix that. This patch also fixes some old
entries that uses o instead of &ouml; (which is also wrong but not as
bad as including a latin1 character in the sgml file).

Dennis Bj?rklund
2005-12-06 18:43:26 +00:00
Bruce Momjian ca430500ce Add documentation on the use of *printf() macros and libintl.
Backpatch to 8.1.X.
2005-12-06 18:35:10 +00:00
Teodor Sigaev 73f47aa0cd Fix stupid bug with sizeof 2005-12-06 18:22:33 +00:00
Tom Lane a615acf555 Arrange for read-only accesses to SLRU page buffers to take only a shared
lock, not exclusive, if the desired page is already in memory.  This can
be demonstrated to be a significant win on the pg_subtrans cache when there
is a large window of open transactions.  It should be useful for pg_clog
as well.  I didn't try to make GetMultiXactIdMembers() use the code, as
that would have taken some restructuring, and what with the local cache
for multixact contents it probably wouldn't really make a difference.
Per my recent proposal.
2005-12-06 18:10:06 +00:00
Tom Lane 953208a34c In a nestloop inner indexscan, it's OK to use pushed-down baserestrictinfo
clauses even if it's an outer join.  This is a corner case since such
clauses could only arise from weird OUTER JOIN ON conditions, but worth
fixing.  Per example from Ron at cheapcomplexdevices.com.
2005-12-06 16:50:36 +00:00
Tom Lane 974c5a8730 ecpg/pgtypeslib seems to need snprintf.c pulled in, too. 2005-12-06 05:26:21 +00:00
Tom Lane 0d2aad85d8 Put undef's before extern declarations that need 'em, per Andrew Dunstan. 2005-12-06 05:13:46 +00:00
Bruce Momjian ef31c2bf2e Add comment on why pg *printf functions are used unconditionally on
Win32.

Backpatch to 8.1.X.
2005-12-06 04:53:02 +00:00
Tom Lane e0e7589169 Make Win32 build use our port/snprintf.c routines, instead of depending
on libintl which may or may not provide what we need.  Make a few marginal
cleanups to ensure this works.  Andrew Dunstan and Tom Lane.
2005-12-06 02:29:04 +00:00
Tom Lane 1daac8e165 Document return-value conventions used by this implementation, per
suggestion from Bruce.
2005-12-05 21:57:00 +00:00
Teodor Sigaev e8c81e179e Improve word parser.
- improve file and path recognition
 - fix misspeling
 - improve tag recognition
2005-12-05 18:13:22 +00:00
Tom Lane 8cb4e4f6bd Add regression test to see if the min/max values of int8 convert correctly. 2005-12-05 04:13:38 +00:00
Tom Lane 3311c7669a Fix a rather sizable number of problems in our homegrown snprintf, such as
incorrect implementation of argument reordering, arbitrary limit of output
size for sprintf and fprintf, willingness to access more bytes than "%.Ns"
specification allows, wrong formatting of LONGLONG_MIN, various field-padding
bugs and omissions.  I believe it now accurately implements a subset of
the Single Unix Spec requirements (remaining unimplemented features are
documented, too).  Bruce Momjian and Tom Lane.
2005-12-05 02:39:38 +00:00
Bruce Momjian 99552287e1 Update:
< 	  Win32 API, and we have to make sure MinGW handles it.
> 	  Win32 API, and we have to make sure MinGW handles it.  Another
> 	  option is to wait for the MinGW project to fix it, or use the
> 	  code from the LibGW32C project as a guide.
2005-12-04 21:16:51 +00:00
Bruce Momjian 8752479dfc Add:
> 	o Add long file support for binary pg_dump output
>
> 	  While Win32 supports 64-bit files, the MinGW API does not,
> 	  meaning we have to build an fseeko replacement on top of the
> 	  Win32 API, and we have to make sure MinGW handles it.
2005-12-04 04:33:18 +00:00
Bruce Momjian bedb5fc309 Add:
> * Add SPI_gettypmod() to return the typemod for a TupleDesc
2005-12-04 04:14:43 +00:00
Bruce Momjian 49bbff0f8d Add for autovacuum:
> 	o Consider logging activity either to the logs or a system view
2005-12-04 04:02:55 +00:00
Bruce Momjian 10e3d224e0 Add configure flag to allow libedit to be preferred over GNU readline:
--with-libedit-preferred  prefer BSD Libedit over GNU Readline
2005-12-04 03:52:29 +00:00
Tom Lane e4a9229d55 Treat procedural languages as owned by the bootstrap superuser, rather
than owned by nobody.  This results in cleaner display of language ACLs,
since the backend's aclchk.c uses the same convention.  AFAICS there is
no practical difference but it's nice to avoid emitting SET SESSION
AUTHORIZATION; also this will make it easier to transition pg_dump to
some future version in which we may include an explicit ownership column
in pg_language.  Per gripe from David Begley.
2005-12-03 21:06:18 +00:00
Tom Lane 6d4bcda38c Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX.
Per example from Dirk Pirschel.
2005-12-03 20:16:31 +00:00
Bruce Momjian d20901a39b Allow to_char(interval) and to_char(time) to use AM/PM specifications.
Map them to a single day, so '30 hours' is 'AM'.

Have to_char(interval) and to_char(time) use "HH", "HH12" as 12-hour
intervals, rather than bypass and print the full interval hours.  This
is neeeded because to_char(time) is mapped to interval in this function.
Intervals should use "HH24", and document suggestion.

Allow "D" format specifiers for interval/time.
2005-12-03 16:45:06 +00:00
Bruce Momjian eb339c7840 Item removed:
< * Add function to return the thread safety status of libpq and ecpg
2005-12-03 13:03:41 +00:00
Tom Lane a98871b7ac Tweak indexscan machinery to avoid taking an AccessShareLock on an index
if we already have a stronger lock due to the index's table being the
update target table of the query.  Same optimization I applied earlier
at the table level.  There doesn't seem to be much interest in the more
radical idea of not locking indexes at all, so do what we can ...
2005-12-03 05:51:03 +00:00
Tom Lane 1cf65140d0 Fix obsolete description of -h option, per Andreas Schmidt. 2005-12-02 23:13:46 +00:00
Tom Lane 6f5efe3d16 Fix obsolete comment. 2005-12-02 22:06:07 +00:00
Tom Lane d780f07ac1 Adjust scan plan nodes to avoid getting an extra AccessShareLock on a
relation if it's already been locked by execMain.c as either a result
relation or a FOR UPDATE/SHARE relation.  This avoids an extra trip to
the shared lock manager state.  Per my suggestion yesterday.
2005-12-02 20:03:42 +00:00
Bruce Momjian 5ab2598875 Remove idea of increasing NUMERIC length:
< * Change NUMERIC to enforce the maximum precision, and increase it
> * Change NUMERIC to enforce the maximum precision
2005-12-02 17:39:44 +00:00
Michael Meskes 5106aff99a Added special handling of CONNECTION variable that is used by ECPG instead of given to the backend. 2005-12-02 15:03:57 +00:00
Bruce Momjian 9322a04759 Add calcluation of bitmap storage capacity.
<   be cleared when a heap tuple is expired.  Another idea is to maintain
<   a bitmap of heap pages where all rows are visible to all backends,
<   and allow index lookups to reference that bitmap to avoid heap
<   lookups, perhaps the same bitmap we might add someday to determine
<   which heap pages need vacuuming.
>   be cleared when a heap tuple is expired.
>
>   Another idea is to maintain a bitmap of heap pages where all rows
>   are visible to all backends, and allow index lookups to reference
>   that bitmap to avoid heap lookups, perhaps the same bitmap we might
>   add someday to determine which heap pages need vacuuming.  Frequently
>   accessed bitmaps would have to be stored in shared memory.  One 8k
>   page of bitmaps could track 512MB of heap pages.
2005-12-02 04:28:19 +00:00
Bruce Momjian cf17131767 Remove comment on errno=0 lines, but add mention to port/strtol.c function. 2005-12-02 02:49:11 +00:00
Tom Lane de1dfc1209 Rearrange code in ExecInitBitmapHeapScan so that we don't initialize the
child plan nodes until we have acquired lock on the relation to scan.
The relative order of initialization of plan nodes isn't real important in
other cases, but it's critical here because one is supposed to lock a
relation before its indexes, not vice versa.  The original coding was at
least vulnerable to deadlock against DROP INDEX, and perhaps worse things.
2005-12-02 01:29:55 +00:00
Bruce Momjian 113ece8f3d Add all heap page rows visible bitmap idea:
<   the heap.  One way to allow this is to set a bit to index tuples
>   the heap.  One way to allow this is to set a bit on index tuples
<   be cleared when a heap tuple is expired.
<
>   be cleared when a heap tuple is expired.  Another idea is to maintain
>   a bitmap of heap pages where all rows are visible to all backends,
>   and allow index lookups to reference that bitmap to avoid heap
>   lookups, perhaps the same bitmap we might add someday to determine
>   which heap pages need vacuuming.
2005-12-01 22:30:43 +00:00
Bruce Momjian 915fb7f687 Add MERGE TODO.detail:
>   [merge]
378a380
>   [merge]
2005-12-01 22:12:35 +00:00