summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2009-08-05Add matchorig, matchsynonyms, and keepsynonyms options to contrib/dict_xsyn.Tom Lane
Sergey Karpov
2009-08-05Implement dblink_get_notify().Joe Conway
Adds the ability to retrieve async notifications using dblink, via the addition of the function dblink_get_notify(). Original patch by Marcus Kempe, suggestions by Tom Lane and Alvaro Herrera, patch review and adjustments by Joe Conway.
2009-08-04Fix some more regression tests (missed these because they're onlyTom Lane
run when built with --with-openssl).
2009-08-04Ooops, missed that a couple of contrib modules have calls to byteacmp.Tom Lane
Add bytea.h inclusions as needed. Some of the contrib regression tests need to be de-hexified, too. Per buildfarm.
2009-08-03Portability and documentation fixes for threaded pgbench patch.Tom Lane
2009-08-03Multi-threaded version of pgbench contributed by ITAGAKI Takahiro,Tatsuo Ishii
reviewed by Greg Smith and Josh Williams. Following is the proposal from ITAGAKI Takahiro: Pgbench is a famous tool to measure postgres performance, but nowadays it does not work well because it cannot use multiple CPUs. On the other hand, postgres server can use CPUs very well, so the bottle-neck of workload is *in pgbench*. Multi-threading would be a solution. The attached patch adds -j (number of jobs) option to pgbench. If the value N is greater than 1, pgbench runs with N threads. Connections are equally-divided into them (ex. -c64 -j4 => 4 threads with 16 connections each). It can run on POSIX platforms with pthread and on Windows with win32 threads. Here are results of multi-threaded pgbench runs on Fedora 11 with intel core i7 (8 logical cores = 4 physical cores * HT). -j8 (8 threads) was the best and the tps is 4.5 times of -j1, that is a traditional result. $ pgbench -i -s10 $ pgbench -n -S -c64 -j1 => tps = 11600.158593 $ pgbench -n -S -c64 -j2 => tps = 17947.100954 $ pgbench -n -S -c64 -j4 => tps = 26571.124001 $ pgbench -n -S -c64 -j8 => tps = 52725.470403 $ pgbench -n -S -c64 -j16 => tps = 38976.675319 $ pgbench -n -S -c64 -j32 => tps = 28998.499601 $ pgbench -n -S -c64 -j64 => tps = 26701.877815 Is it acceptable to use pthread in contrib module? If ok, I will add the patch to the next commitfest.
2009-08-01Improve unique-constraint-violation error messages to include the exactTom Lane
values being complained of. In passing, also remove the arbitrary length limitation in the similar error detail message for foreign key violations. Itagaki Takahiro
2009-07-30Make sure FD_SETSIZE is set before we include any WindowsMagnus Hagander
header files. Josh Williams
2009-07-27Improve comment, per gripe from Alvaro.Tom Lane
2009-07-27Fix pg_stat_statements for EXEC_BACKEND case.Tom Lane
We should not try to load old statistics when re-attaching to existing shared memory. Per bug #4941. Itagaki Takahiro
2009-07-26Extend EXPLAIN to allow generic options to be specified.Tom Lane
The original syntax made it difficult to add options without making them into reserved words. This change parenthesizes the options to avoid that problem, and makes provision for an explicit (and perhaps non-Boolean) value for each option. The original syntax is still supported, but only for the two original options ANALYZE and VERBOSE. As a test case, add a COSTS option that can suppress the planner cost estimates. This may be useful for including EXPLAIN output in the regression tests, which are otherwise unable to cope with cross-platform variations in cost estimates. Robert Haas
2009-07-16pg_standby doesn't need to be linked with libpq. Fujii Masao.Heikki Linnakangas
2009-07-13vacuumlo query cleanupsBruce Momjian
No need for VACUUM ANAYZE of newly created/populated temp table, just use analyze. No need to apologize for using subquery in DELETE anymore.
2009-07-10Fix xslt_process() to ensure that it inserts a NULL terminator after theTom Lane
last pair of parameter name/value strings, even when there are MAXPARAMS of them. Aboriginal bug in contrib/xml2, noted while studying bug #4912 (though I'm not sure whether there's something else involved in that report). This might be thought a security issue, since it's a potential backend crash; but considering that untrustworthy users shouldn't be allowed to get their hands on xslt_process() anyway, it's probably not worth getting excited about.
2009-06-25Make prior patch pgindent-safe.Tom Lane
2009-06-25Disable pg_standby -l option because the backend doesn't expect the recoveredHeikki Linnakangas
file to be a symlink. We tried to fix this issue with an earlier server-side patch, but it didn't fix the whole issue. The same bug is present in older releases as well, but the 8.4 train is about to leave the station, and I'm not sure if have consensus on whether we can remove the -l option in back-branches or do we need to attempt a server-side fix to make symlinking safe. Patch by Simon Riggs, per discussion on bug identified by Fujii Masao.
2009-06-18Fix a few errors in comments. Patch by Fujii Masao, plus the one inHeikki Linnakangas
visibilitymap.c by me.
2009-06-11Mark contrib's GiST and GIN opclass support functions as STRICT, for safety.Tom Lane
(Note: GiST penalty functions could possibly be non-strict, but none are at present.)
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-06-10Properly mark pg_freespace() function as strict. Also updateTom Lane
uninstall script to match reality.
2009-06-09Restore dblink_current_query() to being a C-language function, so as to notTom Lane
create an ABI break between 8.3 and 8.4. It is still just a wrapper around the built-in current_query() function, but at a different implementation level. Per my proposal. Note: this change doesn't break 8.4beta installations, since their SQL-language definition of the function still works fine.
2009-06-09Default client encoding to server encoding for dblink connections. AddressesJoe Conway
issue raised by Ruzsinszky Attila and confirmed by others. ----------------------------------------------------------------------
2009-06-08Fix contrib/pageinspect to not create an ABI breakage between 8.3 and 8.4.Tom Lane
The original implementation of the 3-argument form of get_raw_page() risked core dumps if the 8.3 SQL function definition was mistakenly used with the 8.4 module, which is entirely likely after a dump-and-reload upgrade. To protect 8.4 beta testers against upgrade problems, add a check on PG_NARGS. In passing, fix missed additions to the uninstall script, and polish the docs a trifle.
2009-06-07Revert my patch of 2009-04-04 that removed contrib/intarray's definitions ofTom Lane
the <@ and @> operators. These are not in fact equivalent to the built-in anyarray operators of the same names, because they have different behavior for empty arrays, namely they don't think empty arrays are contained in anything. That is mathematically wrong, no doubt, but until we can persuade GIN indexes to implement the mathematical definition we should probably not change this. Another reason for not changing it now is that we can't yet ensure the opclasses will be updated correctly in a dump-and-reload upgrade. Per recent discussions.
2009-06-06Add support for using SQL/MED compliant FOREIGN DATA WRAPPER, SERVER,Joe Conway
and USER MAPPING as method to supply dblink connect parameters. Per mailing list and PGCon discussions.
2009-06-02Fix dblink_get_result() as reported by Oleksiy Shchukin. Refactor a bitJoe Conway
while we're at it per request by Tom Lane. Specifically, don't try to perform dblink_send_query() via dblink_record_internal() -- it was inappropriate and ugly.
2009-05-14Add recovery_end_command option to recovery.conf. recovery_end_commandHeikki Linnakangas
is run at the end of archive recovery, providing a chance to do external cleanup. Modify pg_standby so that it no longer removes the trigger file, that is to be done using the recovery_end_command now. Provide a "smart" failover mode in pg_standby, where we don't fail over immediately, but only after recovering all unapplied WAL from the archive. That gives you zero data loss assuming all WAL was archived before failover, which is what most users of pg_standby actually want. recovery_end_command by Simon Riggs, pg_standby changes by Fujii Masao and myself.
2009-05-08Add alternative expected output files for cs_CZ locale for btree_gist andHeikki Linnakangas
tsearch2 tests. This should make 'comet_moth' buildfarm member pass contrib check. Zdenek Kotala.
2009-05-07Change pgbench to use the table names pgbench_accounts, pgbench_branches,Tom Lane
pgbench_history, and pgbench_tellers, rather than just accounts, branches, history, and tellers. This is to prevent accidental conflicts with real application tables, as has been reported to happen at least once. Also remove the automatic "SET search_path = public" that it did at startup, as this seems to restrict testing flexibility without actually buying much. Per proposal by Joshua Drake and ensuing discussion. Joshua Drake and Tom Lane
2009-04-28Blank line Makefile cleanups.Bruce Momjian
2009-04-26Update citext expected output to exactly match the real output, ratherTom Lane
than having some whitespace discrepancy. Although whitespace is supposed to be ignored in our regression tests, for some reason buildfarm member spoonbill doesn't like it.
2009-04-23varstr_cmp and any comparison function that piggybacks on it can returnHeikki Linnakangas
any negative or positive number, not just -1 or 1. Fix comment on varstr_cmp and citext test case accordingly. As pointed out by Zdenek Kotala, and buildfarm member gothic moth.
2009-04-15Remove beer-ware license from crypt-md5.c, perMagnus Hagander
approval from Poul-Henning Kamp. This makes the file the same standard 2-clause BSD as the rest of PostgreSQL.
2009-04-07Remove useless (leftover?) extern declaration.Tom Lane
2009-04-07Defend against non-ASCII letters in fuzzystrmatch code. The functionsTom Lane
still don't behave very sanely for multibyte encodings, but at least they won't be indexing off the ends of static arrays.
2009-04-05Remove contrib/intarray's definitions of the <@ and @> operators, so that theyTom Lane
don't cause confusion with the built-in anyarray versions of those operators. Adjust the module's index opclasses to support the built-in operators in place of the private ones. The private implementations are still available under their historical names @ and ~, so no functionality is lost. Some quick testing suggests that they offer no real benefit over the core operators, however. Per a complaint from Rusty Conover.
2009-04-02Fix memory allocation for output of hstore type.Teodor Sigaev
Per "maosen.zhang" <maosen.zhang@alibaba-inc.com> report.
2009-03-31Fix contrib/pgstattuple and contrib/pageinspect to prevent attempts to readTom Lane
temporary tables of other sessions; that is unsafe because of the way our buffer management works. Per report from Stuart Bishop. This is redundant with the bufmgr.c checks in HEAD, but not at all redundant in the back branches.
2009-03-26Make pg_standby's maxretries option do what one would expect. Fujii MasaoTom Lane
2009-03-25Add btree_gin contrib module.Tom Lane
Teodor Sigaev and Oleg Bartunov
2009-03-25Adjust the APIs for GIN opclass support functions to allow the extractQuery()Tom Lane
method to pass extra data to the consistent() and comparePartial() methods. This is the core infrastructure needed to support the soon-to-appear contrib/btree_gin module. The APIs are still upward compatible with the definitions used in 8.3 and before, although *not* with the previous 8.4devel function definitions. catversion bump for changes in pg_proc entries (although these are just cosmetic, since GIN doesn't actually look at the function signature before calling it...) Teodor Sigaev and Oleg Bartunov
2009-03-25Fix old thinko in pgp.h: the idea is to declare some named enum types,Tom Lane
not global variables of anonymous enum types. This didn't actually hurt much because most linkers will just merge the duplicated definitions ... but some will complain. Per bug #4731 from Ceriel Jacobs. Backpatch to 8.1 --- the declarations don't exist before that.
2009-03-18Don't set the signal handler for SIGQUIT on Windows. Buildfarm shows thatHeikki Linnakangas
reinstalling the default signal handler doesn't work as it is on Windows. Presumably core dumps on SIGQUIT are not a problem on Windows, so rather than figure out what header files or other changes are required to make it work, just don't bother.
2009-03-18Don't intercept SIGQUIT as a signal to trigger failover; that's whatHeikki Linnakangas
postmaster uses for immediate shutdown. Trap SIGUSR1 as the preferred signal for that. Per report by Fujii Masao and subsequent discussion on -hackers.
2009-03-15Fix contrib/hstore to throw an error for keys or values that don't fit in itsTom Lane
data structure, rather than silently truncating them. Andrew Gierth
2009-02-27Equip the programs installed by contrib with proper --help and --versionPeter Eisentraut
options and normally formatted help output.
2009-02-26Add a -w/--no-password option that prevents all password prompts to allPeter Eisentraut
programs that have a -W/--password option. In passing, remove the ancient PSQL_ALWAYS_GET_PASSWORDS compile option.
2009-02-25Clean up help (-?) output.Peter Eisentraut
2009-02-25Remove feof(stdin) calls related to when to prompt for a password,Peter Eisentraut
leftovers from when the password was read from stdin.
2009-01-28Fix bug with multiple evaluation of tsearch2 compatibility trigger, triggerTeodor Sigaev
data should be restored. Backpatch only for 8.3 because previous versions haven't such layer.