Commit Graph

2103 Commits

Author SHA1 Message Date
Robert Haas d4fb2f99ec Don't install hstore--1.0.sql any more.
Since the current version is 1.1, the 1.0 file isn't really needed.  We do
need the 1.0--1.1 upgrade file, so people on 1.0 can upgrade.

Per recent discussion on pgsql-hackers.
2012-02-22 20:37:13 -05:00
Robert Haas 2254367435 Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those written.
Also expose the new counters through pg_stat_statements.

Patch by me.  Review by Fujii Masao and Greg Smith.
2012-02-22 20:33:05 -05:00
Bruce Momjian 4e6092a227 Improve wording of pg_upgrade logfile option:
-l, --logfile=FILENAME        log internal activity to file\n\
2012-02-22 18:40:32 -05:00
Tom Lane 06d9afa6f9 Fix longstanding error in contrib/intarray's int[] & int[] operator.
The array intersection code would give wrong results if the first entry of
the correct output array would be "1".  (I think only this value could be
at risk, since the previous word would always be a lower-bound entry with
that fixed value.)

Problem spotted by Julien Rouhaud, initial patch by Guillaume Lelarge,
cosmetic improvements by me.
2012-02-16 20:00:11 -05:00
Bruce Momjian 7f951474dc Have pg_upgrade output 'link' or 'copy' when reporting its status.
Idea from Peter.
2012-02-15 14:23:03 -05:00
Robert Haas d44a3fb55d sepgsql: Move some code from hooks.c to label.c
This is some preliminary refactoring related to a pending patch
to allow sepgsql-enable sessions to make dynamic label transitions.
But this commit doesn't involve any functional change: it just puts
some bits of code in more logical places.

KaiGai Kohei
2012-02-15 13:54:26 -05:00
Bruce Momjian 388c2f9325 Fix pg_test_fsync Win32 problems reported by the build farm; add
comments about the alarm method used on Win32.
2012-02-15 07:10:48 -05:00
Bruce Momjian 7ae2db1d1e Try to get pg_test_thread to compile on Windows by using a sleeper
thread.
2012-02-14 21:53:17 -05:00
Tom Lane 398f70ec07 Preserve column names in the execution-time tupledesc for a RowExpr.
The hstore and json datatypes both have record-conversion functions that
pay attention to column names in the composite values they're handed.
We used to not worry about inserting correct field names into tuple
descriptors generated at runtime, but given these examples it seems
useful to do so.  Observe the nicer-looking results in the regression
tests whose results changed.

catversion bump because there is a subtle change in requirements for stored
rule parsetrees: RowExprs from ROW() constructs now have to include field
names.

Andrew Dunstan and Tom Lane
2012-02-14 17:34:56 -05:00
Bruce Momjian 0a8396e35e Change contrib/pg_test_fsync to control tests in terms of seconds per
test, rather than a number of test cycles.  Changes -o/cycles option to
-s/seconds.
2012-02-14 11:10:03 -05:00
Bruce Momjian 2bbd88f8f8 Improve labeling of pg_test_fsync open_sync test output. 2012-02-13 21:48:51 -05:00
Andrew Dunstan 21320763a3 Fix auto-explain JSON output to be valid JSON.
Problem reported by Peter Eisentraut.

Backpatched to release 9.0.
2012-02-13 08:22:15 -05:00
Robert Haas af7914c662 Add TIMING option to EXPLAIN, to allow eliminating of timing overhead.
Sometimes it may be useful to get actual row counts out of EXPLAIN
(ANALYZE) without paying the cost of timing every node entry/exit.
With this patch, you can say EXPLAIN (ANALYZE, TIMING OFF) to get that.

Tomas Vondra, reviewed by Eric Theise, with minor doc changes by me.
2012-02-07 11:23:04 -05:00
Alvaro Herrera b2e431a4db Implement dry-run mode for pg_archivecleanup
In dry-run mode, just the name of the file to be removed is printed to
stdout; this is so the user can easily plug it into another program
through a pipe.  If debug mode is also specified, a more verbose message
is printed to stderr.

Author: Gabriele Bartolini
Reviewer: Josh Kupershmidt
2012-02-01 14:18:12 -03:00
Tom Lane a8b4b84360 Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().
Due to oversights, the encrypt_iv() and decrypt_iv() functions failed to
report certain types of invalid-input errors, and would instead return
random garbage values.

Marko Kreen, per report from Stefan Kaltenbrunner
2012-01-27 23:09:16 -05:00
Bruce Momjian 3946c28161 Fix pg_upgrade --help text for --user to not use a plural cluster name. 2012-01-26 22:18:58 -05:00
Bruce Momjian 6d5aae7afa Now that the shared library name can be adjusted in the library test,
have pg_upgrade allocate a maximum fixed size buffer for testing the
library file name, rather than base the allocation on the library name.

Backpatch to 9.1.
2012-01-25 09:35:17 -05:00
Bruce Momjian a7f2c79a6e Improve plpython fix comment in pg_upgrade. 2012-01-24 22:49:55 -05:00
Bruce Momjian cfe443ab9d In pg_upgrade, when checking for the plpython library, we must check for
"plpython2" when upgrading from pre-PG 9.1.  Patch to head and 9.1.

Per report from Peter.
2012-01-24 22:42:37 -05:00
Bruce Momjian b95aec5290 Fix new SQL tablespace location function usage in pg_upgrade to properly
check cluster version numbers, and fix missing table alias.
2012-01-24 21:51:10 -05:00
Robert Haas 6e3323d41d Triggered change notifications.
Kevin Grittner, reviewed (in earlier versions) by Álvaro Herrera
2012-01-19 23:15:15 -05:00
Bruce Momjian ecf7a2ea38 Add pg_upgrade C comment about why we check all relkinds for regtypes. 2012-01-19 16:04:34 -05:00
Peter Eisentraut 652300f539 pgcrypto: Remove inappropriate const qualifier
The function in question does not in fact ensure that the passed
argument is not changed, and the callers don't care much either.
2012-01-15 14:00:52 +02:00
Tom Lane 89b3c6cc8b Fix one-byte buffer overrun in contrib/test_parser.
The original coding examined the next character before verifying that
there *is* a next character.  In the worst case with the input buffer
right up against the end of memory, this would result in a segfault.

Problem spotted by Paul Guyot; this commit extends his patch to fix an
additional case.  In addition, make the code a tad more readable by not
overloading the usage of *tlen.
2012-01-09 19:56:27 -05:00
Bruce Momjian e126958c2e Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Peter Eisentraut 037a82704c Standardize treatment of strcmp() return value
Always compare the return value to 0, don't use cute tricks like
if (!strcmp(...)).
2011-12-27 21:19:09 +02:00
Peter Eisentraut d383c23f6f Remove support for on_exit()
All supported platforms support the C89 standard function atexit()
(SunOS 4 probably being the last one not to), and supporting both
makes the code clumsy.
2011-12-27 20:57:59 +02:00
Peter Eisentraut c317a3ac16 Run "make all" as a prerequisite of "make check"
This is the standard behavior but was forgotten in some places.
2011-12-27 20:27:24 +02:00
Robert Haas e1042a3484 sepgsql: Check CREATE permissions for some object types.
KaiGai Kohei, reviewed by Dimitri Fontaine and me.
2011-12-21 09:14:02 -05:00
Robert Haas ab7d4213f9 If pg_test_fsync is interrupted, clean up the temp file.
Marti Raudsepp, with additional paranoia by me.
2011-12-09 15:06:46 -05:00
Magnus Hagander 16d8e594ac Remove spclocation field from pg_tablespace
Instead, add a function pg_tablespace_location(oid) used to return
the same information, and do this by reading the symbolic link.

Doing it this way makes it possible to relocate a tablespace when the
database is down by simply changing the symbolic link.
2011-12-07 10:37:33 +01:00
Bruce Momjian 0e8f6bf0e7 In pg_upgrade, allow tables using regclass to be upgraded because we
preserve pg_class oids since PG 9.0.
2011-12-05 16:45:19 -05:00
Tom Lane 9c6aa8cca0 Move EXTRA_CLEAN to where it actually works. 2011-11-29 23:14:16 -05:00
Peter Eisentraut b258ceb3ad pg_upgrade: Disable installcheck
Disabled for now because some build farm members with low resources
are not prepared to handle it.
2011-11-29 06:57:09 +02:00
Peter Eisentraut 08da2d282f Add pg_upgrade test suite
It runs the regression tests, runs pg_upgrade on the populated
database, and compares the before and after dumps.  While not actually
a cross-version upgrade, this does detect omissions and bugs in the
involved tools from time to time.  It's also possible to do a
cross-version upgrade by manually supplying parameters.
2011-11-27 22:42:32 +02:00
Tom Lane 6c8768c386 Fix overly-aggressive and inconsistent quoting in OS X start script.
Sidar Lopez, per bug #6310, with some additional improvements by me.
Back-patch to 9.0, where the issue was introduced.
2011-11-26 13:01:02 -05:00
Bruce Momjian 32fb4546e3 Remove ENABLE_SAME_CATVERSION_UPGRADES as unnecessary. 2011-11-25 19:08:41 -05:00
Bruce Momjian 5df1403b0f Add pg_upgrade ENABLE_SAME_CATVERSION_UPGRADES macro for testing to
allow upgrades of the same catalog version.  (Doesn't work for
tablespaces, as indicated by C comment.)
2011-11-23 22:51:45 -05:00
Tom Lane 9b97b7f835 Fix citext upgrade script to update derived copies of pg_type.typcollation.
If the existing citext type has not merely been created, but used in any
tables, then the upgrade script wasn't doing enough.  We have to update
attcollation for each citext table column, and indcollation for each citext
index column, as well.  Per report from Rudolf van der Leeden.
2011-11-21 11:24:39 -05:00
Bruce Momjian 7012b5edb7 Remove scandir() requirement in pg_upgrade; instead just use readdir()
--- we were not using the scandir pattern filtering anyway.  This also
removes the scandir requirement in configure.
2011-11-17 21:59:49 -05:00
Alvaro Herrera ef27c81d89 Don't quote language name
Same as previous patch, but give it actual thought this time
2011-11-17 18:35:07 -03:00
Alvaro Herrera b44dda7158 Don't quote language name
It's been deprecated for ages according to Tom, and it breaks now given
the previous patch anyway.

Per buildfarm
2011-11-17 18:27:54 -03:00
Bruce Momjian ee3ef8f30c Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1. 2011-11-17 13:40:44 -05:00
Bruce Momjian 988f907d24 Fix pg_upgrade's pg_scandir_internal() to properly handle a NULL
pattern, which is used on PG 9.1 and HEAD (but not pre-9.1).  Fixes
crash on Windows.

Backpatched to 9.1.

Reported by Mark Dilger
2011-11-17 13:24:54 -05:00
Bruce Momjian b735757c32 Remove pg_upgrade function no longer called (dir_matching_filenames). 2011-11-17 13:17:33 -05:00
Robert Haas bb1afb528a Fix hstore regression tests.
This was an oversight in commit b60653bc0b.

Also, fix a typo spotted by Thom Brown.
2011-11-08 08:09:10 -05:00
Robert Haas b60653bc0b Remove hstore's text => text operator.
Since PostgreSQL 9.0, we've emitted a warning message when an operator
named => is created, because the SQL standard now reserves that token
for another use.  But we've also shipped such an operator with hstore.
Use of the function hstore(text, text) has been recommended in
preference to =>(text, text).  Per discussion, it's now time to take
the next step and stop shipping the operator.  This will allow us to
prohibit the use of => as an operator name in a future release if and
when we wish to support the SQL standard use of this token.

The release notes should mention this incompatibility.

Patch by me, reviewed by David Wheeler, Dimitri Fontaine and Tom Lane.
2011-11-07 21:47:45 -05:00
Tom Lane ced3a93ccb Fix assorted bugs in contrib/unaccent's configuration file parsing.
Make it use t_isspace() to identify whitespace, rather than relying on
sscanf which is known to get it wrong on some platform/locale combinations.
Get rid of fixed-size buffers.  Make it actually continue to parse the file
after ignoring a line with untranslatable characters, as was obviously
intended.

The first of these issues is per gripe from J Smith, though not exactly
either of his proposed patches.
2011-11-07 11:50:18 -05:00
Robert Haas b76c61f1e8 Silence bogus compiler warning. 2011-11-04 10:40:52 -04:00
Robert Haas c9f48b572c Check the return value of getcwd(), instead of assuming success.
Kevin Grittner
2011-11-04 10:40:25 -04:00