1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-21 12:05:57 +03:00

21700 Commits

Author SHA1 Message Date
Bruce Momjian
a5884d5dc8 Updated Japanese FAQ, version 2.
J.Kuwamura
2006-04-11 21:23:28 +00:00
Bruce Momjian
5052aa2edb Update Japanese FAQ, backpatch.
J.Kuwamura
2006-04-11 21:19:05 +00:00
Bruce Momjian
cc1b59c951 Oops, sysctl, not sysconf, for FreeBSD. 2006-04-11 21:06:19 +00:00
Bruce Momjian
e860973aed More FreeBSD jail wording improvements. 2006-04-11 19:46:48 +00:00
Bruce Momjian
493eea649c Add documentation about running postmasters in FreeBSD jails (use
separate users).
2006-04-11 19:28:03 +00:00
Bruce Momjian
36d5976f9e There is updated Russian translation of the FAQ in the attachment.
Victor Vislobokov
2006-04-11 15:49:04 +00:00
Tom Lane
d329913c9c Revert my best_inner_indexscan patch of yesterday, which turns out to have
had a bad side-effect: it stopped finding plans that involved BitmapAnd
combinations of indexscans using both join and non-join conditions.  Instead,
make choose_bitmap_and more aggressive about detecting redundancies between
BitmapOr subplans.
2006-04-09 18:18:59 +00:00
Tom Lane
89d75c56db Fix best_inner_indexscan to actually enforce that an "inner indexscan" use
at least one join condition as an indexqual.  Before bitmap indexscans, this
oversight didn't really cost much except for redundantly considering the
same join paths twice; but as of 8.1 it could result in silly bitmap scans
that would do the same BitmapOr twice and then BitmapAnd these together :-(
2006-04-08 21:32:25 +00:00
Tom Lane
cd360f2484 Fix pg_dumpall to do something sane when a pre-8.1 installation has
identically named user and group: we merge these into a single entity
with LOGIN permission.  Also, add ORDER BY commands to ensure consistent
dump ordering, for ease of comparing outputs from different installations.
2006-04-07 21:26:42 +00:00
Andrew Dunstan
a9351518a7 Revert getaddrinfo configure changes until we get a solution that is
properly tested on Tru64 - pre recent discussion (or lack thereof) on -hackers.
2006-04-07 17:42:50 +00:00
Tom Lane
23c6f11b09 Fix make_restrictinfo_from_bitmapqual() to preserve AND/OR flatness of its
output, ie, no OR immediately below an OR.  Otherwise we get Asserts or
wrong answers for cases such as
	select * from tenk1 a, tenk1 b
	where (a.ten = b.ten and (a.unique1 = 100 or a.unique1 = 101))
	   or (a.hundred = b.hundred and a.unique1 = 42);
Per report from Rafael Martinez Guerrero.
2006-04-07 17:05:47 +00:00
Bruce Momjian
69ab90c775 Update AIX FAQ to show readline options more clearly.
Backpatch FAQ's to 8.1.X.
2006-04-05 22:56:12 +00:00
Teodor Sigaev
06e4478877 Detoast query in g_intbig_consistent and copy query in g_int_consistent.
Minor cleanups.
2006-04-03 09:35:35 +00:00
Tom Lane
e88d84b737 Adjust interval-addition test so that it won't fail on DST transition days.
Strange that we missed this DST dependence while fixing the others.
2006-04-02 19:40:02 +00:00
Tom Lane
21b54ed81a Suppress attempts to report dropped tables to the stats collector from a
startup or recovery process.  Since such a process isn't a real backend,
pgstat.c gets confused.  This accounts for recent reports of strange
"invalid server process ID -1" log messages during crash recovery.
There isn't any point in attempting to make the report, since we'll discard
stats in such scenarios anyhow.
2006-03-30 22:11:59 +00:00
Tom Lane
c119cdcab0 TablespaceCreateDbspace should function normally even on platforms that do not
have symlinks (ie, Windows).  Although it'll never be called on to do anything
useful during normal operation on such a platform, it's still needed to
re-create dropped directories during WAL replay.
2006-03-29 15:15:50 +00:00
Tom Lane
fdc28fdcfa Disable full_page_writes, because turning it off risks causing crash-recovery
failures even when the hardware and OS did nothing wrong.  Per recent analysis
of a problem report from Alex Bahdushka.

For the moment I've just diked out the test of the parameter, rather than
removing the GUC infrastructure and documentation, in case we conclude that
there's something salvageable there.  There seems no chance of it being
resurrected in the 8.1 branch though.
2006-03-28 22:01:25 +00:00
Tom Lane
3c3ed28c75 Repair longstanding error in btree xlog replay: XLogReadBuffer should be
passed extend = true whenever we are reading a page we intend to reinitialize
completely, even if we think the page "should exist".  This is because it
might indeed not exist, if the relation got truncated sometime after the
current xlog record was made and before the crash we're trying to recover
from.  These two thinkos appear to explain both of the old bug reports
discussed here:
http://archives.postgresql.org/pgsql-hackers/2005-05/msg01369.php
2006-03-28 21:17:31 +00:00
Tom Lane
df7b5f5734 Comments in IndexBuildHeapScan describe the indexing of recently-dead
tuples as needed "to keep VACUUM from complaining", but actually there is
a more compelling reason to do it: failure to do so violates MVCC semantics.
This is because a pre-existing serializable transaction might try to use
the index after we finish (re)building it, and it might fail to find tuples
it should be able to see.  We got this mostly right, but not in the case
of partial indexes: the code mistakenly discarded recently-dead tuples for
partial indexes.  Fix that, and adjust the comments.
2006-03-24 23:02:23 +00:00
Tom Lane
db61437b27 Fix plpgsql to pass only one copy of any given plpgsql variable into a SQL
command or expression, rather than one copy for each textual occurrence as
it did before.  This might result in some small performance improvement,
but the compelling reason to do it is that not doing so can result in
unexpected grouping failures because the main SQL parser won't see different
parameter numbers as equivalent.  Add a regression test for the failure case.
Per report from Robert Davidson.
2006-03-23 04:22:45 +00:00
Tom Lane
a155814e37 Improve performance of our private version of qsort. Per recent testing,
the logic it contained to switch to insertion sort for near-sorted input was
in fact a big loss, because it could fairly easily be fooled into applying
insertion sort to large subfiles that weren't all that well ordered.  Remove
that, and instead add a simple check for already-perfectly-sorted input, as
per suggestion from Dann Corbit.  This adds at worst O(N*lgN) overhead, and
usually far less, while sometimes allowing a subfile sort to finish in O(N)
time.  Preliminary testing says this is an improvement over the basic
Bentley & McIlroy code for many nonrandom inputs, and it costs almost
nothing when the input is random.
2006-03-21 19:49:19 +00:00
Michael Meskes
85fa81f65b Fixed bug 2330: Wrong error code in case of a duplicate key 2006-03-19 12:29:40 +00:00
Tom Lane
a9f18b97ba Adjust join_1.out to match Windows behavior for new mergejoin regression
test, per Dave Page and buildfarm.  Perhaps we will need a join_2 instead,
but for the moment assume that this test tracks the other diffs.
2006-03-19 01:19:55 +00:00
Neil Conway
e78be57d19 The call to DNSServiceRegistrationCreate in postmaster.c does incorrect
byte-swapping on the port number which causes the call to fail on Intel
Macs.

This patch uses htons() instead of htonl() and fixes this bug.

Ashley Clark
2006-03-18 22:10:11 +00:00
Tom Lane
8bf221b09b Fix bug introduced into mergejoin logic by performance improvement patch of
2005-05-13.  When we find that a new inner tuple can't possibly match any
outer tuple (because it contains a NULL), we can't immediately skip the
tuple when we are in NEXTINNER state.  Doing so can lead to emitting
multiple copies of the tuple in FillInner mode, because we may rescan the
tuple after returning to a previous marked tuple.  Instead, proceed to
NEXTOUTER state the same as we used to do.  After we've found that there's
no need to return to the marked position, we can go to SKIPINNER_ADVANCE
state instead of SKIP_TEST when the inner tuple is unmatchable; this
preserves the performance improvement.  Per bug report from Bruce.
I also made a couple of cosmetic code rearrangements and added a regression
test for the problem.
2006-03-17 19:38:21 +00:00
Tom Lane
d777a57133 Add a CHECK_FOR_INTERRUPTS() in _bt_buildadd(). This fixes problem
with not responding to query cancel during the last stage of btree index
creation.
2006-03-10 20:18:25 +00:00
Tom Lane
effecebad1 Fix order of linking of libxslt and libxml2, per Dave Page. 2006-03-10 15:39:53 +00:00
Tom Lane
98ab0c96dd Add a CHECK_FOR_INTERRUPTS() to the loop in ExecMakeTableFunctionResult.
Otherwise you can't cancel queries like select ... from generate_series(1,1000000).
2006-03-10 01:51:34 +00:00
Tom Lane
0a5c6fadf4 Remove somebody's flight of fancy about an UPDATE with ORDER BY and LIMIT. 2006-03-08 22:59:17 +00:00
Bruce Momjian
a0af608adc * Stephen Frost (sfrost@snowman.net) wrote:
>   I've now tested this patch at home w/ 8.2HEAD and it seems to fix the
>   bug.  I plan on testing it under 8.1.2 at work tommorow with
>   mod_auth_krb5, etc, and expect it'll work there.  Assuming all goes
>   well and unless someone objects I'll forward the patch to -patches.
>   It'd be great to have this fixed as it'll allow us to use Kerberos to
>   authenticate to phppgadmin and other web-based tools which use
>   Postgres.

  While playing with this patch under 8.1.2 at home I discovered a
  mistake in how I manually applied one of the hunks to fe-auth.c.
  Basically, the base code had changed and so the patch needed to be
  modified slightly.  This is because the code no longer either has a
  freeable pointer under 'name' or has 'name' as NULL.

  The attached patch correctly frees the string from pg_krb5_authname
  (where it had been strdup'd) if and only if pg_krb5_authname returned
  a string (as opposed to falling through and having name be set using
  name = pw->name;).  Also added a comment to this effect.

Backpatch to 8.1.X.

Stephen Frost
2006-03-06 17:59:42 +00:00
Bruce Momjian
a643385eaf Check for "msys" so it doesn't use 'con' by checking for an evironment
variable.
2006-03-05 05:33:19 +00:00
Tom Lane
53bbc47c2b Prevent lazy_space_alloc from making requests that exceed MaxAllocSize,
per report from Stefan Kaltenbrunner.
2006-03-04 19:09:23 +00:00
Tatsuo Ishii
8ccc7dfaf1 Tighten up SJIS byte sequence check. Now we reject invalid SJIS byte
sequence such as "0x95 0x27". Patches from Akio Ishida.
2006-03-04 11:10:44 +00:00
Bruce Momjian
cff68063de Use DEVTTY as 'con' on Win32 as a replacement for /dev/tty. 2006-03-04 04:30:51 +00:00
Bruce Momjian
e57415c507 Avoid trying to open /dev/tty on Win32. Some Win32 systems have
/dev/tty, but it isn't a device file and doesn't work as expected.

This fixes a known bug where psql does not prompt for a password on some
Win32 systems.

Backpatch to 8.1.X.

Robert Kinberg
2006-03-03 23:49:21 +00:00
Bruce Momjian
69c539b535 Update ipcclean to use try 'id' first for root check. 2006-03-03 21:52:47 +00:00
Bruce Momjian
7a88571f03 In ipcclean, check LOGNAME only if USER is not set.
Fixes problem with 'su' on some platforms.
2006-03-03 16:49:30 +00:00
Bruce Momjian
2c620740bd Appended is a small documentation patch that adds a note to the CREATE
ROLE page, based on what Tom Lane told me here:

	http://archives.postgresql.org/pgsql-general/2005-11/msg00998.php


Joachim Wieland
2006-03-03 03:06:17 +00:00
Tom Lane
69f69808c5 Fix ancient error in large objects usage example: overwrite() subroutine
was opening with INV_READ flag and then writing.  Prior to 8.1 the backend
did not reject this, but now it does.
2006-03-02 21:49:19 +00:00
Tom Lane
0138fb8697 Repair oidvectorrecv and int2vectorrecv, which I broke while changing
them to use array_recv :-(.  Per report from Tim Kordas.
2006-03-02 21:13:11 +00:00
Bruce Momjian
5e4bf929b3 Update OS X shared memory documentation for 10.3.9 and later to use
/etc/sysctl.conf.

Chris Campbell
2006-03-02 20:30:33 +00:00
Bruce Momjian
3fb582c3bc Backpatch to 8.1.X. Already applied to CVS HEAD.
---------------------------------------------------------------------------

> True, but they're not being used where you'd expect. This seems to be
> something to do with the fact that it's not pg_authid which is being
> accessed, but rather the view pg_roles.

I looked into this and it seems the problem is that the view doesn't
get flattened into the main query because of the has_nullable_targetlist
limitation in prepjointree.c.  That's triggered because pg_roles has
        '********'::text AS rolpassword
which isn't nullable, meaning it would produce wrong behavior if
referenced above the outer join.

Ultimately, the reason this is a problem is that the planner deals only
in simple Vars while processing joins; it doesn't want to think about
expressions.  I'm starting to think that it may be time to fix this,
because I've run into several related restrictions lately, but it seems
like a nontrivial project.

In the meantime, reducing the LEFT JOIN to pg_roles to a JOIN as per
Peter's suggestion seems like the best short-term workaround.
2006-03-02 19:40:29 +00:00
Bruce Momjian
006bd450fe Mark tsearch2 item as Tom's, not Teodor's. 2006-03-02 19:35:14 +00:00
Tom Lane
b3c47b1e5e Fix possible crash at transaction end when a plpgsql function is used and
then modified within the same transaction.  The code was using a linked list
of active PLpgSQL_expr structs, which was OK when it was written because
plpgsql never released any parse data structures for the life of the backend.
But since Neil fixed plpgsql's memory management, elements of the linked list
could be freed, leading to crash when the list is chased.  Per report and test
case from Kris Jurka.
2006-03-02 05:34:17 +00:00
Bruce Momjian
15516c5f0b Update FAQ_DEV text file. 2006-03-01 22:25:36 +00:00
Bruce Momjian
88a4314bb1 Update patch generation instructions.
Robert Treat
2006-03-01 22:23:49 +00:00
Bruce Momjian
e559dba846 Update Japanese FAQ, backpatched to 8.1.X. 2006-03-01 20:31:56 +00:00
Bruce Momjian
6853e34132 Add pg_service.conf documentation for libpq. 2006-03-01 00:23:33 +00:00
Bruce Momjian
3952eecd4a Fix computation of sample table size. 2006-02-25 04:30:06 +00:00
Bruce Momjian
032858216c Backpatch FAQ changes to 8.1.X. 2006-02-24 15:00:48 +00:00