• R/O
  • HTTP
  • SSH
  • HTTPS

syncrep: List of commits

PostgreSQL9.0用の同期レプリケーションパッチ


RSS
Rev. Time Author
b23aeb6 2011-05-25 06:57:32 Tom Lane

Cleanup for pull-up-isReset patch.

Clear isReset before, not after, calling the context-specific alloc method,
so as to preserve the option to do a tail call in MemoryContextAlloc
(and also so this code isn't assuming that a failed alloc call won't have
changed the context's state before failing). Fix missed direct invocation
of reset method. Reformat a comment.

11c08c3 2011-05-25 04:59:34 Bruce Momjian

In pg_upgrade, do case-insensitive checks of locale, encoding, and ctype
because these are often inconsistently capitalized.

8ff1f6a 2011-05-25 04:50:50 Tom Lane

Adjust configure's probe for libselinux so it rejects too-old versions.

We need at least version 2.0.93, so probe for a function that was added
in that version.

Kaigai Kohei

f506559 2011-05-25 03:35:06 Peter Eisentraut

Add a "local" replication sample entry

Also adjust alignment a bit to distinguish commented out from comment.

c8d4515 2011-05-25 03:35:06 Peter Eisentraut

Message improvements

c2a366d 2011-05-25 03:20:57 Tom Lane

Avoid uninitialized bits in the result of QTN2QT().

Found with additional valgrind testing.

Noah Misch

cc24fb4 2011-05-25 03:20:08 Tom Lane

Avoid uninitialized bits in the result of QTN2QT().

Found with additional valgrind testing.

Noah Misch

0e6a2ec pgrex pgrex904 pgrex904-1.0 2011-05-24 13:12:10 MasaoFujii

Merge commit 'REL9_0_4' into pgrex904

59a4a57 2011-05-24 05:35:22 Tom Lane

Make plpgsql complain about conflicting IN and OUT parameter names.

The core CREATE FUNCTION code only enforces that IN parameter names are
non-duplicate, and that OUT parameter names are separately non-duplicate.
This is because some function languages might not have any confusion
between the two. But in plpgsql, such names are all in the same namespace,
so we'd better disallow it.

Per a recent complaint from Dan S. Not back-patching since this is a small
issue and the change could cause unexpected failures if we started to
enforce it in a minor release.

34be83b 2011-05-24 04:24:44 Heikki Linnakangas

Fix integer overflow in text_format function, reported by Dean Rasheed.

In the passing, clarify the comment on why text_format_nv wrapper is needed.

7149b12 2011-05-24 04:17:18 Robert Haas

Improve hash_array() logic for combining hash values.

The new logic is less vulnerable to transpositions.

This invalidates the contents of hash indexes built with the old
functions; hence, bump catversion.

Dean Rasheed

e48433e 2011-05-24 03:42:18 Tom Lane

Lobotomize typmod check in convert_tuples_by_position, back branches only.

convert_tuples_by_position was rejecting attempts to coerce a record field
with -1 typmod to the same type with a non-default typmod. This is in fact
the "correct" thing to do (since we're just going to do a type relabeling,
not invoke any length-conversion cast function); but it results in
rejecting valid cases like bug #6020, because the source record's tupdesc
is built from Params that don't have typmod assigned. Since that's a
regression from previous versions, which accepted this code, we have to do
something about it. In HEAD, I've fixed the problem properly by causing
the Params to receive the correct typmods; but the potential for incidental
behavioral changes seems high enough to make it unattractive to make the
same change in released branches. (And it couldn't be fixed that way in
8.4 anyway...) Hence this patch just modifies convert_tuples_by_position
to not complain if either the input or the output tupdesc has typmod -1.
This is still a shade tighter checking than we did before 9.0, since before
that plpgsql failed to consider typmods at all when checking record
compatibility. (convert_tuples_by_position is currently used only by
plpgsql, so we're not affecting other behavior.)

Back-patch to 8.4, since we recently back-ported convert_tuples_by_position
into that branch.

c58b945 2011-05-24 03:21:45 Peter Eisentraut

Message style improvements

7541d32 2011-05-24 02:59:06 Heikki Linnakangas

Replace strdup() with pstrdup(), to avoid leaking memory.

It's been like this since the seg module was introduced, so backpatch to
8.2 which is the oldest supported version.

168174c 2011-05-24 01:52:51 Tom Lane

Install defenses against overflow in BuildTupleHashTable().

The planner can sometimes compute very large values for numGroups, and in
cases where we have no alternative to building a hashtable, such a value
will get fed directly to BuildTupleHashTable as its nbuckets parameter.
There were two ways in which that could go bad. First, BuildTupleHashTable
declared the parameter as "int" but most callers were passing "long"s,
so on 64-bit machines undetected overflow could occur leading to a bogus
negative value. The obvious fix for that is to change the parameter to
"long", which is what I've done in HEAD. In the back branches that seems a
bit risky, though, since third-party code might be calling this function.
So for them, just put in a kluge to treat negative inputs as INT_MAX.
Second, hash_create can go nuts with extremely large requested table sizes
(notably, my_log2 becomes an infinite loop for inputs larger than
LONG_MAX/2). What seems most appropriate to avoid that is to bound the
initial table size request to work_mem.

This fixes bug #6035 reported by Daniel Schreiber. Although the reported
case only occurs back to 8.4 since it involves WITH RECURSIVE, I think
it's a good idea to install the defenses in all supported branches.

299d171 2011-05-24 01:52:46 Tom Lane

Install defenses against overflow in BuildTupleHashTable().

The planner can sometimes compute very large values for numGroups, and in
cases where we have no alternative to building a hashtable, such a value
will get fed directly to BuildTupleHashTable as its nbuckets parameter.
There were two ways in which that could go bad. First, BuildTupleHashTable
declared the parameter as "int" but most callers were passing "long"s,
so on 64-bit machines undetected overflow could occur leading to a bogus
negative value. The obvious fix for that is to change the parameter to
"long", which is what I've done in HEAD. In the back branches that seems a
bit risky, though, since third-party code might be calling this function.
So for them, just put in a kluge to treat negative inputs as INT_MAX.
Second, hash_create can go nuts with extremely large requested table sizes
(notably, my_log2 becomes an infinite loop for inputs larger than
LONG_MAX/2). What seems most appropriate to avoid that is to bound the
initial table size request to work_mem.

This fixes bug #6035 reported by Daniel Schreiber. Although the reported
case only occurs back to 8.4 since it involves WITH RECURSIVE, I think
it's a good idea to install the defenses in all supported branches.

a9b6519 2011-05-23 10:51:18 Andrew Dunstan

Remove spurious underscore in name of isolation tester on MSVC.

b08ddf8 2011-05-23 06:58:26 Andrew Dunstan

Use the right pgsql for isolation tests.

6049772 2011-05-23 04:38:53 Peter Eisentraut

Put lists in sensible order

219dfae 2011-05-23 04:15:07 Tom Lane

Make plpgsql provide the typmods for its variables to the main parser.

Historically we didn't do this, even though we had the information, because
plpgsql passed its Params via SPI APIs that only include type OIDs not
typmods. Now that plpgsql uses parser callbacks to create Params, it's
easy to insert the right typmod. This should generally result in lower
surprise factors, because a plpgsql variable that is declared with a typmod
will now work more like a table column with the same typmod. In particular
it's the "right" way to fix bug #6020, in which plpgsql's attempt to return
an anonymous record type is defeated by stricter record-type matching
checks that were added in 9.0. However, it's not impossible that this
could result in subtle behavioral changes that could break somebody's
existing plpgsql code, so I'm afraid to back-patch this change into
released branches. In those branches we'll have to lobotomize the
record-type checks instead.

fae625e 2011-05-23 02:04:07 Peter Eisentraut

Message style improvements

7920d03 2011-05-22 21:13:17 Peter Eisentraut

Put documentation of backslash commands back in alphabetical order

51ad178 2011-05-22 20:29:36 Peter Eisentraut

Clarify the documentation of the --with-ossp-uuid option

8932e28 2011-05-22 06:37:27 Peter Eisentraut

Message improvement

30e98a7 2011-05-22 03:47:19 Heikki Linnakangas

Pull up isReset flag from AllocSetContext to MemoryContext struct. This
avoids the overhead of one function call when calling MemoryContextReset(),
and it seems like the isReset optimization would be applicable to any new
memory context we might invent in the future anyway.

This buys back the overhead I just added in previous patch to always call
MemoryContextReset() in ExecScan, even when there's no quals or projections.

0319da6 2011-05-22 03:30:11 Heikki Linnakangas

Reset per-tuple memory context between every row in a scan node, even when
there's no quals or projections. Currently this only matters for foreign
scans, as none of the other scan nodes litter the per-tuple memory context
when there's no quals or projections.

27c7875 2011-05-21 21:24:34 Heikki Linnakangas

In binary-upgrade mode, dump dropped attributes of composite types.

Noah Misch

bcf63a5 2011-05-21 06:50:35 Peter Eisentraut

Message style improvements

c8e0c32 2011-05-20 05:20:11 Peter Eisentraut

Rename pg_dump --no-security-label to --no-security-labels

Other similar options also use the plural form.

fcd4575 2011-05-20 04:56:53 Peter Eisentraut

Fix untranslatable assembly of libpq connection failure message

Even though this only affects the insertion of a parenthesized word,
it's unwise to assume that parentheses can pass through untranslated.
And in any case, the new version is clearer in the code and for
translators.

Show on old repository browser