summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2012-03-13pgstattuple: Use a BufferAccessStrategy object to avoid cache-trashing.Robert Haas
Jaime Casanova, reviewed by Noah Misch, slightly modified by me.
2012-03-13pgstattuple: Add new error case for spgist indexes.Robert Haas
Extracted from a larger patch by Jaime Casanova, reviewed by Noah Misch. I think this error message could use some more extensive revision, but this at least makes the handling of spgist consistent with what we do for other types of indexes that this code doesn't know how to handle.
2012-03-12In pg_upgrade, add various logging improvements:Bruce Momjian
add ability to control permissions of created files have psql echo its queries for easier debugging output four separate log files, and delete them on success add -r/--retain option to keep log files after success make logs file append-only remove -g/-G/-l logging options sugggest tailing appropriate log file on failure enhance -v/--verbose behavior
2012-03-09sepgsql DROP support.Robert Haas
KaiGai Kohei
2012-03-09Revise FDW planning API, again.Tom Lane
Further reflection shows that a single callback isn't very workable if we desire to let FDWs generate multiple Paths, because that forces the FDW to do all work necessary to generate a valid Plan node for each Path. Instead split the former PlanForeignScan API into three steps: GetForeignRelSize, GetForeignPaths, GetForeignPlan. We had already bit the bullet of breaking the 9.1 FDW API for 9.2, so this shouldn't cause very much additional pain, and it's substantially more flexible for complex FDWs. Add an fdw_private field to RelOptInfo so that the new functions can save state there rather than possibly having to recalculate information two or three times. In addition, we'd not thought through what would be needed to allow an FDW to set up subexpressions of its choice for runtime execution. We could treat ForeignScan.fdw_private as an executable expression but that seems likely to break existing FDWs unnecessarily (in particular, it would restrict the set of node types allowable in fdw_private to those supported by expression_tree_walker). Instead, invent a separate field fdw_exprs which will receive the postprocessing appropriate for expression trees. (One field is enough since it can be a list of expressions; also, we assume the corresponding expression state tree(s) will be held within fdw_state, so we don't need to add anything to ForeignScanState.) Per review of Hanada Shigeru's pgsql_fdw patch. We may need to tweak this further as we continue to work on that patch, but to me it feels a lot closer to being right now.
2012-03-07Add GetForeignColumnOptions() to foreign.c, and add some documentation.Tom Lane
GetForeignColumnOptions provides some abstraction for accessing column-specific FDW options, on a par with the access functions that were already provided here for other FDW-related information. Adjust file_fdw.c to use GetForeignColumnOptions instead of equivalent hand-rolled code. In addition, add some SGML documentation for the functions exported by foreign.c that are meant for use by FDW authors. (This is the fdw_helper portion of the proposed pgsql_fdw patch.) Hanada Shigeru, reviewed by KaiGai Kohei
2012-03-05In pg_upgrade, only lock the old cluster if link mode is used, and do itBruce Momjian
right after we restore the schema (a common failure point), and right before we do the link operation. Per suggesgtions from Robert and ^!C^!^@lvaro
2012-03-05Redesign PlanForeignScan API to allow multiple paths for a foreign table.Tom Lane
The original API specification only allowed an FDW to create a single access path, which doesn't seem like a terribly good idea in hindsight. Instead, move the responsibility for building the Path node and calling add_path() into the FDW's PlanForeignScan function. Now, it can do that more than once if appropriate. There is no longer any need for the transient FdwPlan struct, so get rid of that. Etsuro Fujita, Shigeru Hanada, Tom Lane
2012-02-28Add const qualifiers where they are accidentally cast awayPeter Eisentraut
This only produces warnings under -Wcast-qual, but it's more correct and consistent in any case.
2012-02-22Don't install hstore--1.0.sql any more.Robert Haas
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-22Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those written.Robert Haas
Also expose the new counters through pg_stat_statements. Patch by me. Review by Fujii Masao and Greg Smith.
2012-02-22Improve wording of pg_upgrade logfile option:Bruce Momjian
-l, --logfile=FILENAME log internal activity to file\n\
2012-02-16Fix longstanding error in contrib/intarray's int[] & int[] operator.Tom Lane
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-15Have pg_upgrade output 'link' or 'copy' when reporting its status.Bruce Momjian
Idea from Peter.
2012-02-15sepgsql: Move some code from hooks.c to label.cRobert Haas
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-15Fix pg_test_fsync Win32 problems reported by the build farm; addBruce Momjian
comments about the alarm method used on Win32.
2012-02-14Try to get pg_test_thread to compile on Windows by using a sleeperBruce Momjian
thread.
2012-02-14Preserve column names in the execution-time tupledesc for a RowExpr.Tom Lane
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-14Change contrib/pg_test_fsync to control tests in terms of seconds perBruce Momjian
test, rather than a number of test cycles. Changes -o/cycles option to -s/seconds.
2012-02-13Improve labeling of pg_test_fsync open_sync test output.Bruce Momjian
2012-02-13Fix auto-explain JSON output to be valid JSON.Andrew Dunstan
Problem reported by Peter Eisentraut. Backpatched to release 9.0.
2012-02-07Add TIMING option to EXPLAIN, to allow eliminating of timing overhead.Robert Haas
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-01Implement dry-run mode for pg_archivecleanupAlvaro Herrera
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-01-27Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().Tom Lane
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-26Fix pg_upgrade --help text for --user to not use a plural cluster name.Bruce Momjian
2012-01-25Now that the shared library name can be adjusted in the library test,Bruce Momjian
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-24Improve plpython fix comment in pg_upgrade.Bruce Momjian
2012-01-24In pg_upgrade, when checking for the plpython library, we must check forBruce Momjian
"plpython2" when upgrading from pre-PG 9.1. Patch to head and 9.1. Per report from Peter.
2012-01-24Fix new SQL tablespace location function usage in pg_upgrade to properlyBruce Momjian
check cluster version numbers, and fix missing table alias.
2012-01-19Triggered change notifications.Robert Haas
Kevin Grittner, reviewed (in earlier versions) by Álvaro Herrera
2012-01-19Add pg_upgrade C comment about why we check all relkinds for regtypes.Bruce Momjian
2012-01-15pgcrypto: Remove inappropriate const qualifierPeter Eisentraut
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-09Fix one-byte buffer overrun in contrib/test_parser.Tom Lane
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-01Update copyright notices for year 2012.Bruce Momjian
2011-12-27Standardize treatment of strcmp() return valuePeter Eisentraut
Always compare the return value to 0, don't use cute tricks like if (!strcmp(...)).
2011-12-27Remove support for on_exit()Peter Eisentraut
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-27Run "make all" as a prerequisite of "make check"Peter Eisentraut
This is the standard behavior but was forgotten in some places.
2011-12-21sepgsql: Check CREATE permissions for some object types.Robert Haas
KaiGai Kohei, reviewed by Dimitri Fontaine and me.
2011-12-09If pg_test_fsync is interrupted, clean up the temp file.Robert Haas
Marti Raudsepp, with additional paranoia by me.
2011-12-07Remove spclocation field from pg_tablespaceMagnus Hagander
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-05In pg_upgrade, allow tables using regclass to be upgraded because weBruce Momjian
preserve pg_class oids since PG 9.0.
2011-11-29Move EXTRA_CLEAN to where it actually works.Tom Lane
2011-11-29pg_upgrade: Disable installcheckPeter Eisentraut
Disabled for now because some build farm members with low resources are not prepared to handle it.
2011-11-27Add pg_upgrade test suitePeter Eisentraut
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-26Fix overly-aggressive and inconsistent quoting in OS X start script.Tom Lane
Sidar Lopez, per bug #6310, with some additional improvements by me. Back-patch to 9.0, where the issue was introduced.
2011-11-25Remove ENABLE_SAME_CATVERSION_UPGRADES as unnecessary.Bruce Momjian
2011-11-23Add pg_upgrade ENABLE_SAME_CATVERSION_UPGRADES macro for testing toBruce Momjian
allow upgrades of the same catalog version. (Doesn't work for tablespaces, as indicated by C comment.)
2011-11-21Fix citext upgrade script to update derived copies of pg_type.typcollation.Tom Lane
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-17Remove scandir() requirement in pg_upgrade; instead just use readdir()Bruce Momjian
--- we were not using the scandir pattern filtering anyway. This also removes the scandir requirement in configure.
2011-11-17Don't quote language nameAlvaro Herrera
Same as previous patch, but give it actual thought this time