users/simon/postgres.git
16 years agoRemove any -arch switches given in ExtUtils::Embed's ldopts from our
Tom Lane [Tue, 8 Sep 2009 18:15:55 +0000 (18:15 +0000)]
Remove any -arch switches given in ExtUtils::Embed's ldopts from our
perl_embed_ldflags setting.  On OS X it seems that ExtUtils::Embed is
trying to force a universal binary to be built, but you need to specify
that a lot further upstream if you want Postgres built that way; the only
result of including -arch in perl_embed_ldflags is some warnings at the
plperl.so link step.  Per my complaint and Jan Otto's suggestion.

16 years agoAdd a boolean GUC parameter "bonjour" to control whether a Bonjour-enabled
Tom Lane [Tue, 8 Sep 2009 17:08:36 +0000 (17:08 +0000)]
Add a boolean GUC parameter "bonjour" to control whether a Bonjour-enabled
build actually attempts to advertise itself via Bonjour.  Formerly it always
did so, which meant that packagers had to decide for their users whether
this behavior was wanted or not.  The default is "off" to be on the safe
side, though this represents a change in the default behavior of a
Bonjour-enabled build.  Per discussion.

16 years agoReplace use of the long-deprecated Bonjour API DNSServiceRegistrationCreate
Tom Lane [Tue, 8 Sep 2009 16:08:26 +0000 (16:08 +0000)]
Replace use of the long-deprecated Bonjour API DNSServiceRegistrationCreate
with the not-so-deprecated DNSServiceRegister.  This patch shouldn't change
any user-visible behavior, it just gets rid of a deprecation warning in
--with-bonjour builds.  The new code will fail on OS X releases before 10.3,
but it seems unlikely that anyone will want to run Postgres 8.5 on 10.2.

16 years agoRemove outside-the-scanner references to "yyleng".
Tom Lane [Tue, 8 Sep 2009 04:25:00 +0000 (04:25 +0000)]
Remove outside-the-scanner references to "yyleng".

It seems the flex developers have decided to change yyleng from int to size_t.
This has already happened in the latest release of OS X, and will start
happening elsewhere once the next release of flex appears.  Rather than trying
to divine how it's declared in any particular build, let's just remove the one
existing not-very-necessary external usage.

Back-patch to all supported branches; not so much because users in the field
are likely to care about building old branches with cutting-edge flex, as
to keep OSX-based buildfarm members from having problems with old branches.

16 years agoChange our WIN32 API version to be 5.01 (Windows XP), to bring in the proper
Magnus Hagander [Mon, 7 Sep 2009 11:22:12 +0000 (11:22 +0000)]
Change our WIN32 API version to be 5.01 (Windows XP), to bring in the proper
IPV6 headers in newer SDKs.

16 years agoUpdate the tznames reference files, and add IDT (Israel Daylight Time)
Tom Lane [Sun, 6 Sep 2009 15:25:23 +0000 (15:25 +0000)]
Update the tznames reference files, and add IDT (Israel Daylight Time)
to the Default timezone abbreviation set.

Back-port the the current file set to all branches that contain tznames.
This includes adding SGT to the Default set in pre-8.4 releases.

Joachim Wieland

16 years agoAdd a note warning that COPY BINARY is very datatype-specific.
Tom Lane [Sat, 5 Sep 2009 23:58:01 +0000 (23:58 +0000)]
Add a note warning that COPY BINARY is very datatype-specific.
Per a complaint from Gordon Shannon.

16 years agoPut back "ifeq ($(PORTNAME), solaris)", this time with some documentation
Tom Lane [Sat, 5 Sep 2009 21:14:04 +0000 (21:14 +0000)]
Put back "ifeq ($(PORTNAME), solaris)", this time with some documentation
of why it's not as broken as it appears on first glance.

16 years agoRevert ill-considered restriction of dtrace support to Solaris only.
Tom Lane [Fri, 4 Sep 2009 23:11:05 +0000 (23:11 +0000)]
Revert ill-considered restriction of dtrace support to Solaris only.

16 years agoRemove pgstat's discrimination against MsgVacuum and MsgAnalyze messages.
Tom Lane [Fri, 4 Sep 2009 22:32:33 +0000 (22:32 +0000)]
Remove pgstat's discrimination against MsgVacuum and MsgAnalyze messages.

Formerly, these message types would be discarded unless there was already
a stats hash table entry for the target table.  However, the intent of
saving hash table space for unused tables was subverted by the fact that
the physical I/O done by the vacuum or analyze would result in an immediately
following tabstat message, which would create the hash table entry anyway.
All that we had left was surprising loss of statistical data, as in a recent
complaint from Jaime Casanova.

It seems unlikely that a real database would have many tables that go totally
untouched over the long haul, so the consensus is that this "optimization"
serves little purpose anyhow.  Remove it, and just create the hash table
entry on demand in all cases.

16 years agoTigthen binary receive functions so that they reject values that the text
Heikki Linnakangas [Fri, 4 Sep 2009 11:20:23 +0000 (11:20 +0000)]
Tigthen binary receive functions so that they reject values that the text
input functions don't accept either. While the backend can handle such
values fine, they can cause trouble in clients and in pg_dump/restore.

This is followup to the original issue on time datatype reported by Andrew
McNamara a while ago. Like that one, none of these seem worth
back-patching.

16 years agoFix encoding handling in xml binary input function. If the XML header didn't
Heikki Linnakangas [Fri, 4 Sep 2009 10:49:29 +0000 (10:49 +0000)]
Fix encoding handling in xml binary input function. If the XML header didn't
specify an encoding explicitly, we used to treat it as being in database
encoding when we parsed it, but then perform a UTF-8 -> database encoding
conversion on it, which was completely bogus. It's now consistently treated as
UTF-8.

16 years agoFinal updates of release notes for 8.4.1, 8.3.8, 8.2.14, 8.1.18, 8.0.22,
Tom Lane [Thu, 3 Sep 2009 22:13:47 +0000 (22:13 +0000)]
Final updates of release notes for 8.4.1, 8.3.8, 8.2.14, 8.1.18, 8.0.22,
7.4.26.

16 years agoMake LOAD of an already-loaded library into a no-op, instead of attempting
Tom Lane [Thu, 3 Sep 2009 22:11:07 +0000 (22:11 +0000)]
Make LOAD of an already-loaded library into a no-op, instead of attempting
to unload and re-load the library.

The difficulty with unloading a library is that we haven't defined safe
protocols for doing so.  In particular, there's no safe mechanism for
getting out of a "hook" function pointer unless libraries are unloaded
in reverse order of loading.  And there's no mechanism at all for undefining
a custom GUC variable, so GUC would be left with a pointer to an old value
that might or might not still be valid, and very possibly wouldn't be in
the same place anymore.

While the unload and reload behavior had some usefulness in easing
development of new loadable libraries, it's of no use whatever to normal
users, so just disabling it isn't giving up that much.  Someday we might
care to expend the effort to develop safe unload protocols; but even if
we did, there'd be little certainty that every third-party loadable module
was following them, so some security restrictions would still be needed.

Back-patch to 8.2; before that, LOAD was superuser-only anyway.

Security: unprivileged users could crash backend.  CVE not assigned yet

16 years agoDisallow RESET ROLE and RESET SESSION AUTHORIZATION inside security-definer
Tom Lane [Thu, 3 Sep 2009 22:08:05 +0000 (22:08 +0000)]
Disallow RESET ROLE and RESET SESSION AUTHORIZATION inside security-definer
functions.

This extends the previous patch that forbade SETting these variables inside
security-definer functions.  RESET is equally a security hole, since it
would allow regaining privileges of the caller; furthermore it can trigger
Assert failures and perhaps other internal errors, since the code is not
expecting these variables to change in such contexts.  The previous patch
did not cover this case because assign hooks don't really have enough
information, so move the responsibility for preventing this into guc.c.

Problem discovered by Heikki Linnakangas.

Security: no CVE assigned yet, extends CVE-2007-6600

16 years agoInstall a workaround for a longstanding gcc bug that allows SIGFPE traps
Tom Lane [Thu, 3 Sep 2009 18:48