Commit Graph

20621 Commits

Author SHA1 Message Date
Bruce Momjian 442b59dd8b Update:
< 	   writer.
> 	   writer.  It might cause problems for applying WAL on recovery
> 	   into a partially-written page, but later the full page will be
> 	   replaced from WAL.
2005-07-07 16:02:06 +00:00
Bruce Momjian f0a2a91918 Update:
>
> 	o  -Add ability to turn off full page writes
> 	o  When off, write CRC to WAL and check file system blocks
> 	   on recovery
> 	o  Write full pages during file system write and not when
> 	   the page is modified in the buffer cache
>
> 	   This allows most full page writes to happen in the background
> 	   writer.
2005-07-07 15:18:26 +00:00
Bruce Momjian 1c883366ef Fix plperl expected output.
Andrew Dunstan
2005-07-07 04:41:01 +00:00
Bruce Momjian 294de2dc01 pg_column_size() cleanup for messages and code cleanup.
Mark Kirkwood
2005-07-07 04:36:08 +00:00
Bruce Momjian eefdbba062 Currently, nonfatal warnings are not trapped (as they should be) by
plperl - the attached small patch remedies that omission, and adds a
small regression test for error and warning output - the new regression
input and expected output are in separate attached files.

Andrew Dunstan
2005-07-06 22:44:49 +00:00
Bruce Momjian 77838f7380 Currently, nonfatal warnings are not trapped (as they should be) by
plperl - the attached small patch remedies that omission.

Andrew Dunstan
2005-07-06 22:33:39 +00:00
Bruce Momjian 970bb03c3c Complete zic patch backout by removing NO_PGPORT workaround. 2005-07-06 21:40:09 +00:00
Bruce Momjian 261ffd03f7 Reverse out because the lack of using pgport in timezone/ is causing
problems:

---------------------------------------------------------------------------

Support cross compilation by compiling "zic" with a native compiler.
This relies on the output of zic being platform independent, but that is
currently the case.
2005-07-06 21:04:14 +00:00
Bruce Momjian a923602855 Add pg_column_size() to return storage size of a column, including
possible compression.

Mark Kirkwood
2005-07-06 19:02:54 +00:00
Tom Lane b9cb132648 Sync dlopen error handling for the *BSDs ... seems to me I've done this
before, but they were out of sync again.  Per Kris Jurka.
2005-07-06 16:55:58 +00:00
Tom Lane 6e2ff6e89a Add a check for trigger function with declared arguments. This path
could not be reached before, but now that there is a plpgsql validator
function, it can be.  Check is needed to prevent core dump reported by
Satoshi Nagayasu.  Besides, this gives a more specific and useful
error message for a fairly common novice error.
2005-07-06 16:42:10 +00:00
Tom Lane 99382f4581 Save and restore errno across bindtextdomain call, per discussion. 2005-07-06 16:25:59 +00:00
Tom Lane 3d6b0d8631 Fix incorrect PG_CPPFLAGS initialization, per Marko. 2005-07-06 16:14:42 +00:00
Bruce Momjian 0bf8b27348 Update description of GUC full_page_writes.
Michael Paesold
2005-07-06 14:45:12 +00:00
Bruce Momjian 7d2e1cb730 Done:
> * -Add function to return compressed length of TOAST data values
2005-07-06 03:40:15 +00:00
Bruce Momjian c3a69c3b3b Attached is a patch that enhances the "\h" capability in psql. I often
find myself typing a command and then wanting to get the syntax for it.
So I do a ctrl-a and add a \h: but psql does not recognize the command,
because I have stuff attached to it (e.g. "alter table foobar"), so I
have to scroll over and delete everything except the name of the command
itself. This patch gives \h three chances to match: if nothing matches
the complete string (current behavior), it tries to match the first two
words (e.g. "ALTER TABLE"). If that fails, it tries to match the first
word (e.g. "DELETE").

Greg Sabino Mullane
2005-07-06 03:14:48 +00:00
Tom Lane 84d630eb24 Dept of second thoughts: don't expose rijndael.tbl: rijndael.c dependency
to make.  We ship the table file in the tarball and so this dependency
just opens file timestamp skew problems without doing anything useful.
(Not that it should hurt, either ... except for cross-compile builds.)
2005-07-05 23:18:44 +00:00
Bruce Momjian 326a7a0788 Add GUC full_page_writes to control writing full pages to WAL. 2005-07-05 23:18:10 +00:00
Tom Lane c19aa704c8 Fix contrib/pgcrypto to autoconfigure for OpenSSL when --with-openssl
is used in the toplevel configure.  Per Marko Kreen.
2005-07-05 23:13:57 +00:00
Bruce Momjian d22a3727a5 Remove, now have GUC:
< * Turn off full page writes if fsync is disabled
<
<   If fsync is off, there is no purpose in writing full pages to WAL
<
2005-07-05 22:59:36 +00:00
Bruce Momjian 3bf4e4120d Add:
<
881a881,882
> 	o Improve xid wraparound detection by recording per-table rather
> 	  than per-database
2005-07-05 19:37:54 +00:00
Bruce Momjian 2d6c375c5f Back out patch. This should be done like other server-side languages.
---------------------------------------------------------------------------

This patch allows the PL/Python module to do (SRF) functions.

The patch was taken from the CVS version.

I have modified the plpython.c file and have added a test sql script for
testing the functionality. It was actually the script that was in the
8.0.3 version but have since been removed.

In order to signal the end of a set, the called python function must
simply return plpy.EndOfSet and the set would be returned.

Gerrit van Dyk
2005-07-05 18:15:51 +00:00
Tom Lane 576ac4b8c9 Fix initialization bug in pgcrypto openssl code. Marko Kreen 2005-07-05 18:15:36 +00:00
Bruce Momjian 7e33fae3c1 Add NO_PGPORT defines to fix win32/cygwin builds for new target platform
build of zic.
2005-07-05 17:24:30 +00:00
Bruce Momjian 4f979e8bac Restructure zic #define fprintf checks to use a NO_PGPORT macro instead. 2005-07-04 19:54:51 +00:00
Bruce Momjian 8a79451152 I have to admit that I got the case of the preprocessor symbol on amd64
wrong. __AMD64__ is not defined, __amd64__ is.

Christof Petig
2005-07-04 19:05:45 +00:00
Bruce Momjian af8756713f This patch allows the PL/Python module to do (SRF) functions.
The patch was taken from the CVS version.

I have modified the plpython.c file and have added a test sql script for
testing the functionality. It was actually the script that was in the
8.0.3 version but have since been removed.

In order to signal the end of a set, the called python function must
simply return plpy.EndOfSet and the set would be returned.

Gerrit van Dyk
2005-07-04 19:03:30 +00:00
Bruce Momjian 109f079be6 I made the patch that improved the performance of replace_text().
The content of the patch is as follows:

(1)Create shortcut when subtext was not found.

(2)Stop using LEFT and RIGHT macro.
In LEFT and RIGHT macro, TEXTPOS is executed by the same content as
execution immediately before. The execution frequency of TEXTPOS can be
reduced by using text_substring instead of LEFT and RIGHT macro.

(3)Add appendStringInfoText, and use it instead of
appendStringInfoString.
There is an overhead of PG_TEXT_GET_STR when appendStringInfoString is
executed by text type. This can be reduced by appendStringInfoText.

(4)Reduce execution of TEXTDUP.

The effect of the patch that I measured is as follows:

- The Data for test was created by 'pgbench -i'.

- Test SQL:
 select replace(aid, '9', 'A') from accounts;

- Test results: Linux(CPU: Pentium III, Compiler option: -O2)
 original: 1.515s
 patched:  1.250s

Atsushi Ogawa
2005-07-04 18:56:44 +00:00
Bruce Momjian 4b97d51c0a Fix compile if zic because it now doesn't use libpgport. 2005-07-04 18:21:40 +00:00
Bruce Momjian de5d30069b More TODO list section restructuring. 2005-07-04 17:43:42 +00:00
Bruce Momjian 8ea398513e Restructure TODO sections. 2005-07-04 17:00:32 +00:00
Bruce Momjian b9fe8ee225 Fix date_trunct for December dates that are in the next year, e.g.:
SELECT date_trunc('week', '2002-12-31'::date);

Backpatch to 8.0.X.

Per report from Nick Johnson.
2005-07-04 14:38:31 +00:00
Bruce Momjian e652d2c476 Update
> * Allow GIST indexes to create certain complex index types, like digital
>   trees (see Aoki)
>
783a787
>
2005-07-04 12:32:38 +00:00
Tom Lane eb5949d190 Arrange for the postmaster (and standalone backends, initdb, etc) to
chdir into PGDATA and subsequently use relative paths instead of absolute
paths to access all files under PGDATA.  This seems to give a small
performance improvement, and it should make the system more robust
against naive DBAs doing things like moving a database directory that
has a live postmaster in it.  Per recent discussion.
2005-07-04 04:51:52 +00:00
Bruce Momjian 7504f0bae8 Reverse this patch:
---------------------------------------------------------------------------

> A quick look shows that when you use --with-libraries=/foo/bar the
> generated link line for libraries says
>
>  -L/foo/bar -lpq
>
> and it should probably be the other way around (as it is for the
> executables).
>
> So I suspect we need some makefile tuning.

You were correct. This patch fixes it.

Jim C. Nasby
2005-07-04 04:17:00 +00:00
Bruce Momjian 3848532c79 Update wording:
<   Currently, to protect against partial disk page writes, we write the
>   Currently, to protect against partial disk page writes, we write
877c877
< * Turn off after-change writes if fsync is disabled
> * Turn off full page writes if fsync is disabled
2005-07-04 04:06:43 +00:00
Neil Conway 3f39cbdce1 Fix build break for out of tree (vpath) builds, induced by recent zic
changes.
2005-07-04 02:55:59 +00:00
Bruce Momjian a3ff1aad5d Bruce, please apply this additional patch, that fixes the
auto-detection of AES.

Now openssl.c just checks OpenSSL version.  Whoever compiles
newer OpenSSL without AES is on his own.

Marko Kreen
2005-07-04 02:02:01 +00:00
Tom Lane bee9aef43b Fix memory leak in plperl_hash_from_tuple(), per report from Jean-Max Reymond. 2005-07-03 21:56:16 +00:00
Tom Lane ae9a07bf9e Don't try to constant-fold functions returning RECORD. We were never
able to do this before, but I had tried to make an exception for functions
with OUT parameters.  Michael Fuhr found one problem with it already, and
I found another, which was it didn't work for strict functions with a
NULL input.  While both of these could be worked around, the probability
that there are more gotchas seems high; I think prudence dictates just
reverting to the former behavior for now.  Accordingly, remove the kluge
added to get_expr_result_type() for Michael's case.
2005-07-03 21:14:18 +00:00
Peter Eisentraut 85884cb1de Support cross compilation by compiling "zic" with a native compiler. This
relies on the output of zic being platform independent, but that is
currently the case.
2005-07-03 18:54:28 +00:00
Tom Lane cc9bcbc8a4 Improve outer-join-deduction logic to be able to propagate equalities
through multiple join clauses.
2005-07-03 18:26:32 +00:00
Bruce Momjian 76eca0ec98 This patch allows contrib/pgcrypto to build with OpenSSL 0.9.8
(currently in beta) when cryptolib = openssl.  According to the
following checkin message from several years ago, OpenSSL application
developers should no longer rely on <openssl/evp.h> to include
everything they need:

http://cvs.openssl.org/chngview?cn=9888

This patch adds the necessary header files.  It doesn't appear to
break anything when building against OpenSSL 0.9.7.

BTW, core appears to build and work fine with OpenSSL 0.9.8.  I've
built 7.3 through HEAD against 0.9.8-beta6 without noticing any
problems.

Michael Fuhr
2005-07-03 02:32:56 +00:00
Bruce Momjian 16661d60ab > A quick look shows that when you use --with-libraries=/foo/bar the
> generated link line for libraries says
>
>  -L/foo/bar -lpq
>
> and it should probably be the other way around (as it is for the
> executables).
>
> So I suspect we need some makefile tuning.

You were correct. This patch fixes it.

Jim C. Nasby
2005-07-02 23:28:22 +00:00
Tom Lane cc5e80b8d1 Teach planner about some cases where a restriction clause can be
propagated inside an outer join.  In particular, given
LEFT JOIN ON (A = B) WHERE A = constant, we cannot conclude that
B = constant at the top level (B might be null instead), but we
can nonetheless put a restriction B = constant into the quals for
B's relation, since no inner-side rows not meeting that condition
can contribute to the final result.  Similarly, given
FULL JOIN USING (J) WHERE J = constant, we can't directly conclude
that either input J variable = constant, but it's OK to push such
quals into each input rel.  Per recent gripe from Kim Bisgaard.
Along the way, remove 'valid_everywhere' flag from RestrictInfo,
as on closer analysis it was not being used for anything, and was
defined backwards anyway.
2005-07-02 23:00:42 +00:00
Bruce Momjian ea1e2b948d Remove GIST concurrency limitations section.
Christopher Kings-Lynne
2005-07-02 20:08:27 +00:00
Bruce Momjian 9caeace71c Add SGML markup for on/off values in run-time section. 2005-07-02 19:16:36 +00:00
Bruce Momjian 87e01d1eed Improve wrapping of long lines in postgresql.conf. 2005-07-02 18:46:45 +00:00
Bruce Momjian 6aa0fdc4aa Use on/off consistently for GUC variables in postgresql.conf and the
documentation, to match SHOW.
2005-07-02 18:29:04 +00:00
Bruce Momjian 74b49a8129 Add E'' to internally created SQL strings that contain backslashes.
Improve code clarity by using macros for E'' processing.
2005-07-02 17:01:59 +00:00