summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-07-02Unbreak MSVC builds by removing copydir.c from list of libpgport filesAndrew Dunstan
2010-07-02Move copydir.c from src/port to src/backend/storage/fileRobert Haas
The previous commit to make copydir() interruptible prevented postgres.exe from linking on MinGW and Cygwin, because on those platforms libpgport_srv.a can't freely reference symbols defined by the backend. Since that code is already backend-specific anyway, just move the whole file into the backend rather than adding further kludges to deal with the symbols needed by CHECK_FOR_INTERRUPTS(). This probably needs some further cleanup, but this commit just moves the file as-is, which should hopefully be enough to turn the buildfarm green again.
2010-07-02Issue 'mkdir' hint when replying CREATE TABLESPACE in recovery mode.Bruce Momjian
Per idea from Fujii Masao
2010-07-01Allow copydir() to be interrupted.Robert Haas
This makes ALTER DATABASE .. SET TABLESPACE and CREATE DATABASE more sensitive to interrupts. Backpatch to 8.4, where ALTER DATABASE .. SET TABLESPACE was introduced. We could go back further, but in the absence of complaints about the CREATE DATABASE case it doesn't seem worth it. Guillaume Lelarge, with a small correction by me.
2010-07-01Allow ALTER TABLE .. SET TABLESPACE to be interrupted.Robert Haas
Backpatch to 8.0, where tablespaces were introduced. Guillaume Lelarge
2010-06-30stringToNode() and deparse_expression_pretty() crash on invalid input,Heikki Linnakangas
but we have nevertheless exposed them to users via pg_get_expr(). It would be too much maintenance effort to rigorously check the input, so put a hack in place instead to restrict pg_get_expr() so that the argument must come from one of the system catalog columns known to contain valid expressions. Per report from Rushabh Lathia. Backpatch to 7.4 which is the oldest supported version at the moment.
2010-06-29Add C comment about why synchronous_commit=off behavior can loseBruce Momjian
committed transactions in a postmaster crash.
2010-06-29Message tuningPeter Eisentraut
2010-06-29Use different function names for plpython3 handlers, to avoid clashes inPeter Eisentraut
pg_pltemplate This should have a catversion bump, but it's still being debated whether it's worth it during beta.
2010-06-28emode_for_corrupt_record shouldn't reduce LOG messages to WARNING.Robert Haas
In non-interactive sessions, WARNING sorts below LOG.
2010-06-28Improve pg_dump's checkSeek() function to verify the functioning of ftelloTom Lane
as well as fseeko, and to not assume that fseeko(fp, 0, SEEK_CUR) proves anything. Also improve some related comments. Per my observation that the SEEK_CUR test didn't actually work on some platforms, and subsequent discussion with Robert Haas. Back-patch to 8.4. In earlier releases it's not that important whether we get the hasSeek test right, but with parallel restore it matters.
2010-06-27Fix pg_restore so parallel restore doesn't fail when the input file doesn'tTom Lane
contain data offsets (which it won't, if pg_dump thought its output wasn't seekable). To do that, remove an unnecessarily aggressive error check, and instead fail if we get to the end of the archive without finding the desired data item. Also improve the error message to be more specific about the cause of the problem. Per discussion of recent report from Igor Neyman. Back-patch to 8.4 where parallel restore was introduced.
2010-06-25Fix thinko in tok_is_keyword(): it was looking at the wrong union variantTom Lane
of YYSTYPE, and hence returning the wrong answer for cases where a plpgsql "unreserved keyword" really does conflict with a variable name. Obviously I didn't test this enough :-(. Per bug #5524 from Peter Gagarinov.
2010-06-25Fix log_temp_files docs and comments to say bytes not kilobytes.Simon Riggs
stat(2) field st_size returns bytes not kilobytes. Bug found during recent performance tuning for PostgreSQL user.
2010-06-24Add stray "else" that seems to have gone missing.Robert Haas
2010-06-23Add TCP keepalive support to libpq.Robert Haas
This adds four additional connection parameters to libpq: keepalives, keepalives_idle, keepalives_count, and keepalives_interval. keepalives default to on, per discussion, but can be turned off by specifying keepalives=0. The remaining parameters, where supported, can be used to adjust how often keepalives are sent and how many can be lost before the connection is broken. The immediate motivation for this patch is to make sure that walreceiver will eventually notice if the master reboots without closing the connection cleanly, but it should be helpful in other cases as well. Tollef Fog Heen, Fujii Masao, and me.
2010-06-22Deprecate the use of => as an operator name.Robert Haas
In HEAD, emit a warning when an operator named => is defined. In both HEAD and the backbranches (except in 8.2, where contrib modules do not have documentation), document that hstore's text => text operator may be removed in a future release, and encourage the use of the hstore(text, text) function instead. This function only exists in HEAD (previously, it was called tconvert), so backpatch it back to 8.2, when hstore was added. Per discussion.
2010-06-21In a PL/pgSQL "FOR cursor" statement, the statements executed in the loopHeikki Linnakangas
might close the cursor, rendering the Portal pointer to it invalid. Closing the cursor in the middle of the loop is not a very sensible thing to do, but we must handle it gracefully and throw an error instead of crashing.
2010-06-21Fix mishandling of whole-row Vars referencing a view or sub-select.Tom Lane
If such a Var appeared within a nested sub-select, we failed to translate it correctly during pullup of the view, because the recursive call to replace_rte_variables_mutator was looking for the wrong sublevels_up value. Bug was introduced during the addition of the PlaceHolderVar mechanism. Per bug #5514 from Marcos Castedo.
2010-06-17Clean up some randomness associated with trace_recovery_messages: don'tTom Lane
put the variable declaration in the middle of a bunch of externs, and do use extern where it should be used.
2010-06-17Make RemoveOldXlogFiles's debug printout match style used elsewhere:Tom Lane
log and seg aren't an XLogRecPtr and shouldn't be printed like one. Fujii Masao
2010-06-17Don't allow walsender to send WAL data until it's been safely fsync'd on theTom Lane
master. Otherwise a subsequent crash could cause the master to lose WAL that has already been applied on the slave, resulting in the slave being out of sync and soon corrupt. Per recent discussion and an example from Robert Haas. Fujii Masao
2010-06-17Remove prototype of GetOldestWALSendPointer(), that is marked as NOT_USED.Itagaki Takahiro
2010-06-16Remove perl symbol table additions for plperl functions, and mention of itAndrew Dunstan
in the release notes, as it is not apparently providing anything useful.
2010-06-16Refactor sprintf calls with computed format strings into multiple calls withPeter Eisentraut
constant format strings, so that the compiler can more easily check the formats for correctness.
2010-06-15Unbreak MSVC builds for pg_archivecleanup by linking with libpgportAndrew Dunstan
2010-06-15Add new GUC categories corresponding to sections in docs, and moveItagaki Takahiro
description for vacuum_defer_cleanup_age to the correct category. Sections in postgresql.conf are also sorted in the same order with docs. Per gripe by Fujii Masao, suggestion by Heikki Linnakangas, and patch by me.
2010-06-14Fix typo in Japanese translation for psql "Use \d+ to list them."Itagaki Takahiro
2010-06-14If a corrupt WAL record is received by streaming replication, disconnectHeikki Linnakangas
and retry. If the record is genuinely corrupt in the master database, there's little hope of recovering, but it's better than simply retrying to apply the corrupt WAL record in a tight loop without even trying to retransmit it, which is what we used to do.
2010-06-14Remove max_standby_delay message from ps display of recovery processItagaki Takahiro
in waiting status. The parameter is not so interesting in ps display because it is referable in postgresql.conf.
2010-06-13Fix ALTER LARGE OBJECT and GRANT ... ON LARGE OBJECT for large OIDs.Robert Haas
The previous coding failed for OIDs too large to be represented by a signed integer.
2010-06-12Add missing --use-existing --help mention from regression binary.Bruce Momjian
Jan Urba?ski
2010-06-12Fix typo/bug, found by Clang compilerPeter Eisentraut
2010-06-12Update Python version informationPeter Eisentraut
2010-06-12Add a regression test case for bug #5497Peter Eisentraut
2010-06-11Add missing 'Z' letter to getopt_long call --- the newly addedTom Lane
--analyze-only switch did not work in its short form -Z. Josh Berkus
2010-06-11Use "replication" as the database name when constructing a connectionHeikki Linnakangas
string for a streaming replication connection. It's ignored by the server, but allows libpq to pick up the password from .pgpass where "replication" is specified as the database name. Patch by Fujii Masao per Tom's suggestion, with some wording changes by me.
2010-06-10Rename restartpoint_command to archive_cleanup_command.Itagaki Takahiro
2010-06-10Make TriggerFile variable static. It's not used outside xlog.c.Heikki Linnakangas
Fujii Masao
2010-06-10Return NULL instead of 0/0 in pg_last_xlog_receive_location() andHeikki Linnakangas
pg_last_xlog_replay_location(). Per Robert Haas's suggestion, after Itagaki Takahiro pointed out an issue in the docs. Also, some wording changes in the docs by me.
2010-06-10Fix quite-bogus handling of arrays in plpython datum-to-PyObjectTom Lane
conversion. Per bug #5497 from David Gardner.
2010-06-10Quote all string values in EXPLAIN (FORMAT YAML) output.Robert Haas
While my previous attempt seems to always produce valid YAML, it doesn't always produce YAML that means what it appears to mean, because of tokens like "0xa" and "true", which without quotes will be interpreted as integer or Boolean literals. So, instead, just quote everything that's not known to be a number, as we do for JSON. Dean Rasheed, with some changes to the comments by me.
2010-06-09Remove stray word from comment.Robert Haas
2010-06-09In standby mode, respect checkpoint_segments in addition toHeikki Linnakangas
checkpoint_timeout to trigger restartpoints. We used to deliberately only do time-based restartpoints, because if checkpoint_segments is small we would spend time doing restartpoints more often than really necessary. But now that restartpoints are done in bgwriter, they're not as disruptive as they used to be. Secondly, because streaming replication stores the streamed WAL files in pg_xlog, we want to clean it up more often to avoid running out of disk space when checkpoint_timeout is large and checkpoint_segments small. Patch by Fujii Masao, with some minor changes by me.
2010-06-09Make the walwriter close it's handle to an old xlog segment if it's no longerMagnus Hagander
the current one. Not doing this would leave the walwriter with a handle to a deleted file if there was nothing for it to do for a long period of time, preventing the file from being completely removed. Reported by Tollef Fog Heen, and thanks to Heikki for some hand-holding with the patch.
2010-06-09Attempt to fix EXPLAIN (FORMAT YAML) quoting to behave sanely.Robert Haas
The previous code failed to quote in many cases where quoting was necessary - YAML has loads of special characters, including -:[]{},"'|*& - so quote much more aggressively, and only refrain from quoting things where it seems fairly clear that it isn't necessary. Per report from Dean Rasheed.
2010-06-09Fix typo in the header comment. Per request from Masao Fujii.Tatsuo Ishii
2010-06-07Avoid useless snprintf() call when update_process_title is turned off.Tom Lane
Fujii Masao
2010-06-07Ensure default-only storage parameters for TOAST relationsItagaki Takahiro
to be initialized with proper values. Affected parameters are fillfactor, analyze_threshold, and analyze_scale_factor. Especially uninitialized fillfactor caused inefficient page usage because we built a StdRdOptions struct in which fillfactor is zero if any reloption is set for the toast table. In addition, we disallow toast.autovacuum_analyze_threshold and toast.autovacuum_analyze_scale_factor because we didn't actually support them; they are always ignored. Report by Rumko on pgsql-bugs on 12 May 2010. Analysis by Tom Lane and Alvaro Herrera. Patch by me. Backpatch to 8.4.
2010-06-04Added variable handling for RETURNING clause to ecpg.Michael Meskes
While the values were correctly returned they were not moved into C variables as they should be. Closes: #5489