Commit Graph

30113 Commits

Author SHA1 Message Date
Tom Lane 6bbaa3148d Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.
2010-06-14 20:49:33 +00:00
Bruce Momjian cbb0dcff4f Fix doc plperl doc with is -> are change. 2010-06-14 18:47:05 +00:00
Simon Riggs 24bfbb5857 Docs for pg_archivecleanup 2010-06-14 17:25:24 +00:00
Simon Riggs ca65f2190a Files for pg_archivecleanup 2010-06-14 16:19:24 +00:00
Simon Riggs 25fee5cfbd New contrib module for use as an archive_cleanup_command, or as a
standalone utility for removing files from archive.
2010-06-14 16:17:56 +00:00
Itagaki Takahiro 72e1d3d6e4 Fix typo in Japanese translation for psql "Use \d+ to list them." 2010-06-14 08:54:35 +00:00
Heikki Linnakangas 6da07cd80d If a corrupt WAL record is received by streaming replication, disconnect
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-14 06:04:21 +00:00
Robert Haas 38736e2276 Fix misplaced modifier.
As suggested by Ian Barwick.
2010-06-14 02:18:43 +00:00
Robert Haas dd6c1080d0 Fix typo. 2010-06-14 01:07:41 +00:00
Itagaki Takahiro 9e3cd37576 Remove max_standby_delay message from ps display of recovery process
in waiting status. The parameter is not so interesting in ps display
because it is referable in postgresql.conf.
2010-06-14 00:49:24 +00:00
Robert Haas 26b7abfa32 Fix ALTER LARGE OBJECT and GRANT ... ON LARGE OBJECT for large OIDs.
The previous coding failed for OIDs too large to be represented by
a signed integer.
2010-06-13 17:43:13 +00:00
Tom Lane a079efa641 postgres.txt should get cleaned by 'make clean'. 2010-06-12 21:40:31 +00:00
Bruce Momjian 785c2acc12 Update pg_upgrade C comment about cwd. 2010-06-12 17:45:28 +00:00
Bruce Momjian f904c797d6 Add missing --use-existing --help mention from regression binary.
Jan Urba?ski
2010-06-12 17:21:29 +00:00
Bruce Momjian 4c7d48bffb Remove lynx -stdin flag for postgres.text. 2010-06-12 17:17:25 +00:00
Bruce Momjian 1dc7c796c9 Have pg_upgrade create its output files in the current directory, rather
than in a subdirectory of the $HOME directory, or $TMP in Windows.
2010-06-12 17:05:29 +00:00
Bruce Momjian 99fdb4a9ea Add SGML Makefile rule for single-page text, postgres.txt. 2010-06-12 15:58:38 +00:00
Bruce Momjian 7d7780f40d Add space between after ">" in ">$@" in SGML Makefile, for clarity. 2010-06-12 15:42:44 +00:00
Peter Eisentraut 7de38696c4 Add target to build HTML documentation as single page 2010-06-12 09:55:12 +00:00
Peter Eisentraut c86efdde5f Fix typo/bug, found by Clang compiler 2010-06-12 09:14:52 +00:00
Peter Eisentraut cc3c4a2407 Update Python version information 2010-06-12 06:05:48 +00:00
Peter Eisentraut 6b72aa5154 Add a regression test case for bug #5497 2010-06-12 06:05:20 +00:00
Tom Lane bc325d8432 Add missing 'Z' letter to getopt_long call --- the newly added
--analyze-only switch did not work in its short form -Z.

Josh Berkus
2010-06-11 23:58:24 +00:00
Heikki Linnakangas e751b71b56 Use "replication" as the database name when constructing a connection
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-11 10:13:09 +00:00
Bruce Momjian c46f861c0d Update text of 9.0 release notes
Josh Berkus
2010-06-10 21:48:28 +00:00
Itagaki Takahiro 56834fc759 Rename restartpoint_command to archive_cleanup_command. 2010-06-10 08:13:50 +00:00
Heikki Linnakangas 0a7cb85531 Make TriggerFile variable static. It's not used outside xlog.c.
Fujii Masao
2010-06-10 07:49:23 +00:00
Heikki Linnakangas 346d7cd7fa Return NULL instead of 0/0 in pg_last_xlog_receive_location() and
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-10 07:00:27 +00:00
Tom Lane 4ddf151c49 Fix quite-bogus handling of arrays in plpython datum-to-PyObject
conversion.  Per bug #5497 from David Gardner.
2010-06-10 04:05:01 +00:00
Robert Haas 932de8916f Quote all string values in EXPLAIN (FORMAT YAML) output.
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-10 01:26:30 +00:00
Robert Haas f383083305 Remove stray word from comment. 2010-06-09 21:14:28 +00:00
Alvaro Herrera a5ec2986b3 Update ALTER TABLE docs to account for exclusion and deferrable uniqueness
constraints

Dean Rasheed
2010-06-09 17:48:10 +00:00
Alvaro Herrera 09811eff2e Add index entry for ::, per complaint from John Gage. 2010-06-09 16:43:47 +00:00
Heikki Linnakangas 71815306e9 In standby mode, respect checkpoint_segments in addition to
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-09 15:04:07 +00:00
Magnus Hagander 8c873bbfa7 Make the walwriter close it's handle to an old xlog segment if it's no longer
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-09 10:54:45 +00:00
Itagaki Takahiro 5a41c317c5 Avoid "identifier will be truncated" warning in dblink
when connection string is longer than NAMEDATALEN.
The previous fix for long connection name broke the behavior.
2010-06-09 03:39:26 +00:00
Robert Haas d6e503a493 Attempt to fix EXPLAIN (FORMAT YAML) quoting to behave sanely.
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-09 02:39:34 +00:00
Itagaki Takahiro a624356072 Fix connection leak in dblink when dblink_connect() or dblink_connect_u()
end with "duplicate connection name" errors.

Backported to release 7.4.
2010-06-09 00:56:02 +00:00
Tatsuo Ishii 016212e0eb Fix typo in the header comment. Per request from Masao Fujii. 2010-06-09 00:54:39 +00:00
Robert Haas 8de14adc5f Make procedural language handler reference C-language function docs.
Based on suggestions from Jonathan Leto and Joshua Tolley.
2010-06-08 20:12:59 +00:00
Tom Lane 36614006e1 Avoid useless snprintf() call when update_process_title is turned off.
Fujii Masao
2010-06-07 15:49:30 +00:00
Teodor Sigaev 3e7451a6df Add missed function dblink_connect_u(text[,text]) to uninstall script 2010-06-07 15:14:36 +00:00
Itagaki Takahiro b5faba1284 Ensure default-only storage parameters for TOAST relations
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-07 02:59:02 +00:00
Itagaki Takahiro 3fd839950a Replace "slave" to "standby" in documentation for consistent terminology.
Almost all of the terms in docs and messages were replaced, but still
remains in a few comments and README files in codes.
2010-06-07 02:01:09 +00:00
Tom Lane 2944e6ecb6 Improve our explanation of the OVERLAPS operator.
Per gripe from Frank van Vugt.
2010-06-05 14:56:36 +00:00
Michael Meskes 98e4005efb Added variable handling for RETURNING clause to ecpg.
While the values were correctly returned they were not moved into C variables
as they should be.

Closes: #5489
2010-06-04 10:09:58 +00:00
Marc G. Fournier dcd52a64bd tag 9.0beta2 2010-06-04 07:28:30 +00:00
Tom Lane 3ceb44fa0a Adjust misleading comment in walsender.c. We try to send all WAL data that's
been written out from shared memory, but the previous phrasing might be read
to say that we send only what's been fsync'd.
2010-06-03 23:00:14 +00:00
Tom Lane 0cc59cc1f3 Add current WAL end (as seen by walsender, ie, GetWriteRecPtr() result)
and current server clock time to SR data messages.  These are not currently
used on the slave side but seem likely to be useful in future, and it'd be
better not to change the SR protocol after release.  Per discussion.
Also do some minor code review and cleanup on walsender.c, and improve the
protocol documentation.
2010-06-03 22:17:32 +00:00
Tom Lane 572ec5a276 Remove link that breaks HISTORY file generation. 2010-06-03 21:23:02 +00:00