Commit Graph

31149 Commits

Author SHA1 Message Date
Magnus Hagander 966d4f52c2 Typo fix for MemSet size.
Fujii Masao
2011-01-25 10:50:04 +01:00
Bruce Momjian d7a714828f Use consistent spacing for PGAPPICON Makefile option. 2011-01-24 20:46:30 -05:00
Bruce Momjian 9dd7933937 Use XLOG_BLCKSZ in pg_test_fsync, rather than our own define, but verify
it is 8k as expected.
2011-01-24 20:07:05 -05:00
Bruce Momjian 9fc0192283 In test_open_sync(), writes kilobytes as intended, not by bytes. 2011-01-24 19:42:32 -05:00
Peter Eisentraut 77ff840835 Document the "S" option for psql's \dn command in the psql help
This option was recently introduced, but the documentation in help.c
was not updated.
2011-01-25 01:51:35 +02:00
Peter Eisentraut 88dcdf9007 Call PLy_spi_execute_fetch_result inside the try/catch block
This way errors from fetching tuples are correctly reported as errors
in the SPI call.  While at it, avoid palloc(0).

Jan Urbański
2011-01-25 00:43:25 +02:00
Peter Eisentraut 52713d02c7 Refactor PLy_spi_prepare to save two levels of indentation
Instead of checking whether the arglist is NULL and then if its length
is 0, do it in one step, and outside of the try/catch block.

Jan Urbański
2011-01-24 22:13:06 +02:00
Robert Haas ea2c2641f9 More documentation cleanup for sepgsql.
Thom Brown and Robert Haas
2011-01-24 08:42:44 -05:00
Heikki Linnakangas 74be35b07c Fix typo in the psql \d query handling, so that we use the correct query
against 9.0 servers.
2011-01-24 14:34:15 +02:00
Magnus Hagander 9752080942 Exclude sepgsql from MSVC regression testing as well
In passing, change exclusion in the build to follow the
same pattern as other always-excluded modules.
2011-01-24 08:24:31 +01:00
Heikki Linnakangas 56d77c9e56 Silence compiler warning about uninitialized variable, noted by
Itagaki Takahiro
2011-01-24 08:28:35 +02:00
Robert Haas 41611f16e9 PGXS support for contrib/hstore
Joey Adams
2011-01-23 23:07:55 -05:00
Robert Haas c26ac226e4 Blind attempt to exclude sepgsql from MSVC build system. 2011-01-23 22:57:32 -05:00
Robert Haas 194c8f713a First round of cleanup of sepgsql code and documentation.
Robert Haas, with a few suggestions from Thom Brown
2011-01-23 22:48:22 -05:00
Robert Haas 968bc6fac9 sepgsql, an SE-Linux integration for PostgreSQL
This is still pretty rough - among other things, the documentation
needs work, and the messages need a visit from the style police -
but this gets the basic framework in place.

KaiGai Kohei
2011-01-23 20:48:27 -05:00
Magnus Hagander e5487f65fd Make walsender options order-independent
While doing this, also move base backup options into
a struct instead of increasing the number of parameters
to multiple functions for each new option.
2011-01-23 23:39:18 +01:00
Magnus Hagander 39e911e28a Reorder includes to unbreak MSVC 2011-01-23 22:44:07 +01:00
Heikki Linnakangas 7f508f1c6b Add 'directory' format to pg_dump. The new directory format is compatible
with the 'tar' format, in that untarring a tar format archive produces a
valid directory format archive.

Joachim Wieland and Heikki Linnakangas
2011-01-23 23:10:15 +02:00
Tom Lane f36920796e Fix another portability issue in pg_basebackup.
The target of sscanf with a %o format had better be of integer width,
but "mode_t" conceivably isn't that.  Another compiler warning seen
only on some platforms; this one I think is potentially a real bug
and not just a warning.
2011-01-23 14:26:51 -05:00
Tom Lane dd5f0db96b Improve getObjectDescription's display of pg_amop and pg_amproc entries.
Include the lefttype/righttype columns explicitly (instead of assuming
the reader can deduce them from the operator or function description),
and move the operator or function description to the end of the string,
to make it clearer that it's a referenced object and not the amop or
amproc item itself.  Per extensive discussion of Andreas Karlsson's
original patch.

Andreas Karlsson, Tom Lane
2011-01-23 14:13:46 -05:00
Tom Lane de3c2d6e92 Revert "Factor out functions responsible for caching I/O routines".
This reverts commit 740e54ca84, which seems
to have tickled an optimization bug in gcc 4.5.x, as reported upstream at
https://bugzilla.redhat.com/show_bug.cgi?id=671899
Since this patch had no purpose beyond code beautification, it's not
worth expending a lot of effort to look for another workaround.
2011-01-23 13:12:55 -05:00
Tom Lane 10e99f15d4 Add .gitignore file to silence complaints about pg_basebackup. 2011-01-23 13:07:34 -05:00
Tom Lane b3cfcdaad2 Suppress uninitialized-variable warning. 2011-01-23 13:06:38 -05:00
Andrew Dunstan 6c41cf5977 Silence flex warnings about DOS file paths in MSVC builds 2011-01-23 12:24:15 -05:00
Magnus Hagander d13e0975c9 Use pg_strcasecmp instead of strcasecmp for portability
Per buildfarm.
2011-01-23 17:35:02 +01:00
Magnus Hagander f88a638199 Only show pg_stat_replication details to superusers 2011-01-23 17:28:19 +01:00
Magnus Hagander fe12263c9f filemode is parsed on win32 even if never used
Per buildfarm failure.
2011-01-23 14:45:23 +01:00
Magnus Hagander 048d148fe6 Add pg_basebackup tool for streaming base backups
This tool makes it possible to do the pg_start_backup/
copy files/pg_stop_backup step in a single command.

There are still some steps to be done before this is a
complete backup solution, such as the ability to stream
the required WAL logs, but it's still usable, and
could do with some buildfarm coverage.

In passing, make the checkpoint request optionally
fast instead of hardcoding it.

Magnus Hagander, reviewed by Fujii Masao and Dimitri Fontaine
2011-01-23 12:21:23 +01:00
Robert Haas 6f59777c65 Code cleanup for assign_transaction_read_only.
As in commit fb4c5d2798 on 2011-01-21,
this avoids spurious debug messages and allows idempotent changes at
any time.  Along the way, make assign_XactIsoLevel allow idempotent
changes even when not within a subtransaction, to be consistent with
the new coding of assign_transaction_read_only and because there's
no compelling reason to do otherwise.

Kevin Grittner, with some adjustments.
2011-01-22 20:55:50 -05:00
Tom Lane cc73c16050 Quick hack to un-break plpython regression tests.
It's not clear to me what should happen to the other plpython_unicode
variant expected files, but this patch gets things passing on my own
machines and at least some of the buildfarm.
2011-01-22 20:43:54 -05:00
Tom Lane 0f73aae13d Allow the wal_buffers setting to be auto-tuned to a reasonable value.
If wal_buffers is initially set to -1 (which is now the default), it's
replaced by 1/32nd of shared_buffers, with a minimum of 8 (the old default)
and a maximum of the XLOG segment size.  The allowed range for manual
settings is still from 4 up to whatever will fit in shared memory.

Greg Smith, with implementation correction by me.
2011-01-22 20:31:24 -05:00
Tom Lane 518b1e96c0 Suppress "control reaches end of non-void function" warning from gcc 4.5.
Not sure why I'm seeing this on Fedora 14 and not earlier versions.
Seems like a regression that gcc no longer knows that DIE() doesn't return.
Still, adding a dummy return is harmless enough.
2011-01-22 18:01:31 -05:00
Tom Lane e2627258c3 Suppress possibly-uninitialized-variable warnings from gcc 4.5.
It appears that gcc 4.5 can issue such warnings for whole structs, not
just scalar variables as in the past.  Refactor some pg_dump code slightly
so that the OutputContext local variables are always initialized, even
if they won't be used.  It's cheap enough to not be worth worrying about.
2011-01-22 17:56:42 -05:00
Peter Eisentraut 116ce2f4d0 Get rid of the global variable holding the error state
Global error handling led to confusion and was hard to manage.  With
this change, errors from PostgreSQL are immediately reported to Python
as exceptions.  This requires setting a Python exception after
reporting the caught PostgreSQL error as a warning, because PLy_elog
destroys the Python exception state.

Ideally, all places where PostgreSQL errors need to be reported back
to Python should be wrapped in subtransactions, to make going back to
Python from a longjmp safe.  This will be handled in a separate patch.

Jan Urbański
2011-01-22 22:12:32 +02:00
Tom Lane 37eb2cd4ad More pg_test_fsync fixups.
Reduce #includes to minimum actually needed; in particular include
postgres_fe.h not postgres.h, so as to stop build failures on some
platforms.

Use get_progname() instead of hardwired program name; improve error
checking for command line syntax; bring error messages into line with
style guidelines; include strerror result in die() cases.
2011-01-22 15:01:26 -05:00
Tom Lane 3ae28ce8c4 Suppress unused-variables warning when OPEN_SYNC_FLAG isn't defined.
Per buildfarm.
2011-01-22 12:26:44 -05:00
Magnus Hagander f5a0fd2f3b Link libpgport into pg_test_fsync on msvc 2011-01-22 18:18:27 +01:00
Robert Haas a0c75f5539 Avoid treating WAL senders as normal backends.
The previous coding treated anything that wasn't an autovacuum launcher
as a normal backend, which is wrong now that we also have WAL senders.

Fujii Masao, reviewed by Robert Haas, Alvaro Herrera, Tom Lane,
and Bernd Helmle.
2011-01-21 22:23:01 -05:00
Robert Haas fb4c5d2798 Code cleanup for assign_XactIsoLevel.
The new coding avoids a spurious debug message when a transaction
that has changed the isolation level has been rolled back.  It also
allows the property to be freely changed to the current value within
a subtransaction.

Kevin Grittner, with one small change by me.
2011-01-21 21:49:19 -05:00
Tom Lane cb38ab6d3b More pg_test_fsync cleanup.
Un-break Windows build (I hope) by making the HAVE_FSYNC_WRITETHROUGH
code match the backend.  Fix incorrect program help message.  static-ize
all functions.
2011-01-21 19:44:53 -05:00
Tom Lane bc616703e8 Clean up pg_test_fsync commit.
Actually rename the program, rather than just claiming we did.  Hook it
into the build system.  Get rid of useless dependency on libpq.  Clean up
#include list and messy whitespace.
2011-01-21 19:27:25 -05:00
Tom Lane 0cf3db2175 Fix broken markup, also minor copy-editing. 2011-01-21 18:42:46 -05:00
Peter Eisentraut 4609caf364 Correctly add exceptions to the plpy module for Python 3
The way the exception types where added to the module was wrong for
Python 3.  Exception classes were not actually available from plpy.
Fix that by factoring out code that is responsible for defining new
Python exceptions and make it work with Python 3.  New regression test
makes sure the plpy module has the expected contents.

Jan Urbanśki, slightly revised by me
2011-01-21 23:46:56 +02:00
Robert Haas d3b372e92d Emphasize where OVER needs to be when using a window function.
Jeff Turner
2011-01-21 12:59:15 -05:00
Bruce Momjian 5925aa09a9 Update SGML docs to point to new /contrib/pg_test_fsync. 2011-01-21 12:52:16 -05:00
Bruce Momjian b35bfcae93 Update C banner on new pg_test_fsync file. 2011-01-21 12:49:04 -05:00
Bruce Momjian 606a3d54fc Move test_fsync to /contrib. 2011-01-21 12:47:54 -05:00
Heikki Linnakangas 8aea1373d8 Don't require usage privileges on the foreign data wrapper when creating a
foreign table. We check for usage privileges on the foreign server, that ought
to be enough.

Shigeru HANADA
2011-01-21 15:05:20 +02:00
Robert Haas 8ceb245680 Make ALTER TABLE revalidate uniqueness and exclusion constraints.
Failure to do so can lead to constraint violations.  This was broken by
commit 1ddc2703a9 on 2010-02-07, so
back-patch to 9.0.

Noah Misch.  Regression test by me.
2011-01-20 22:44:10 -05:00
Peter Eisentraut 14b9f69cb2 Fix wrong comment
Hitoshi Harada
2011-01-20 22:04:36 +02:00