CVS log for pgsql/src/backend/bootstrap/bootstrap.c

[BACK] Up to [PostgreSQL CVS Repository] / pgsql / src / backend / bootstrap

Request diff between arbitrary revisions - Display revisions graphically


Keyword substitution: kv
Default branch: MAIN


Revision 1.262: download - view: text, markup, annotated - select for diffs
Fri Sep 3 01:34:55 2010 UTC (15 years ago) by tgl
Branches: MAIN
CVS tags: REL9_1_ALPHA1, HEAD
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +5 -2 lines
Install a data-type-based solution for protecting pg_get_expr().

Since the code underlying pg_get_expr() is not secure against malformed
input, and can't practically be made so, we need to prevent miscreants
from feeding arbitrary data to it.  We can do this securely by declaring
pg_get_expr() to take a new datatype "pg_node_tree" and declaring the
system catalog columns that hold nodeToString output to be of that type.
There is no way at SQL level to create a non-null value of type pg_node_tree.
Since the backend-internal operations that fill those catalog columns
operate below the SQL level, they are oblivious to the datatype relabeling
and don't need any changes.

Revision 1.261: download - view: text, markup, annotated - select for diffs
Tue Apr 20 01:38:52 2010 UTC (15 years, 4 months ago) by tgl
Branches: MAIN
CVS tags: REL9_0_STABLE, REL9_0_RC1, REL9_0_BETA4, REL9_0_BETA3, REL9_0_BETA2, REL9_0_BETA1, REL9_0_0
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +5 -20 lines
Move the responsibility for calling StartupXLOG into InitPostgres, for
those process types that go through InitPostgres; in particular, bootstrap
and standalone-backend cases.  This ensures that we have set up a PGPROC
and done some other basic initialization steps (corresponding to the
if (IsUnderPostmaster) block in AuxiliaryProcessMain) before we attempt to
run WAL recovery in a standalone backend.  As was discovered last September,
this is necessary for some corner-case code paths during WAL recovery,
particularly end-of-WAL cleanup.

Moving the bootstrap case here too is not necessary for correctness, but it
seems like a good idea since it reduces the number of distinct code paths.

Revision 1.260: download - view: text, markup, annotated - select for diffs
Fri Feb 26 02:00:35 2010 UTC (15 years, 6 months ago) by momjian
Branches: MAIN
CVS tags: REL9_0_ALPHA5_BRANCH, REL9_0_ALPHA5
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +4 -4 lines
pgindent run for 9.0

Revision 1.259: download - view: text, markup, annotated - select for diffs
Sun Feb 7 20:48:09 2010 UTC (15 years, 7 months ago) by tgl
Branches: MAIN
CVS tags: REL9_0_ALPHA4_BRANCH, REL9_0_ALPHA4
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +8 -1 lines
Create a "relation mapping" infrastructure to support changing the relfilenodes
of shared or nailed system catalogs.  This has two key benefits:

* The new CLUSTER-based VACUUM FULL can be applied safely to all catalogs.

* We no longer have to use an unsafe reindex-in-place approach for reindexing
  shared catalogs.

CLUSTER on nailed catalogs now works too, although I left it disabled on
shared catalogs because the resulting pg_index.indisclustered update would
only be visible in one database.

Since reindexing shared system catalogs is now fully transactional and
crash-safe, the former special cases in REINDEX behavior have been removed;
shared catalogs are treated the same as non-shared.

This commit does not do anything about the recently-discussed problem of
deadlocks between VACUUM FULL/CLUSTER on a system catalog and other
concurrent queries; will address that in a separate patch.  As a stopgap,
parallel_schedule has been tweaked to run vacuum.sql by itself, to avoid
such failures during the regression tests.

Revision 1.258: download - view: text, markup, annotated - select for diffs
Fri Jan 22 16:40:18 2010 UTC (15 years, 7 months ago) by rhaas
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +1 -2 lines
Replace ALTER TABLE ... SET STATISTICS DISTINCT with a more general mechanism.

Attributes can now have options, just as relations and tablespaces do, and
the reloptions code is used to parse, validate, and store them.  For
simplicity and because these options are not performance critical, we store
them in a separate cache rather than the main relcache.

Thanks to Alex Hunsaker for the review.

Revision 1.257: download - view: text, markup, annotated - select for diffs
Wed Jan 20 09:16:23 2010 UTC (15 years, 7 months ago) by heikki
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +2 -15 lines
Rethink the way walreceiver is linked into the backend.	Instead than shoving
walreceiver as whole into a dynamically loaded module, split the
libpq-specific parts of it into dynamically loaded module and keep the rest
in the main backend binary.

Although Tom fixed the Windows compilation problems with the old walreceiver
module already, this is a cleaner division of labour and makes the code
more readable. There's also the prospect of adding new transport methods
as pluggable modules in the future, which this patch makes easier, though for
now the API between libpqwalreceiver and walreceiver process should be
considered private.

The libpq-specific module is now in src/backend/replication/libpqwalreceiver,
and the part linked with postgres binary is in
src/backend/replication/walreceiver.c.

Revision 1.256: download - view: text, markup, annotated - select for diffs
Fri Jan 15 09:19:00 2010 UTC (15 years, 7 months ago) by heikki
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +24 -2 lines
Introduce Streaming Replication.

This includes two new kinds of postmaster processes, walsenders and
walreceiver. Walreceiver is responsible for connecting to the primary server
and streaming WAL to disk, while walsender runs in the primary server and
streams WAL from disk to the client.

Documentation still needs work, but the basics are there. We will probably
pull the replication section to a new chapter later on, as well as the
sections describing file-based replication. But let's do that as a separate
patch, so that it's easier to see what has been added/changed. This patch
also adds a new section to the chapter about FE/BE protocol, documenting the
protocol used by walsender/walreceivxer.

Bump catalog version because of two new functions,
pg_last_xlog_receive_location() and pg_last_xlog_replay_location(), for
monitoring the progress of replication.

Fujii Masao, with additional hacking by me

Revision 1.255: download - view: text, markup, annotated - select for diffs
Sat Jan 2 16:57:36 2010 UTC (15 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +2 -2 lines
Update copyright for the year 2010.

Revision 1.254: download - view: text, markup, annotated - select for diffs
Mon Dec 7 05:22:21 2009 UTC (15 years, 9 months ago) by tgl
Branches: MAIN
CVS tags: REL8_5_ALPHA3_BRANCH, REL8_5_ALPHA3
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +5 -1 lines
Add exclusion constraints, which generalize the concept of uniqueness to
support any indexable commutative operator, not just equality.  Two rows
violate the exclusion constraint if "row1.col OP row2.col" is TRUE for
each of the columns in the constraint.

Jeff Davis, reviewed by Robert Haas

Revision 1.253: download - view: text, markup, annotated - select for diffs
Sun Sep 27 01:32:11 2009 UTC (15 years, 11 months ago) by tgl
Branches: MAIN
CVS tags: REL8_5_ALPHA2_BRANCH, REL8_5_ALPHA2
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +5 -183 lines
Simplify the bootstrap (BKI) code by getting rid of a useless table of all
the strings seen during the bootstrap run.  There might have been some
actual point to doing that, many years ago, but as far as I can see the only
value now is to conserve a bit of memory.  Even if we cared about wasting
a megabyte or so during the initdb run, it'd be far more effective to
arrange to release memory at the end of each BKI command, instead of
intentionally hanging onto strings that might never be used again.
Not maintaining the table probably makes it faster too; but the main point
of this patch is to get rid of a couple hundred lines of unnecessary and
rather crufty code.

Revision 1.252: download - view: text, markup, annotated - select for diffs
Sun Aug 2 22:14:51 2009 UTC (16 years, 1 month ago) by tgl
Branches: MAIN
CVS tags: REL8_5_ALPHA1_BRANCH, REL8_5_ALPHA1
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +2 -1 lines
Add ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

Robert Haas

Revision 1.251: download - view: text, markup, annotated - select for diffs
Fri Jul 31 20:26:22 2009 UTC (16 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +15 -1 lines
Create a multiplexing structure for signals to Postgres child processes.

This patch gets us out from under the Unix limitation of two user-defined
signal types.  We already had done something similar for signals directed to
the postmaster process; this adds multiplexing for signals directed to
backends and auxiliary processes (so long as they're connected to shared
memory).

As proof of concept, replace the former usage of SIGUSR1 and SIGUSR2
for backends with use of the multiplexing mechanism.  There are still some
hard-wired definitions of SIGUSR1 and SIGUSR2 for other process types,
but getting rid of those doesn't seem interesting at the moment.

Fujii Masao

Revision 1.250: download - view: text, markup, annotated - select for diffs
Wed Feb 18 15:58:41 2009 UTC (16 years, 6 months ago) by heikki
Branches: MAIN
CVS tags: REL8_4_STABLE, REL8_4_RC2, REL8_4_RC1, REL8_4_BETA2, REL8_4_BETA1, REL8_4_4, REL8_4_3, REL8_4_2, REL8_4_1, REL8_4_0
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +4 -7 lines
Start background writer during archive recovery. Background writer now performs
its usual buffer cleaning duties during archive recovery, and it's responsible
for performing restartpoints.

This requires some changes in postmaster. When the startup process has done
all the initialization and is ready to start WAL redo, it signals the
postmaster to launch the background writer. The postmaster is signaled again
when the point in recovery is reached where we know that the database is in
consistent state. Postmaster isn't interested in that at the moment, but
that's the point where we could let other backends in to perform read-only
queries. The postmaster is signaled third time when the recovery has ended,
so that postmaster knows that it's safe to start accepting connections.

The startup process now traps SIGTERM, and performs a "clean" shutdown. If
you do a fast shutdown during recovery, a shutdown restartpoint is performed,
like a shutdown checkpoint, and postmaster kills the processes cleanly. You
still have to continue the recovery at next startup, though.

Currently, the background writer is only launched during archive recovery.
We could launch it during crash recovery as well, but it seems better to keep
that codepath as simple as possible, for the sake of robustness. And it
couldn't do any restartpoints during crash recovery anyway, so it wouldn't be
that useful.

log_restartpoints is gone. Use log_checkpoints instead. This is yet to be
documented.

This whole operation is a pre-requisite for Hot Standby, but has some value of
its own whether the hot standby patch makes 8.4 or not.

Simon Riggs, with lots of modifications by me.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Thu Jan 22 20:16:00 2009 UTC (16 years, 7 months ago) by tgl
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +9 -6 lines
Support column-level privileges, as required by SQL standard.

Stephen Frost, with help from KaiGai Kohei and others

Revision 1.248: download - view: text, markup, annotated - select for diffs
Thu Jan 1 17:23:36 2009 UTC (16 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +2 -2 lines
Update copyright for 2009.

Revision 1.247: download - view: text, markup, annotated - select for diffs
Sun Nov 2 01:45:27 2008 UTC (16 years, 10 months ago) by tgl
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +7 -7 lines
Remove all uses of the deprecated functions heap_formtuple, heap_modifytuple,
and heap_deformtuple in favor of the newer functions heap_form_tuple et al
(which do the same things but use bool control flags instead of arbitrary
char values).  Eliminate the former duplicate coding of these functions,
reducing the deprecated functions to mere wrappers around the newer ones.
We can't get rid of them entirely because add-on modules probably still
contain many instances of the old coding style.

Kris Jurka

Revision 1.246: download - view: text, markup, annotated - select for diffs
Tue Sep 30 10:52:11 2008 UTC (16 years, 11 months ago) by heikki
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +1 -3 lines
Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, the
free space information is stored in a dedicated FSM relation fork, with each
relation (except for hash indexes; they don't use FSM).

This eliminates the max_fsm_relations and max_fsm_pages GUC options; remove any
trace of them from the backend, initdb, and documentation.

Rewrite contrib/pg_freespacemap to match the new FSM implementation. Also
introduce a new variant of the get_raw_page(regclass, int4, int4) function in
contrib/pageinspect that let's you to return pages from any relation fork, and
a new fsm_page_contents() function to inspect the new FSM pages.

Revision 1.245: download - view: text, markup, annotated - select for diffs
Mon Sep 1 20:42:43 2008 UTC (17 years ago) by tgl
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +2 -2 lines
Add a bunch of new error location reports to parse-analysis error messages.
There are still some weak spots around JOIN USING and relation alias lists,
but most errors reported within backend/parser/ now have locations.

Revision 1.244: download - view: text, markup, annotated - select for diffs
Tue Jun 24 17:58:27 2008 UTC (17 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +2 -2 lines
Reduce the alignment requirement of type "name" from int to char, and arrange
to suppress zero-padding of "name" entries in indexes.

The alignment change is unlikely to save any space, but it is really needed
anyway to make the world safe for our widespread practice of passing plain
old C strings to functions that are declared as taking Name.  In the previous
coding, the C compiler was entitled to assume that a Name pointer was
word-aligned; but we were failing to guarantee that.  I think the reason
we'd not seen failures is that usually the only thing that gets done with
such a pointer is strcmp(), which is hard to optimize in a way that exploits
word-alignment.  Still, some enterprising compiler guy will probably think
of a way eventually, or we might change our code in a way that exposes
more-obvious optimization opportunities.

The padding change is accomplished in one-liner fashion by declaring the
"name" index opclasses to use storage type "cstring" in pg_opclass.h.
Normally btree and hash don't allow a nondefault storage type, because they
don't have any provisions for converting the input datum to another type.
However, because name and cstring are effectively the same thing except for
padding, no conversion is needed --- we only need index_form_tuple() to treat
the datum as being cstring not name, and this is sufficient.  This seems to
make for about a one-third reduction in the typical sizes of system catalog
indexes that involve "name" columns, of which we have many.

These two changes are only weakly related, but the alignment change makes
me feel safer that the padding change won't introduce problems, so I'm
committing them together.

Revision 1.243: download - view: text, markup, annotated - select for diffs
Mon May 12 00:00:46 2008 UTC (17 years, 4 months ago) by alvherre
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +2 -1 lines
Restructure some header files a bit, in particular heapam.h, by removing some
unnecessary #include lines in it.  Also, move some tuple routine prototypes and
macros to htup.h, which allows removal of heapam.h inclusion from some .c
files.

For this to work, a new header file access/sysattr.h needed to be created,
initially containing attribute numbers of system columns, for pg_dump usage.

While at it, make contrib ltree, intarray and hstore header files more
consistent with our header style.

Revision 1.242: download - view: text, markup, annotated - select for diffs
Mon Apr 21 00:26:45 2008 UTC (17 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +2 -2 lines
Allow float8, int8, and related datatypes to be passed by value on machines
where Datum is 8 bytes wide.  Since this will break old-style C functions
(those still using version 0 calling convention) that have arguments or
results of these types, provide a configure option to disable it and retain
the old pass-by-reference behavior.  Likewise, provide a configure option
to disable the recently-committed float4 pass-by-value change.

Zoltan Boszormenyi, plus configurability stuff by me.

Revision 1.241: download - view: text, markup, annotated - select for diffs
Fri Apr 18 18:43:09 2008 UTC (17 years, 4 months ago) by alvherre
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +2 -2 lines
Modify the float4 datatype to be pass-by-val.  Along the way, remove the last
uses of the long-deprecated float32 in contrib/seg; the definitions themselves
are still there, but no longer used.  fmgr/README updated to match.

I added a CREATE FUNCTION to account for existing seg_center() code in seg.c
too, and some tests for it and the neighbor functions.  At the same time,
remove checks for NULL which are not needed (because the functions are declared
STRICT).

I had to do some adjustments to contrib's btree_gist too.  The choices for
representation there are not ideal for changing the underlying types :-(

Original patch by Zoltan Boszormenyi, with some adjustments by me.

Revision 1.240: download - view: text, markup, annotated - select for diffs
Wed Mar 26 21:10:37 2008 UTC (17 years, 5 months ago) by alvherre
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +2 -1 lines
Move the HTSU_Result enum definition into snapshot.h, to avoid including
tqual.h into heapam.h.  This makes all inclusion of tqual.h explicit.

I also sorted alphabetically the includes on some source files.

Revision 1.239: download - view: text, markup, annotated - select for diffs
Sun Feb 17 04:21:05 2008 UTC (17 years, 6 months ago) by tgl
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +2 -1 lines
Add back #include <time.h> in a couple of files that seem to need it
on Linux.

Revision 1.238: download - view: text, markup, annotated - select for diffs
Tue Jan 1 19:45:48 2008 UTC (17 years, 8 months ago) by momjian
Branches: MAIN
CVS tags: REL8_3_STABLE, REL8_3_RC2, REL8_3_RC1, REL8_3_9, REL8_3_8, REL8_3_7, REL8_3_6, REL8_3_5, REL8_3_4, REL8_3_3, REL8_3_2, REL8_3_11, REL8_3_10, REL8_3_1, REL8_3_0
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +2 -2 lines
Update copyrights in source tree to 2008.

Revision 1.237: download - view: text, markup, annotated - select for diffs
Thu Nov 15 21:14:32 2007 UTC (17 years, 9 months ago) by momjian
Branches: MAIN
CVS tags: REL8_3_BETA4, REL8_3_BETA3
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +4 -4 lines
pgindent run for 8.3.

Revision 1.236: download - view: text, markup, annotated - select for diffs
Thu Aug 2 23:39:44 2007 UTC (18 years, 1 month ago) by adunstan
Branches: MAIN
CVS tags: REL8_3_BETA2, REL8_3_BETA1
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +3 -1 lines
Move session_start out of MyProcPort stucture and make it a global called MyStartTime,
so that we will be able to create a cookie for all processes for CSVlogs.
It is set wherever MyProcPid is set. Take the opportunity to remove the now
unnecessary session-only restriction on the %s and %c escapes in log_line_prefix.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Tue Jul 24 04:54:09 2007 UTC (18 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +12 -2 lines
Create a new dedicated Postgres process, "wal writer", which exists to write
and fsync WAL at convenient intervals.  For the moment it just tries to
offload this work from backends, but soon it will be responsible for
guaranteeing a maximum delay before asynchronously-committed transactions
will be flushed to disk.

This is a portion of Simon Riggs' async-commit patch, committed to CVS
separately because a background WAL writer seems like it might be a good idea
independently of the async-commit feature.  I rebased walwriter.c on
bgwriter.c because it seemed like a more appropriate way of handling signals;
while the startup/shutdown logic in postmaster.c is more like autovac because
we want walwriter to quit before we start the shutdown checkpoint.

Revision 1.234: download - view: text, markup, annotated - select for diffs
Thu Jun 28 00:02:37 2007 UTC (18 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +2 -2 lines
Implement "distributed" checkpoints in which the checkpoint I/O is spread
over a fairly long period of time, rather than being spat out in a burst.
This happens only for background checkpoints carried out by the bgwriter;
other cases, such as a shutdown checkpoint, are still done at full speed.

Remove the "all buffers" scan in the bgwriter, and associated stats
infrastructure, since this seems no longer very useful when the checkpoint
itself is properly throttled.

Original patch by Itagaki Takahiro, reworked by Heikki Linnakangas,
and some minor API editorialization by me.

Revision 1.233: download - view: text, markup, annotated - select for diffs
Wed Mar 7 13:35:02 2007 UTC (18 years, 6 months ago) by alvherre
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +67 -81 lines
Cleanup the bootstrap code a little, and rename "dummy procs" in the code
comments and variables to "auxiliary proc", per Heikki's request.

Revision 1.232: download - view: text, markup, annotated - select for diffs
Fri Feb 16 02:10:07 2007 UTC (18 years, 6 months ago) by alvherre
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +4 -14 lines
Remove useless database name from bootstrap argument processing (including
startup and bgwriter processes), and the -y flag.  It's not used anywhere.

Revision 1.231: download - view: text, markup, annotated - select for diffs
Thu Feb 15 23:23:22 2007 UTC (18 years, 6 months ago) by alvherre
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +2 -2 lines
Restructure autovacuum in two processes: a dummy process, which runs
continuously, and requests vacuum runs of "autovacuum workers" to postmaster.
The workers do the actual vacuum work.  This allows for future improvements,
like allowing multiple autovacuum jobs running in parallel.

For now, the code keeps the original behavior of having a single autovac
process at any time by sleeping until the previous worker has finished.

Revision 1.230: download - view: text, markup, annotated - select for diffs
Sat Feb 10 14:58:54 2007 UTC (18 years, 7 months ago) by petere
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +2 -2 lines
StrNCpy -> strlcpy (not complete)

Revision 1.229: download - view: text, markup, annotated - select for diffs
Mon Jan 22 01:35:19 2007 UTC (18 years, 7 months ago) by tgl
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +7 -5 lines
Add COST and ROWS options to CREATE/ALTER FUNCTION, plus underlying pg_proc
columns procost and prorows, to allow simple user adjustment of the estimated
cost of a function call, as well as control of the estimated number of rows
returned by a set-returning function.  We might eventually wish to extend this
to allow function-specific estimation routines, but there seems to be
consensus that we should try a simple constant estimate first.  In particular
this provides a relatively simple way to control the order in which different
WHERE clauses are applied in a plan node, which is a Good Thing in view of the
fact that the recent EquivalenceClass planner rewrite made that much less
predictable than before.

Revision 1.228: download - view: text, markup, annotated - select for diffs
Fri Jan 5 22:19:24 2007 UTC (18 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +2 -2 lines
Update CVS HEAD for 2007 copyright.  Back branches are typically not
back-stamped for this.

Revision 1.227: download - view: text, markup, annotated - select for diffs
Tue Nov 21 20:59:52 2006 UTC (18 years, 9 months ago) by tgl
Branches: MAIN
CVS tags: REL8_2_STABLE, REL8_2_RC1, REL8_2_9, REL8_2_8, REL8_2_7, REL8_2_6, REL8_2_5, REL8_2_4, REL8_2_3, REL8_2_2, REL8_2_17, REL8_2_16, REL8_2_15, REL8_2_14, REL8_2_13, REL8_2_12, REL8_2_11, REL8_2_10, REL8_2_1, REL8_2_0
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +10 -1 lines
On systems that have setsid(2) (which should be just about everything except
Windows), arrange for each postmaster child process to be its own process
group leader, and deliver signals SIGINT, SIGTERM, SIGQUIT to the whole
process group not only the direct child process.  This provides saner behavior
for archive and recovery scripts; in particular, it's possible to shut down a
warm-standby recovery server using "pg_ctl stop -m immediate", since delivery
of SIGQUIT to the startup subprocess will result in killing the waiting
recovery_command.  Also, this makes Query Cancel and statement_timeout apply
to scripts being run from backends via system().  (There is no support in the
core backend for that, but it's widely done using untrusted PLs.)  Per gripe
from Stephen Harris and subsequent discussion.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Tue Nov 21 00:49:54 2006 UTC (18 years, 9 months ago) by tgl
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +1 -8 lines
Adjust elog.c so that elog(FATAL) exits (including cases where ERROR is
promoted to FATAL) end in exit(1) not exit(0).  Then change the postmaster to
allow exit(1) without a system-wide panic, but not for the startup subprocess
or the bgwriter.  There were a couple of places that were using exit(1) to
deliberately force a system-wide panic; adjust these to be exit(2) instead.
This fixes the problem noted back in July that if the startup process exits
with elog(ERROR), the postmaster would think everything is hunky-dory and
proceed to start up.  Alternative solutions such as trying to run the entire
startup process as a critical section seem less clean, primarily because of
the fact that a fair amount of startup code is shared by all postmaster
children in the EXEC_BACKEND case.  We'd need an ugly special case somewhere
near the head of main.c to make it work if it's the child process's
responsibility to determine what happens; and what's the point when the
postmaster already treats different children differently?

Revision 1.225: download - view: text, markup, annotated - select for diffs
Wed Oct 4 00:29:49 2006 UTC (18 years, 11 months ago) by momjian
Branches: MAIN
CVS tags: REL8_2_BETA3, REL8_2_BETA2
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +5 -4 lines
pgindent run for 8.2.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Tue Aug 15 22:36:17 2006 UTC (19 years ago) by tgl
Branches: MAIN
CVS tags: REL8_2_BETA1
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +89 -40 lines
Add a hack so that get_type_io_data() can work from bootstrap.c's
internal TypInfo table in bootstrap mode.  This allows array_in and
array_out to be used during early bootstrap, which eliminates the
former obstacle to giving OUT parameters to built-in functions.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Mon Jul 31 20:09:00 2006 UTC (19 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +4 -3 lines
Change the relation_open protocol so that we obtain lock on a relation
(table or index) before trying to open its relcache entry.  This fixes
race conditions in which someone else commits a change to the relation's
catalog entries while we are in process of doing relcache load.  Problems
of that ilk have been reported sporadically for years, but it was not
really practical to fix until recently --- for instance, the recent
addition of WAL-log support for in-place updates helped.

Along the way, remove pg_am.amconcurrent: all AMs are now expected to support
concurrent update.

Revision 1.222: download - view: text, markup, annotated - select for diffs
Mon Jul 31 01:16:36 2006 UTC (19 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +2 -2 lines
Change the bootstrap sequence so that toast tables for system catalogs are
created in the bootstrap phase proper, rather than added after-the-fact
by initdb.  This is cleaner than before because it allows us to retire the
undocumented ALTER TABLE ... CREATE TOAST TABLE command, but the real reason
I'm doing it is so that toast tables of shared catalogs will now have
predetermined OIDs.  This will allow a reasonably clean solution to the
problem of locking tables before we load their relcache entries, to appear
in a forthcoming patch.

Revision 1.221: download - view: text, markup, annotated - select for diffs
Sat Jul 29 03:02:55 2006 UTC (19 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +3 -1 lines
Adjust initialization sequence for timezone_abbreviations so that
it's handled just about like timezone; in particular, don't try
to read anything during InitializeGUCOptions.  Should solve current
startup failure on Windows, and avoid wasted cycles if a nondefault
setting is specified in postgresql.conf too.  Possibly we need to
think about a more general solution for handling 'expensive to set'
GUC options.

Revision 1.220: download - view: text, markup, annotated - select for diffs
Fri Jul 14 14:52:17 2006 UTC (19 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +1 -8 lines
Remove 576 references of include files that were not needed.

Revision 1.219: download - view: text, markup, annotated - select for diffs
Thu Jul 13 16:49:13 2006 UTC (19 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +3 -1 lines
Allow include files to compile own their own.

Strip unused include files out unused include files, and add needed
includes to C files.

The next step is to remove unused include files in C files.

Revision 1.218: download - view: text, markup, annotated - select for diffs
Tue Jun 27 22:16:43 2006 UTC (19 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +2 -3 lines
Add GUC update_process_title to control whether 'ps' display is updated
for every command, default to on.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Sun Jun 18 15:38:36 2006 UTC (19 years, 2 months ago) by petere
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +10 -26 lines
Merge postmaster and postgres command into just postgres.  postmaster
symlink is kept for now for compatibility.  To call single-user mode, use
postgres --single.

Revision 1.208.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 8 23:55:54 2006 UTC (19 years, 3 months ago) by tgl
Branches: REL8_1_STABLE
CVS tags: REL8_1_9, REL8_1_8, REL8_1_7, REL8_1_6, REL8_1_5, REL8_1_21, REL8_1_20, REL8_1_19, REL8_1_18, REL8_1_17, REL8_1_16, REL8_1_15, REL8_1_14, REL8_1_13, REL8_1_12, REL8_1_11, REL8_1_10
Diff to: previous 1.208.2.1: preferred, colored; branchpoint 1.208: preferred, colored; next MAIN 1.209: preferred, colored
Changes since revision 1.208.2.1: +24 -1 lines
Fix bootstrap.c so that database startup process and bgwriter properly release
LWLocks during a panic exit.  This avoids the possible self-deadlock pointed
out by Qingqing Zhou.  Also, I noted that an error during LoadFreeSpaceMap()
or BuildFlatFiles() would result in exit(0) which would leave the postmaster
thinking all is well.  Added a critical section to ensure such errors don't
allow startup to proceed.

Backpatched to 8.1.  The 8.0 code is a bit different and I'm not sure if the
problem exists there; given we've not seen this reported from the field, I'm
going to be conservative about backpatching any further.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Thu Jun 8 23:55:48 2006 UTC (19 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +24 -1 lines
Fix bootstrap.c so that database startup process and bgwriter properly release
LWLocks during a panic exit.  This avoids the possible self-deadlock pointed
out by Qingqing Zhou.  Also, I noted that an error during LoadFreeSpaceMap()
or BuildFlatFiles() would result in exit(0) which would leave the postmaster
thinking all is well.  Added a critical section to ensure such errors don't
allow startup to proceed.

Backpatched to 8.1.  The 8.0 code is a bit different and I'm not sure if the
problem exists there; given we've not seen this reported from the field, I'm
going to be conservative about backpatching any further.

Revision 1.215: download - view: text, markup, annotated - select for diffs
Wed May 10 23:18:39 2006 UTC (19 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +15 -13 lines
Clean up code associated with updating pg_class statistics columns
(relpages/reltuples).  To do this, create formal support in heapam.c for
"overwrite" tuple updates (including xlog replay capability) and use that
instead of the ad-hoc overwrites we'd been using in VACUUM and CREATE INDEX.
Take the responsibility for updating stats during CREATE INDEX out of the
individual index AMs, and do it where it belongs, in catalog/index.c.  Aside
from being more modular, this avoids having to update the same tuple twice in
some paths through CREATE INDEX.  It's probably not measurably faster, but
for sure it's a lot cleaner than before.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Tue Apr 4 19:35:33 2006 UTC (19 years, 5 months ago) by tgl
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +12 -13 lines
Modify all callers of datatype input and receive functions so that if these
functions are not strict, they will be called (passing a NULL first parameter)
during any attempt to input a NULL value of their datatype.  Currently, all
our input functions are strict and so this commit does not change any
behavior.  However, this will make it possible to build domain input functions
that centralize checking of domain constraints, thereby closing numerous holes
in our domain support, as per previous discussion.

While at it, I took the opportunity to introduce convenience functions
InputFunctionCall, OutputFunctionCall, etc to use in code that calls I/O
functions.  This eliminates a lot of grotty-looking casts, but the main
motivation is to make it easier to grep for these places if we ever need
to touch them again.

Revision 1.213: download - view: text, markup, annotated - select for diffs
Tue Mar 7 01:03:12 2006 UTC (19 years, 6 months ago) by tgl
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +2 -7 lines
Make all our flex and bison files use %option prefix or %name-prefix
(respectively) to rename yylex and related symbols.  Some were doing
it this way already, while others used not-too-reliable sed hacks in
the Makefiles.  It's all nice and consistent now.

Revision 1.212: download - view: text, markup, annotated - select for diffs
Sun Mar 5 15:58:22 2006 UTC (19 years, 6 months ago) by momjian
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +2 -2 lines
Update copyright for 2006.  Update scripts.

Revision 1.211: download - view: text, markup, annotated - select for diffs
Thu Jan 5 10:07:44 2006 UTC (19 years, 8 months ago) by petere
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +18 -16 lines
Make all command-line options of postmaster and postgres the same.  See
http://archives.postgresql.org/pgsql-hackers/2006-01/msg00151.php for the
complete plan.

Revision 1.210: download - view: text, markup, annotated - select for diffs
Wed Jan 4 21:06:30 2006 UTC (19 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +18 -15 lines
Rearrange backend startup sequence so that ShmemIndexLock can become
an LWLock instead of a spinlock.  This hardly matters on Unix machines
but should improve startup performance on Windows (or any port using
EXEC_BACKEND).  Per previous discussion.

Revision 1.208.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 22 18:23:05 2005 UTC (19 years, 9 months ago) by momjian
Branches: REL8_1_STABLE
CVS tags: REL8_1_4, REL8_1_3, REL8_1_2, REL8_1_1
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +3 -3 lines
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory.  Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).

Backpatch to 8.1.X.

Revision 1.209: download - view: text, markup, annotated - select for diffs
Tue Nov 22 18:17:07 2005 UTC (19 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +3 -3 lines
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory.  Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).

Backpatch to 8.1.X.

Revision 1.198.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 20 20:06:02 2005 UTC (19 years, 10 months ago) by tgl
Branches: REL8_0_STABLE
CVS tags: REL8_0_9, REL8_0_8, REL8_0_7, REL8_0_6, REL8_0_5, REL8_0_25, REL8_0_24, REL8_0_23, REL8_0_22, REL8_0_21, REL8_0_20, REL8_0_19, REL8_0_18, REL8_0_17, REL8_0_16, REL8_0_15, REL8_0_14, REL8_0_13, REL8_0_12, REL8_0_11, REL8_0_10
Diff to: previous 1.198: preferred, colored; next MAIN 1.199: preferred, colored
Changes since revision 1.198: +3 -1 lines
Postpone pg_timezone_initialize() until after creation of postmaster.pid,
since it can take a fair amount of time and this can confuse boot scripts
that expect postmaster.pid to appear quickly.  Move initialization of SSL
library and preloaded libraries to after that point, too, just for luck.
Per reports from Tony Caduto and others.

Revision 1.208: download - view: text, markup, annotated - select for diffs
Thu Oct 20 20:05:44 2005 UTC (19 years, 10 months ago) by tgl
Branches: MAIN
CVS tags: REL8_1_0RC1, REL8_1_0BETA4, REL8_1_0
Branch point for: REL8_1_STABLE
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +3 -1 lines
Postpone pg_timezone_initialize() until after creation of postmaster.pid,
since it can take a fair amount of time and this can confuse boot scripts
that expect postmaster.pid to appear quickly.  Move initialization of SSL
library and preloaded libraries to after that point, too, just for luck.
Per reports from Tony Caduto and others.

Revision 1.207: download - view: text, markup, annotated - select for diffs
Sat Oct 15 02:49:12 2005 UTC (19 years, 11 months ago) by momjian
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +23 -26 lines
Standard pgindent run for 8.1.

Revision 1.206: download - view: text, markup, annotated - select for diffs
Mon Aug 8 03:11:30 2005 UTC (20 years, 1 month ago) by tgl
Branches: MAIN
CVS tags: REL8_1_0BETA3, REL8_1_0BETA2, REL8_1_0BETA1
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +10 -2 lines
Cause ShutdownPostgres to do a normal transaction abort during backend
exit, instead of trying to take shortcuts.  Introduce some additional
shutdown callback routines to eliminate kluges like having ProcKill
be responsible for shutting down the buffer manager.  Ensure that the
order of operations during shutdown is predictable and what you would
expect given the module layering.

Revision 1.205: download - view: text, markup, annotated - select for diffs
Mon Jul 4 04:51:45 2005 UTC (20 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +6 -4 lines
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.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Fri May 6 17:24:52 2005 UTC (20 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +2 -1 lines
For some reason access/tupmacs.h has been #including utils/memutils.h,
which is neither needed by nor related to that header.  Remove the bogus
inclusion and instead include the header in those C files that actually
need it.  Also fix unnecessary inclusions and bad inclusion order in
tsearch2 files.

Revision 1.203: download - view: text, markup, annotated - select for diffs
Sun May 1 18:56:17 2005 UTC (20 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +3 -5 lines
Change CREATE TYPE to require datatype output and send functions to have
only one argument.  (Per recent discussion, the option to accept multiple
arguments is pretty useless for user-defined types, and would be a likely
source of security holes if it was used.)  Simplify call sites of
output/send functions to not bother passing more than one argument.

Revision 1.202: download - view: text, markup, annotated - select for diffs
Thu Apr 14 20:03:23 2005 UTC (20 years, 5 months ago) by tgl
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +15 -16 lines
Completion of project to use fixed OIDs for all system catalogs and
indexes.  Replace all heap_openr and index_openr calls by heap_open
and index_open.  Remove runtime lookups of catalog OID numbers in
various places.  Remove relcache's support for looking up system
catalogs by name.  Bulky but mostly very boring patch ...

Revision 1.201: download - view: text, markup, annotated - select for diffs
Tue Mar 29 19:44:22 2005 UTC (20 years, 5 months ago) by tgl
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +5 -1 lines
Add proallargtypes and proargmodes columns to pg_proc, as per my earlier
proposal for OUT parameter support.  The columns don't actually *do*
anything yet, they are just left NULLs.  But I thought I'd commit this
part separately as a fairly pure example of the tasks needed when adding
a column to pg_proc or one of the other core system tables.

Revision 1.200: download - view: text, markup, annotated - select for diffs
Tue Mar 29 00:16:54 2005 UTC (20 years, 5 months ago) by tgl
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +17 -9 lines
Convert oidvector and int2vector into variable-length arrays.  This
change saves a great deal of space in pg_proc and its primary index,
and it eliminates the former requirement that INDEX_MAX_KEYS and
FUNC_MAX_ARGS have the same value.  INDEX_MAX_KEYS is still embedded
in the on-disk representation (because it affects index tuple header
size), but FUNC_MAX_ARGS is not.  I believe it would now be possible
to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet.
There are still a lot of vestigial references to FUNC_MAX_ARGS, which
I will clean up in a separate pass.  However, getting rid of it
altogether would require changing the FunctionCallInfoData struct,
and I'm not sure I want to buy into that.

Revision 1.199: download - view: text, markup, annotated - select for diffs
Sun Feb 20 02:21:31 2005 UTC (20 years, 6 months ago) by tgl
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +3 -1 lines
Add code to prevent transaction ID wraparound by enforcing a safe limit
in GetNewTransactionId().  Since the limit value has to be computed
before we run any real transactions, this requires adding code to database
startup to scan pg_database and determine the oldest datfrozenxid.
This can conveniently be combined with the first stage of an attack on
the problem that the 'flat file' copies of pg_shadow and pg_group are
not properly updated during WAL recovery.  The code I've added to
startup resides in a new file src/backend/utils/init/flatfiles.c, and
it is responsible for rewriting the flat files as well as initializing
the XID wraparound limit value.  This will eventually allow us to get
rid of GetRawDatabaseInfo too, but we'll need an initdb so we can add
a trigger to pg_database.

Revision 1.198: download - view: text, markup, annotated - select for diffs
Fri Jan 14 21:08:44 2005 UTC (20 years, 7 months ago) by tgl
Branches: MAIN
CVS tags: REL8_0_4, REL8_0_3, REL8_0_2, REL8_0_1, REL8_0_0
Branch point for: REL8_0_STABLE
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +5 -4 lines
postgres -boot would print the wrong program name in event of a
failure in SelectConfigFiles().  Cosmetic issue, but ...

Revision 1.197: download - view: text, markup, annotated - select for diffs
Fri Dec 31 21:59:34 2004 UTC (20 years, 8 months ago) by pgsql
Branches: MAIN
CVS tags: REL8_0_0RC5, REL8_0_0RC4, REL8_0_0RC3
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +2 -2 lines

Tag appropriate files for rc3

Also performed an initial run through of upgrading our Copyright date to
extend to 2005 ... first run here was very simple ... change everything
where: grep 1996-2004 && the word 'Copyright' ... scanned through the
generated list with 'less' first, and after, to make sure that I only
picked up the right entries ...

Revision 1.196: download - view: text, markup, annotated - select for diffs
Sun Nov 14 19:35:29 2004 UTC (20 years, 10 months ago) by tgl
Branches: MAIN
CVS tags: REL8_0_0RC2, REL8_0_0RC1, REL8_0_0BETA5
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +2 -2 lines
Remove GUC USERLIMIT variable category, making the affected variables
plain SUSET instead.  Also delay processing of options received in
client connection request until after we know if the user is a superuser,
so that SUSET values can be set that way by legitimate superusers.
Per recent discussion.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Sun Oct 10 23:37:16 2004 UTC (20 years, 11 months ago) by neilc
Branches: MAIN
CVS tags: REL8_0_0BETA4
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +2 -2 lines
Cosmetic improvements/code cleanup:

- replace some function signatures of the form "some_type foo()" with
"some_type foo(void)"
- replace a few instances of a literal 0 being used as a NULL pointer;
there are more instances of this in the code, but I just fixed a few
- in src/backend/utils/mb/wstrncmp.c, replace K&R style function
declarations with ANSI style, remove use of 'register' keyword
- remove an "extern" modifier that was applied to a function definition
(rather than a declaration)

Revision 1.194: download - view: text, markup, annotated - select for diffs
Fri Oct 8 01:36:33 2004 UTC (20 years, 11 months ago) by tgl
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +9 -28 lines
Whack some sense into the configuration-file-location patch.
Refactor code into something reasonably understandable, cause
use of the feature to not fail in standalone backends or in
EXEC_BACKEND case, fix sloppy guc.c table entries, make the
documentation minimally usable.

Revision 1.193: download - view: text, markup, annotated - select for diffs
Sun Aug 29 05:06:41 2004 UTC (21 years ago) by momjian
Branches: MAIN
CVS tags: REL8_0_0BETA3, REL8_0_0BETA2
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +28 -28 lines
Pgindent run for 8.0.

Revision 1.192: download - view: text, markup, annotated - select for diffs
Sun Aug 29 04:12:25 2004 UTC (21 years ago) by momjian
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +2 -2 lines
Update copyright to 2004.

Revision 1.191: download - view: text, markup, annotated - select for diffs
Sat Jul 31 17:57:11 2004 UTC (21 years, 1 month ago) by tgl
Branches: MAIN
CVS tags: REL8_0_0BETA1
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +9 -2 lines
For EXEC_BACKEND case, BootstrapMain needs to recompute paths, same as
PostgresMain.  Per Magnus Hagander.

Revision 1.190: download - view: text, markup, annotated - select for diffs
Sat Jul 31 00:45:30 2004 UTC (21 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +1 -11 lines
Restructure error handling as recently discussed.  It is now really
possible to trap an error inside a function rather than letting it
propagate out to PostgresMain.  You still have to use AbortCurrentTransaction
to clean up, but at least the error handling itself will cooperate.

Revision 1.189: download - view: text, markup, annotated - select for diffs
Wed Jul 21 20:34:45 2004 UTC (21 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +0 -13 lines
Back out pg_autovacuum commit after cvs clean failure causes commit.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Wed Jul 21 20:22:58 2004 UTC (21 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +14 -1 lines
lease find enclosed a patch that matches the PL/Perl documentation
(fairly closely, I hope) to the current PL/Perl implementation.

David Fetter

Revision 1.187: download - view: text, markup, annotated - select for diffs
Sat Jul 17 03:28:37 2004 UTC (21 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +1 -49 lines
Invent ResourceOwner mechanism as per my recent proposal, and use it to
keep track of portal-related resources separately from transaction-related
resources.  This allows cursors to work in a somewhat sane fashion with
nested transactions.  For now, cursor behavior is non-subtransactional,
that is a cursor's state does not roll back if you abort a subtransaction
that fetched from the cursor.  We might want to change that later.

Revision 1.186: download - view: text, markup, annotated - select for diffs
Sun Jul 11 00:18:43 2004 UTC (21 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +6 -7 lines
Allow configuration files to be placed outside the data directory.

Add new postgresql.conf variables to point to data, pg_hba.conf, and
pg_ident.conf files.

Needs more documentation.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Thu Jun 24 21:02:24 2004 UTC (21 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +8 -10 lines
Replace direct fprintf(stderr) calls by write_stderr(), and cause this
routine to do something appropriate on Win32.  Also, add a security check
on Win32 that parallels the can't-run-as-root check on Unix.

Magnus Hagander

Revision 1.184: download - view: text, markup, annotated - select for diffs
Sun Jun 6 00:41:26 2004 UTC (21 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +43 -33 lines
Infrastructure for I/O of composite types: arrange for the I/O routines
of a composite type to get that type's OID as their second parameter,
in place of typelem which is useless.  The actual changes are mostly
centralized in getTypeInputInfo and siblings, but I had to fix a few
places that were fetching pg_type.typelem for themselves instead of
using the lsyscache.c routines.  Also, I renamed all the related variables
from 'typelem' to 'typioparam' to discourage people from assuming that
they necessarily contain array element types.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Thu Jun 3 02:08:02 2004 UTC (21 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +1 -2 lines
Adjust our timezone library to use pg_time_t (typedef'd as int64) in
place of time_t, as per prior discussion.  The behavior does not change
on machines without a 64-bit-int type, but on machines with one, which
is most, we are rid of the bizarre boundary behavior at the edges of
the 32-bit-time_t range (1901 and 2038).  The system will now treat
times over the full supported timestamp range as being in your local
time zone.  It may seem a little bizarre to consider that times in
4000 BC are PST or EST, but this is surely at least as reasonable as
propagating Gregorian calendar rules back that far.

I did not modify the format of the zic timezone database files, which
means that for the moment the system will not know about daylight-savings
periods outside the range 1901-2038.  Given the way the files are set up,
it's not a simple decision like 'widen to 64 bits'; we have to actually
think about the range of years that need to be supported.  We should
probably inquire what the plans of the upstream zic people are before
making any decisions of our own.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Sat May 29 22:48:18 2004 UTC (21 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +100 -104 lines
Separate out bgwriter code into a logically separate module, rather
than being random pieces of other files.  Give bgwriter responsibility
for all checkpoint activity (other than a post-recovery checkpoint);
so this child process absorbs the functionality of the former transient
checkpoint and shutdown subprocesses.  While at it, create an actual
include file for postmaster.c, which for some reason never had its own
file before.

Revision 1.181: download - view: text, markup, annotated - select for diffs
Fri May 28 05:12:45 2004 UTC (21 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +52 -45 lines
Code review for EXEC_BACKEND changes.  Reduce the number of #ifdefs by
about a third, make it work on non-Windows platforms again.  (But perhaps
I broke the WIN32 code, since I have no way to test that.)  Fold all the
paths that fork postmaster child processes to go through the single
routine SubPostmasterMain, which takes care of resurrecting the state that
would normally be inherited from the postmaster (including GUC variables).
Clean up some places where there's no particularly good reason for the
EXEC and non-EXEC cases to work differently.  Take care of one or two
FIXMEs that remained in the code.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Thu May 27 17:12:49 2004 UTC (21 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +4 -3 lines
Get rid of the former rather baroque mechanism for propagating the values
of ThisStartUpID and RedoRecPtr into new backends.  It's a lot easier just
to make them all grab the values out of shared memory during startup.
This helps to decouple the postmaster from checkpoint execution, which I
need since I'm intending to let the bgwriter do it instead, and it also
fixes a bug in the Win32 port: ThisStartUpID wasn't getting propagated at
all AFAICS.  (Doesn't give me a lot of faith in the amount of testing that
port has gotten.)

Revision 1.179: download - view: text, markup, annotated - select for diffs
Fri May 21 05:07:56 2004 UTC (21 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +6 -3 lines
Integrate src/timezone library for all platforms.  There is more we can
and should do now that we control our own destiny for timezone handling,
but this commit gets the bulk of the picayune diffs in place.
Magnus Hagander and Tom Lane.

Revision 1.178: download - view: text, markup, annotated - select for diffs
Thu Apr 1 21:28:43 2004 UTC (21 years, 5 months ago) by tgl
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +58 -68 lines
Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums.  This commit does not
in itself do much for us, except eliminate the horrid memory leak
associated with evaluation of whole-row variables.  However, it lays the
groundwork for allowing composite types as table columns, and perhaps
some other useful features as well.  Per my proposal of a few days ago.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Wed Feb 25 19:41:22 2004 UTC (21 years, 6 months ago) by momjian
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +2 -2 lines
For application to HEAD, following community review.

* Changes incorrect CYGWIN defines to __CYGWIN__

* Some localtime returns NULL checks (when unchecked cause SEGVs under
Win32
regression tests)

* Rationalized CreateSharedMemoryAndSemaphores and
AttachSharedMemoryAndSemaphores (Bruce, I finally remembered to do it);
requires attention.

Claudio Natoli

Revision 1.176: download - view: text, markup, annotated - select for diffs
Tue Feb 10 01:55:24 2004 UTC (21 years, 7 months ago) by tgl
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +1 -3 lines
Restructure smgr API as per recent proposal.  smgr no longer depends on
the relcache, and so the notion of 'blind write' is gone.  This should
improve efficiency in bgwriter and background checkpoint processes.
Internal restructuring in md.c to remove the not-very-useful array of
MdfdVec objects --- might as well just use pointers.
Also remove the long-dead 'persistent main memory' storage manager (mm.c),
since it seems quite unlikely to ever get resurrected.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Wed Jan 7 18:56:25 2004 UTC (21 years, 8 months ago) by neilc
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +21 -21 lines
More janitorial work: remove the explicit casting of NULL literals to a
pointer type when it is not necessary to do so.

For future reference, casting NULL to a pointer type is only necessary
when (a) invoking a function AND either (b) the function has no prototype
OR (c) the function is a varargs function.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Tue Jan 6 23:55:18 2004 UTC (21 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +14 -1 lines
Apply the core parts of Dennis Bjorklund's patch to allow function
parameters to be declared with names.  pg_proc has a column to store
names, and CREATE FUNCTION can insert data into it, but that's all as
yet.  I need to do more work on the pg_dump and plpgsql portions of the
patch before committing those, but I thought I'd get the bulky changes
in before the tree drifts under me.
initdb forced due to pg_proc change.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Tue Jan 6 23:15:22 2004 UTC (21 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +16 -8 lines
Final rearrangement of main postgresql child process (ie.
BackendFork/SSDataBase/pgstat) startup, to allow fork/exec calls to
closely mimic (the soon to be provided) Win32 CreateProcess equivalent
calls.

Claudio Natoli

Revision 1.172: download - view: text, markup, annotated - select for diffs
Thu Dec 25 03:52:50 2003 UTC (21 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +18 -24 lines
Continued rearrangement to permit pgstat + BootstrapMain processes to be
fork/exec'd, in the same mode as the previous patch for backends.

Claudio Natoli

Revision 1.171: download - view: text, markup, annotated - select for diffs
Sat Dec 20 17:31:21 2003 UTC (21 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +4 -3 lines
This patch is the next step towards (re)allowing fork/exec.

Claudio Natoli

Revision 1.170: download - view: text, markup, annotated - select for diffs
Fri Dec 12 18:45:08 2003 UTC (21 years, 9 months ago) by petere
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +3 -3 lines
This patch properly sets the prototype for the on_shmem_exit and
on_proc_exit functions, and adjust all other related code to use
the proper types too.

by Kurt Roeckx

Revision 1.169: download - view: text, markup, annotated - select for diffs
Mon Dec 1 22:15:37 2003 UTC (21 years, 9 months ago) by tgl
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +4 -2 lines
Avoid assuming that type key_t is 32 bits, since it reportedly isn't
on 64-bit Solaris.  Use a non-system-dependent datatype for UsedShmemSegID,
namely unsigned long (which we were already assuming could hold a shmem
key anyway, cf RecordSharedMemoryInLockFile).

Revision 1.168: download - view: text, markup, annotated - select for diffs
Sat Nov 29 19:51:41 2003 UTC (21 years, 9 months ago) by pgsql
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +1 -1 lines

$Header: -> $PostgreSQL Changes ...

Revision 1.167: download - view: text, markup, annotated - select for diffs
Wed Nov 19 15:55:07 2003 UTC (21 years, 9 months ago) by wieck
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +19 -2 lines
Background writer process

This first part of the background writer does no syncing at all.
It's only purpose is to keep the LRU heads clean so that regular
backends seldom to never have to call write().

Jan

Revision 1.165.2.1: download - view: text, markup, annotated - select for diffs
Sun Sep 7 04:36:47 2003 UTC (22 years ago) by momjian
Branches: WIN32_DEV
Diff to: previous 1.165: preferred, colored; next MAIN 1.166: preferred, colored
Changes since revision 1.165: +8 -2 lines
Update this branch to match CVS head, includes WIN32 improvements.

Revision 1.166: download - view: text, markup, annotated - select for diffs
Tue Sep 2 19:04:12 2003 UTC (22 years ago) by tgl
Branches: MAIN
CVS tags: REL7_4_STABLE, REL7_4_RC2, REL7_4_RC1, REL7_4_BETA5, REL7_4_BETA4, REL7_4_BETA3, REL7_4_9, REL7_4_8, REL7_4_7, REL7_4_6, REL7_4_5, REL7_4_4, REL7_4_3, REL7_4_29, REL7_4_28, REL7_4_27, REL7_4_26, REL7_4_25, REL7_4_24, REL7_4_23, REL7_4_22, REL7_4_21, REL7_4_20, REL7_4_2, REL7_4_19, REL7_4_18, REL7_4_17, REL7_4_16, REL7_4_15, REL7_4_14, REL7_4_13, REL7_4_12, REL7_4_11, REL7_4_10, REL7_4_1, REL7_4
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +8 -2 lines
Cause standalone backend (including bootstrap case) to read the GUC
config file if it exists.  This was already discussed as being a good
idea, and now seems the cleanest way to deal with initdb-time failures
on machines with small SHMMAX.  (The submitted patches instead modified
initdb.sh to pass the correct sizing parameters, but that would still
leave standalone backends prone to failure later.  An admin who needs
to use a standalone backend has enough trouble already, he shouldn't
have to manually configure its shmem settings...)

Revision 1.165: download - view: text, markup, annotated - select for diffs
Mon Aug 4 02:39:57 2003 UTC (22 years, 1 month ago) by momjian
Branches: MAIN
CVS tags: REL7_4_BETA2, REL7_4_BETA1
Branch point for: WIN32_DEV
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +2 -2 lines
Update copyrights to 2003.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Mon Aug 4 00:43:16 2003 UTC (22 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +20 -22 lines
pgindent run.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Sun Jul 27 21:49:53 2003 UTC (22 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +3 -4 lines
elog mop-up: bring some straggling fprintf(stderr)'s into the elog world.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Tue Jul 22 23:30:37 2003 UTC (22 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +22 -21 lines
Error message editing in backend/bootstrap, /lib, /nodes, /port.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Tue Jul 15 00:11:13 2003 UTC (22 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +42 -13 lines
Tweak original coding so that we can determine the platform-specific
shared_buffers and max_connections values to use before we run the
bootstrap process.  Without this, initdb would fail on platforms where
the hardwired default values are too large.  (We could get around that
by making the hardwired defaults tiny, perhaps, but why slow down
bootstrap by starving it for buffers...)

Revision 1.160: download - view: text, markup, annotated - select for diffs
Wed May 28 18:19:09 2003 UTC (22 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +4 -4 lines
Fix things so that an error occuring during standalone-backend processing
in initdb will result in exit(1), allowing the initdb script to realize
that there's something wrong.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Wed May 28 16:03:55 2003 UTC (22 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +5 -1 lines
Replace functional-index facility with expressional indexes.  Any column
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects).  This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up.  Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.

Revision 1.158: download - view: text, markup, annotated - select for diffs
Tue May 27 17:49:45 2003 UTC (22 years, 3 months ago) by momjian
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +15 -15 lines
Make debug_ GUC varables output DEBUG1 rather than LOG, and mention in
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location.
Doc changes included.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Wed May 14 03:26:00 2003 UTC (22 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +3 -3 lines
Backend support for autocommit removed, per recent discussions.  The
only remnant of this failed experiment is that the server will take
SET AUTOCOMMIT TO ON.  Still TODO: provide some client-side autocommit
logic in libpq.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Thu May 8 14:49:03 2003 UTC (22 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +6 -3 lines
Pass shared memory address on command line to exec'ed backend.

Allow backends to attached to specified shared memory address.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Tue May 6 23:34:55 2003 UTC (22 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +21 -7 lines
Pass shared memory id and socket descriptor number on command line for
fork/exec.

Revision 1.154: download - view: text, markup, annotated - select for diffs
Tue May 6 05:15:45 2003 UTC (22 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +6 -6 lines
Rename internal variables DBName|dbName to dbname, for consistency.

Revision 1.153: download - view: text, markup, annotated - select for diffs
Tue May 6 04:16:35 2003 UTC (22 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +8 -7 lines
Comment out some of the conditional tests until we have exec().

Reorder non-default variable loading until PGDATA is defined.

Revision 1.152: download - view: text, markup, annotated - select for diffs
Sat May 3 05:13:18 2003 UTC (22 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +7 -4 lines
Cleanup patch for exec() handling.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Sat May 3 03:52:07 2003 UTC (22 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +6 -1 lines
Handle clog structure in shared memory in exec() case, for Win32.

Revision 1.150: download - view: text, markup, annotated - select for diffs
Fri May 2 21:59:31 2003 UTC (22 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +0 -5 lines
Back out last commit --- wrong patch.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Fri May 2 21:52:42 2003 UTC (22 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +6 -1 lines
Dump/read non-default GUC values for use by exec'ed backends, for Win32.

Revision 1.148: download - view: text, markup, annotated - select for diffs
Thu Mar 6 00:04:27 2003 UTC (22 years, 6 months ago) by tgl
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +4 -1 lines
Add code to dump contents of free space map into $PGDATA/global/pg_fsm.cache
at database shutdown, and then load it again at database startup.  This
preserves our hard-won knowledge of free space across restarts (given
an orderly shutdown, that is).

Revision 1.147: download - view: text, markup, annotated - select for diffs
Sun Dec 15 16:17:38 2002 UTC (22 years, 9 months ago) by tgl
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +2 -3 lines
Revise executor APIs so that all per-query state structure is built in
a per-query memory context created by CreateExecutorState --- and destroyed
by FreeExecutorState.  This provides a final solution to the longstanding
problem of memory leaked by various ExecEndNode calls.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Fri Dec 13 19:45:45 2002 UTC (22 years, 9 months ago) by tgl
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +4 -1 lines
Phase 3 of read-only-plans project: ExecInitExpr now builds expression
execution state trees, and ExecEvalExpr takes an expression state tree
not an expression plan tree.  The plan tree is now read-only as far as
the executor is concerned.  Next step is to begin actually exploiting
this property.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Thu Nov 14 23:53:27 2002 UTC (22 years, 10 months ago) by momjian
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +2 -2 lines
Rename server_min_messages to log_min_messages.  Part of consolidation
of log_ settings.

Revision 1.120.2.3: download - view: text, markup, annotated - select for diffs
Mon Sep 30 20:18:59 2002 UTC (22 years, 11 months ago) by tgl
Branches: REL7_2_STABLE
CVS tags: REL7_2_8, REL7_2_7, REL7_2_6, REL7_2_5, REL7_2_4, REL7_2_3
Diff to: previous 1.120.2.2: preferred, colored; branchpoint 1.120: preferred, colored; next MAIN 1.121: preferred, colored
Changes since revision 1.120.2.2: +4 -3 lines
Back-patch fix for 'can't wait without a PROC structure' failures:
remove separate ShutdownBufferPoolAccess exit callback, and do the
work in ProcKill instead, before we delete MyProc.

Revision 1.120.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 30 19:55:08 2002 UTC (22 years, 11 months ago) by tgl
Branches: REL7_2_STABLE
Diff to: previous 1.120.2.1: preferred, colored; branchpoint 1.120: preferred, colored
Changes since revision 1.120.2.1: +3 -3 lines
Back-patch fix to ensure a checkpoint occurs before truncating CLOG,
even if no recent WAL activity has occurred.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Thu Sep 26 22:58:33 2002 UTC (22 years, 11 months ago) by tgl
Branches: MAIN
CVS tags: REL7_3_STABLE, REL7_3_9, REL7_3_8, REL7_3_7, REL7_3_6, REL7_3_5, REL7_3_4, REL7_3_21, REL7_3_20, REL7_3_2, REL7_3_19, REL7_3_18, REL7_3_17, REL7_3_16, REL7_3_15, REL7_3_14, REL7_3_13, REL7_3_12, REL7_3_11, REL7_3_10
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -3 lines
Ensure that before truncating CLOG, we force a checkpoint even if no
recent WAL activity has occurred.  Without this, it's possible that a
later crash might leave tuples on disk with un-updated commit status
bits.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Wed Sep 25 20:31:40 2002 UTC (22 years, 11 months ago) by tgl
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +4 -3 lines
Remove ShutdownBufferPoolAccess exit callback, and do the work in
ProcKill instead, where we still have a PGPROC with which to wait on
LWLocks.  This fixes 'can't wait without a PROC structure' failures
occasionally seen during backend shutdown (I'm surprised they weren't
more frequent, actually).  Add an Assert() to LWLockAcquire to help
catch any similar mistakes in future.  Fix failure to update MyProcPid
for standalone backends and pgstat processes.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sun Sep 22 19:42:50 2002 UTC (22 years, 11 months ago) by tgl
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +3 -2 lines
Replace pg_attribute.attisinherited with attislocal and attinhcount
columns, to allow more correct behavior in multiple-inheritance cases.
Patch by Alvaro Herrera, review by Tom Lane.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Wed Sep 4 20:31:13 2002 UTC (23 years ago) by momjian
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +23 -22 lines
pgindent run.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Mon Sep 2 01:05:03 2002 UTC (23 years ago) by tgl
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +5 -9 lines
Code review for HeapTupleHeader changes.  Add version number to page headers
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask,
per earlier discussion.  Simplify scheme for overlaying fields in tuple
header (no need for cmax to live in more than one place).  Don't try to
clear infomask status bits in tqual.c --- not safe to do it there.  Don't
try to force output table of a SELECT INTO to have OIDs, either.  Get rid
of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which
has already caused one recent failure.  Improve documentation.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Fri Aug 30 22:18:05 2002 UTC (23 years ago) by tgl
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +3 -3 lines
AUTOCOMMIT mode is now an available backend GUC variable; setting it
to false provides more SQL-spec-compliant behavior than we had before.
I am not sure that setting it false is actually a good idea yet; there
is a lot of client-side code that will probably be broken by turning
autocommit off.  But it's a start.

Loosely based on a patch by David Van Wie.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Sat Aug 17 15:12:06 2002 UTC (23 years ago) by momjian
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +4 -11 lines
Reverse out XLogDir/-X write-ahead log handling, per discussion.
Original patch from Thomas.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Sat Aug 10 20:29:17 2002 UTC (23 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +1 -3 lines
This patch removes a lot of unused code related to assertions and
error handling, and simplifies the code that remains. Apparently,
the code that left Berkeley had a whole "error handling subsystem",
which exceptions and whatnot. Since we don't use that anymore,
there's no reason to keep it around.

The regression tests pass with the patch applied. Unless anyone
sees a problem, please apply.

Neil Conway

Revision 1.136: download - view: text, markup, annotated - select for diffs
Sun Aug 4 06:26:38 2002 UTC (23 years, 1 month ago) by thomas
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +11 -4 lines
Implement WAL log location control using "-X" or PGXLOG.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Fri Aug 2 22:36:05 2002 UTC (23 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +3 -4 lines
When compiling with --enable-cassert, check for reference count leaks
in the relcache.  It's rather silly that we have reference count leak
checks in bufmgr and in catcache, but not in relcache which will normally
have many fewer entries.  Chris K-L would have caught at least one bug
in his recent DROP patch if he'd had this.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Fri Aug 2 18:15:04 2002 UTC (23 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +28 -23 lines
ALTER TABLE DROP COLUMN works.  Patch by Christopher Kings-Lynne,
code review by Tom Lane.  Remaining issues: functions that take or
return tuple types are likely to break if one drops (or adds!)
a column in the table defining the type.  Need to think about what
to do here.

Along the way: some code review for recent COPY changes; mark system
columns attnotnull = true where appropriate, per discussion a month ago.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Sat Jul 20 05:16:56 2002 UTC (23 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +11 -5 lines
oid is needed, it is added at the end of the struct (after the null
bitmap, if present).

Per Tom Lane's suggestion the information whether a tuple has an oid
or not is carried in the tuple descriptor.  For debugging reasons
tdhasoid is of type char, not bool.  There are predefined values for
WITHOID, WITHOUTOID and UNDEFOID.

This patch has been generated against a cvs snapshot from last week
and I don't expect it to apply cleanly to current sources.  While I
post it here for public review, I'm working on a new version against a
current snapshot.  (There's been heavy activity recently; hope to
catch up some day ...)

This is a long patch;  if it is too hard to swallow, I can provide it
in smaller pieces:

Part 1:  Accessor macros
Part 2:  tdhasoid in TupDesc
Part 3:  Regression test
Part 4:  Parameter withoid to heap_addheader
Part 5:  Eliminate t_oid from HeapTupleHeader

Part 2 is the most hairy part because of changes in the executor and
even in the parser;  the other parts are straightforward.

Up to part 4 the patched postmaster stays binary compatible to
databases created with an unpatched version.  Part 5 is small (100
lines) and finally breaks compatibility.

Manfred Koizar

Revision 1.132: download - view: text, markup, annotated - select for diffs
Thu Jun 20 20:29:26 2002 UTC (23 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +2 -2 lines
Update copyright to 2002.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Tue May 21 22:05:53 2002 UTC (23 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -2 lines
Remove global variable scanCommandId in favor of storing a command ID
in snapshots, per my proposal of a few days ago.  Also, tweak heapam.c
routines (heap_insert, heap_update, heap_delete, heap_mark4update) to
be passed the command ID to use, instead of doing GetCurrentCommandID.
For catalog updates they'll still get passed current command ID, but
for updates generated from the main executor they'll get passed the
command ID saved in the snapshot the query is using.  This should fix
some corner cases associated with functions and triggers that advance
current command ID while an outer query is still in progress.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon May 20 23:51:41 2002 UTC (23 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +9 -9 lines
Restructure indexscan API (index_beginscan, index_getnext) per
yesterday's proposal to pghackers.  Also remove unnecessary parameters
to heap_beginscan, heap_rescan.  I modified pg_proc.h to reflect the
new numbers of parameters for the AM interface routines, but did not
force an initdb because nothing actually looks at those fields.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Fri May 17 01:19:16 2002 UTC (23 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +7 -6 lines
Merge the last few variable.c configuration variables into the generic
GUC support.  It's now possible to set datestyle, timezone, and
client_encoding from postgresql.conf and per-database or per-user
settings.  Also, implement rollback of SET commands that occur in a
transaction that later fails.  Create a SET LOCAL var = value syntax
that sets the variable only for the duration of the current transaction.
All per previous discussions in pghackers.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Sun May 5 00:03:28 2002 UTC (23 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +2 -1 lines
Create an internal semaphore API that is not tied to SysV semaphores.
As proof of concept, provide an alternate implementation based on POSIX
semaphores.  Also push the SysV shared-memory implementation into a
separate file so that it can be replaced conveniently.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Sat Apr 27 21:24:33 2002 UTC (23 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +22 -18 lines
Support toasting of shared system relations, and provide toast tables for
pg_database, pg_shadow, pg_group, all of which now have potentially-long
fields.  Along the way, get rid of SharedSystemRelationNames list: shared
rels are now identified in their include/pg_catalog/*.h files by a
BKI_SHARED_RELATION macro, while indexes and toast rels inherit sharedness
automatically from their parent table.  Fix some bugs with failure to detoast
pg_group.grolist during ALTER GROUP.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Thu Apr 25 02:56:55 2002 UTC (23 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +24 -6 lines
Implement types regprocedure, regoper, regoperator, regclass, regtype
per pghackers discussion.  Add some more typsanity tests, and clean
up some problems exposed thereby (broken or missing array types for
some built-in types).  Also, clean up loose ends from unknownin/out
patch.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Tue Mar 26 19:15:16 2002 UTC (23 years, 5 months ago) by tgl
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +9 -9 lines
pg_class has a relnamespace column.  You can create and access tables
in schemas other than the system namespace; however, there's no search
path yet, and not all operations work yet on tables outside the system
namespace.

Revision 1.120.2.1: download - view: text, markup, annotated - select for diffs
Fri Mar 15 19:20:44 2002 UTC (23 years, 6 months ago) by tgl
Branches: REL7_2_STABLE
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -2 lines
Repair two problems with WAL logging of sequence nextvalI() ops, as
per recent pghackers discussion: force a new WAL record at first nextval
after a checkpoint, and ensure that xlog is flushed to disk if a nextval
record is the only thing emitted by a transaction.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Fri Mar 15 19:20:34 2002 UTC (23 years, 6 months ago) by tgl
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +2 -2 lines
Repair two problems with WAL logging of sequence nextvalI() ops, as
per recent pghackers discussion: force a new WAL record at first nextval
after a checkpoint, and ensure that xlog is flushed to disk if a nextval
record is the only thing emitted by a transaction.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Fri Mar 8 00:42:09 2002 UTC (23 years, 6 months ago) by tgl
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +2 -2 lines
Add missing colon to getopt() arg.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Sat Mar 2 21:39:21 2002 UTC (23 years, 6 months ago) by momjian
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +32 -42 lines
Commit to match discussed elog() changes.  Only update is that LOG is
now just below FATAL in server_min_messages.  Added more text to
highlight ordering difference between it and client_min_messages.

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

REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
        DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
        DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster

Revision 1.121: download - view: text, markup, annotated - select for diffs
Sat Feb 23 01:31:34 2002 UTC (23 years, 6 months ago) by petere
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +3 -3 lines
Save source of GUC settings, allowing different sources to be processed in
any order without affecting results.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Thu Jan 10 01:11:45 2002 UTC (23 years, 8 months ago) by tgl
Branches: MAIN
CVS tags: REL7_2_RC2, REL7_2_RC1, REL7_2_BETA5, REL7_2
Branch point for: REL7_2_STABLE
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +2 -2 lines
The result of getopt() should be compared to -1, not EOF, per
pgsql-hackers discussion of this date.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Thu Oct 25 05:49:22 2001 UTC (23 years, 10 months ago) by momjian
Branches: MAIN
CVS tags: REL7_2_BETA4, REL7_2_BETA3, REL7_2_BETA2, REL7_2_BETA1
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +4 -5 lines
pgindent run on all C files.  Java run to follow.  initdb/regression
tests pass.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Fri Oct 19 17:03:08 2001 UTC (23 years, 10 months ago) by tgl
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +4 -2 lines
Ensure that all startup paths (postmaster, standalone postgres, or
bootstrap) check for a valid PG_VERSION file before looking at anything
else in the data directory.  This fixes confusing error report when
trying to start current sources in a pre-7.1 data directory.
Per trouble report from Rich Shepard 10/18/01.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Sat Sep 29 04:02:22 2001 UTC (23 years, 11 months ago) by tgl
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +27 -16 lines
Implement new 'lightweight lock manager' that's intermediate between
existing lock manager and spinlocks: it understands exclusive vs shared
lock but has few other fancy features.  Replace most uses of spinlocks
with lightweight locks.  All remaining uses of spinlocks have very short
lock hold times (a few dozen instructions), so tweak spinlock backoff
code to work efficiently given this assumption.  All per my proposal on
pghackers 26-Sep-01.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Sep 27 16:29:12 2001 UTC (23 years, 11 months ago) by tgl
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +1 -2 lines
Remove useless LockDisable() function and associated overhead, per my
proposal of 26-Aug.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Sat Aug 25 00:31:17 2001 UTC (24 years ago) by petere
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +7 -3 lines
Hide backend debug output in initdb by default.  To that end, the bootstrap
backend gets on -o option like the regular backend.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Fri Aug 10 18:57:33 2001 UTC (24 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +5 -4 lines
Make OIDs optional, per discussions in pghackers.  WITH OIDS is still the
default, but OIDS are removed from many system catalogs that don't need them.
Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
pg_description has a three-column key instead of one.

Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
has some usefulness; pg_dump dumps comments on indexes, rules, and
triggers in a valid order.

initdb forced.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Sat Aug 4 00:14:43 2001 UTC (24 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +4 -2 lines
Fix handling of SIGCHLD, per recent pghackers discussion: on some
platforms system(2) gets confused unless the signal handler is set to
SIG_DFL, not SIG_IGN.  pgstats.c now uses pqsignal() as it should,
not signal().  Also, arrange for the stats collector process to show
a reasonable ID in 'ps', rather than looking like a postmaster.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Mon Jul 16 05:06:57 2001 UTC (24 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +4 -3 lines
Partial indexes work again, courtesy of Martijn van Oosterhout.
Note: I didn't force an initdb, figuring that one today was enough.
However, there is a new function in pg_proc.h, and pg_dump won't be
able to dump partial indexes until you add that function.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Sun Jul 15 22:48:16 2001 UTC (24 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +2 -2 lines
Restructure index AM interface for index building and index tuple deletion,
per previous discussion on pghackers.  Most of the duplicate code in
different AMs' ambuild routines has been moved out to a common routine
in index.c; this means that all index types now do the right things about
inserting recently-dead tuples, etc.  (I also removed support for EXTEND
INDEX in the ambuild routines, since that's about to go away anyway, and
it cluttered the code a lot.)  The retail indextuple deletion routines have
been replaced by a "bulk delete" routine in which the indexscan is inside
the access method.  I haven't pushed this change as far as it should go yet,
but it should allow considerable simplification of the internal bookkeeping
for deletions.  Also, add flag columns to pg_am to eliminate various
hardcoded tests on AM OIDs, and remove unused pg_am columns.

Fix rtree and gist index types to not attempt to store NULLs; before this,
gist usually crashed, while rtree managed not to crash but computed wacko
bounding boxes for NULL entries (which might have had something to do with
the performance problems we've heard about occasionally).

Add AtEOXact routines to hash, rtree, and gist, all of which have static
state that needs to be reset after an error.  We discovered this need long
ago for btree, but missed the other guys.

Oh, one more thing: concurrent VACUUM is now the default.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Mon Jun 25 23:03:03 2001 UTC (24 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -3 lines
Fix a couple remaining places where GUC variables were assigned to
directly, rather than through SetConfigOption().

Revision 1.109: download - view: text, markup, annotated - select for diffs
Tue Jun 12 22:54:05 2001 UTC (24 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +2 -2 lines
Extend GUC concepts of parse_hook and assign_hook to all four supported
datatypes, not only strings.  parse_hook is useless for bool, I suppose,
but it seems possibly useful for int and double to apply variable-specific
constraints that are more complex than simple range limits.  assign_hook
is definitely useful for all datatypes --- we need it right now for bool
to support date cache reset when changing Australian timezone rule setting.
Also, clean up some residual problems with the reset all/show all patch,
including memory leaks and mistaken reset of PostPortNumber.  It seems
best that RESET ALL not touch variables that don't have SUSET or
USERSET context.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Sun Jun 3 14:53:56 2001 UTC (24 years, 3 months ago) by petere
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +13 -10 lines
Mark many strings in backend not covered by elog for translation.  Also,
make strings in xlog.c look more like English and less like binary noise.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat May 12 01:48:49 2001 UTC (24 years, 4 months ago) by petere
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +43 -78 lines
Make bootstrap debug messages more readable.  Clean up some clutter.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Thu Mar 22 06:16:10 2001 UTC (24 years, 5 months ago) by momjian
Branches: MAIN
CVS tags: REL7_1_STABLE, REL7_1_2, REL7_1
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +30 -29 lines
Remove dashes in comments that don't need them, rewrap with pgindent.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Tue Mar 13 01:17:05 2001 UTC (24 years, 6 months ago) by tgl
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +50 -22 lines
XLOG (and related) changes:

* Store two past checkpoint locations, not just one, in pg_control.
  On startup, we fall back to the older checkpoint if the newer one
  is unreadable.  Also, a physical copy of the newest checkpoint record
  is kept in pg_control for possible use in disaster recovery (ie,
  complete loss of pg_xlog).  Also add a version number for pg_control
  itself.  Remove archdir from pg_control; it ought to be a GUC
  parameter, not a special case (not that it's implemented yet anyway).

* Suppress successive checkpoint records when nothing has been entered
  in the WAL log since the last one.  This is not so much to avoid I/O
  as to make it actually useful to keep track of the last two
  checkpoints.  If the things are right next to each other then there's
  not a lot of redundancy gained...

* Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs
  on alternate bytes.  Polynomial borrowed from ECMA DLT1 standard.

* Fix XLOG record length handling so that it will work at BLCKSZ = 32k.

* Change XID allocation to work more like OID allocation.  (This is of
  dubious necessity, but I think it's a good idea anyway.)

* Fix a number of minor bugs, such as off-by-one logic for XLOG file
  wraparound at the 4 gig mark.

* Add documentation and clean up some coding infelicities; move file
  format declarations out to include files where planned contrib
  utilities can get at them.

* Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or
  every CHECKPOINT_TIMEOUT seconds, whichever comes first.  It is also
  possible to force a checkpoint by sending SIGUSR1 to the postmaster
  (undocumented feature...)

* Defend against kill -9 postmaster by storing shmem block's key and ID
  in postmaster.pid lockfile, and checking at startup to ensure that no
  processes are still connected to old shmem block (if it still exists).

* Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency
  stop, for symmetry with postmaster and xlog utilities.  Clean up signal
  handling in bootstrap.c so that xlog utilities launched by postmaster
  will react to signals better.

* Standalone bootstrap now grabs lockfile in target directory, as added
  insurance against running it in parallel with live postmaster.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Wed Jan 24 19:42:51 2001 UTC (24 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -2 lines
Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Sun Jan 14 05:08:15 2001 UTC (24 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +5 -6 lines
Restructure backend SIGINT/SIGTERM handling so that 'die' interrupts
are treated more like 'cancel' interrupts: the signal handler sets a
flag that is examined at well-defined spots, rather than trying to cope
with an interrupt that might happen anywhere.  See pghackers discussion
of 1/12/01.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Thu Dec 28 13:00:12 2000 UTC (24 years, 8 months ago) by vadim
Branches: MAIN
CVS tags: REL7_1_BETA3, REL7_1_BETA2
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +4 -1 lines
New WAL version - CRC and data blocks backup.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Sat Nov 25 20:33:51 2000 UTC (24 years, 9 months ago) by tgl
Branches: MAIN
CVS tags: REL7_1_BETA
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -3 lines
Store current LC_COLLATE and LC_CTYPE settings in pg_control during initdb;
re-adopt these settings at every postmaster or standalone-backend startup.
This should fix problems with indexes becoming corrupt due to failure to
provide consistent locale environment for postmaster at all times.  Also,
refuse to start up a non-locale-enabled compilation in a database originally
initdb'd with a non-C locale.  Suppress LIKE index optimization if locale
is not "C" or "POSIX" (are there any other locales where it's safe?).
Issue NOTICE during initdb if selected locale disables LIKE optimization.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Tue Nov 21 21:15:59 2000 UTC (24 years, 9 months ago) by petere
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -12 lines
Put external declarations into header files.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Nov 21 09:39:57 2000 UTC (24 years, 9 months ago) by vadim
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +27 -26 lines
Fix OID bootstraping.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu Nov 9 11:25:58 2000 UTC (24 years, 10 months ago) by vadim
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +27 -26 lines
Auto checkpoint creation.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Wed Nov 8 22:09:56 2000 UTC (24 years, 10 months ago) by tgl
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +2 -2 lines
Make DROP TABLE rollback-able: postpone physical file delete until commit.
(WAL logging for this is not done yet, however.)  Clean up a number of really
crufty things that are no longer needed now that DROP behaves nicely.  Make
temp table mapper do the right things when drop or rename affecting a temp
table is rolled back.  Also, remove "relation modified while in use" error
check, in favor of locking tables at first reference and holding that lock
throughout the statement.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sat Nov 4 12:43:23 2000 UTC (24 years, 10 months ago) by petere
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +18 -11 lines
Make the backend grok relative paths for the data directory by converting
it to an absolute path.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Tue Oct 24 09:56:09 2000 UTC (24 years, 10 months ago) by vadim
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +5 -1 lines
WAL misc

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sat Oct 21 15:43:24 2000 UTC (24 years, 10 months ago) by vadim
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +3 -1 lines
WAL

Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Sep 6 14:15:14 2000 UTC (25 years ago) by petere
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +2 -2 lines
Code cleanup of user name and user id handling in the backend. The current
user is now defined in terms of the user id, the user name is only computed
upon request (for display purposes). This is kind of the opposite of the
previous state, which would maintain the user name and compute the user id
for permission checks.

Besides perhaps saving a few cycles (integer vs string), this now creates a
single point of attack for changing the user id during a connection, for
purposes of "setuid" functions, etc.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Thu Aug 3 19:19:06 2000 UTC (25 years, 1 month ago) by tgl
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +1 -6 lines
Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.
These two routines will now ALWAYS elog() on failure, whether you ask for
a lock or not.  If you really want to get a NULL return on failure, call
the new routines heap_open_nofail()/heap_openr_nofail().  By my count there
are only about three places that actually want that behavior.  There were
rather more than three places that were missing the check they needed to
make under the old convention :-(.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Fri Jul 14 22:17:38 2000 UTC (25 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +14 -53 lines
Cleanup of code for creating index entries.  Functional indexes with
pass-by-ref data types --- eg, an index on lower(textfield) --- no longer
leak memory during index creation or update.  Clean up a lot of redundant
code ... did you know that copy, vacuum, truncate, reindex, extend index,
and bootstrap each basically duplicated the main executor's logic for
extracting information about an index and preparing index entries?
Functional indexes should be a little faster now too, due to removal
of repeated function lookups.
CREATE INDEX 'opt_type' clause is deimplemented by these changes,
but I haven't removed it from the parser yet (need to merge with
Thomas' latest change set first).

Revision 1.90: download - view: text, markup, annotated - select for diffs
Mon Jul 3 23:09:23 2000 UTC (25 years, 2 months ago) by wieck
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +2 -2 lines
TOAST

    WARNING: This is actually broken - we have self-deadlocks
	         due to concurrent changes in buffer management.
			 Vadim and me are working on it.

Jan

Revision 1.89: download - view: text, markup, annotated - select for diffs
Mon Jul 3 20:48:27 2000 UTC (25 years, 2 months ago) by petere
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -5 lines
Move global internal files to PGDATA/global.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Wed Jun 28 03:31:09 2000 UTC (25 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +27 -13 lines
First phase of memory management rewrite (see backend/utils/mmgr/README
for details).  It doesn't really do that much yet, since there are no
short-term memory contexts in the executor, but the infrastructure is
in place and long-term contexts are handled reasonably.  A few long-
standing bugs have been fixed, such as 'VACUUM; anything' in a single
query string crashing.  Also, out-of-memory is now considered a
recoverable ERROR, not FATAL.
Eliminate a large amount of crufty, now-dead code in and around
memory management.
Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and
backend startup.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Thu Jun 22 22:31:17 2000 UTC (25 years, 2 months ago) by petere
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +8 -4 lines
Second pass over run-time configuration system. Adjust priorities on some
option settings. Sort out SIGHUP vs BACKEND -- there is no total ordering
here, so make explicit checks. Add comments explaining all of this.
Removed permissions check on SHOW command.

Add examine_subclass to the game, rename to SQL_inheritance to fit the
official data model better. Adjust documentation.

Standalone backend needs to reset all options before it starts. To
facilitate that, have IsUnderPostmaster be set by the postmaster itself,
don't wait for the magic -p switch.

Also make sure that all environment variables and argv's survive
init_ps_display(). Use strdup where necessary.

Have initdb make configuration files (postgresql.conf, pg_hba.conf) mode
0600 -- having configuration files is no fun if you can't edit them.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Sat Jun 17 23:41:27 2000 UTC (25 years, 2 months ago) by tgl
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +11 -25 lines
Get rid of IndexIsUniqueNoCache() kluge by the simple expedient of
passing the index-is-unique flag to index build routines (duh! ...
why wasn't it done this way to begin with?).  Aside from eliminating
an eyesore, this should save a few milliseconds in btree index creation
because a full scan of pg_index is not needed any more.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Mon Jun 5 07:28:40 2000 UTC (25 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +3 -3 lines
Latest round of fmgr updates.  All functions with bool,char, or int2
inputs have been converted to newstyle.  This should go a long way towards
fixing our portability problems with platforms where char and short
parameters are passed differently from int-width parameters.  Still
more to do for the Alpha port however.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Wed May 31 00:28:14 2000 UTC (25 years, 3 months ago) by petere
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +2 -2 lines
The heralded `Grand Unified Configuration scheme' (GUC)

That means you can now set your options in either or all of $PGDATA/configuration,
some postmaster option (--enable-fsync=off), or set a SET command. The list of
options is in backend/utils/misc/guc.c, documentation will be written post haste.

pg_options is gone, so is that pq_geqo config file. Also removed were backend -K,
-Q, and -T options (no longer applicable, although -d0 does the same as -Q).

Added to configure an --enable-syslog option.

changed all callers from TPRINTF to elog(DEBUG)

Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue May 30 04:24:35 2000 UTC (25 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +20 -15 lines
Third round of fmgr updates: eliminate calls using fmgr() and
fmgr_faddr() in favor of new-style calls.  Lots of cleanup of
sloppy casts to use XXXGetDatum and DatumGetXXX ...

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun May 28 17:55:53 2000 UTC (25 years, 3 months ago) by tgl
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +2 -1 lines
First round of changes for new fmgr interface.  fmgr itself and the
key call sites are changed, but most called functions are still oldstyle.
An exception is that the PL managers are updated (so, for example, NULL
handling now behaves as expected in plperl and plpgsql functions).
NOTE initdb is forced due to added column in pg_proc.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Wed Apr 12 17:14:54 2000 UTC (25 years, 5 months ago) by momjian
Branches: MAIN
CVS tags: REL7_0_PATCHES, REL7_0
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +16 -16 lines
Ye-old pgindent run.  Same 4-space tabs.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Fri Feb 18 09:28:39 2000 UTC (25 years, 6 months ago) by inoue
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +2 -1 lines
Implement reindex command

Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Jan 26 05:56:07 2000 UTC (25 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +3 -2 lines
Add:

  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sat Jan 15 22:43:20 2000 UTC (25 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +4 -5 lines
Fix a passel of problems with incorrect calls to typinput and typoutput
functions, which would lead to trouble with datatypes that paid attention
to the typelem or typmod parameters to these functions.  In particular,
incorrect code in pg_aggregate.c explains the platform-specific failures
that have been reported in NUMERIC avg().

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat Jan 15 02:59:27 2000 UTC (25 years, 8 months ago) by petere
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -2 lines
Fixed all elog related warnings, as well as a few others.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Jan 11 04:00:30 2000 UTC (25 years, 8 months ago) by tgl
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +23 -20 lines
Correct hardwired type information in bootstrap.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Mon Jan 10 16:13:11 2000 UTC (25 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -3 lines
Rename oid8 -> oidvector and int28 -> int2vector.  Cleanup of *out functions.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Mon Dec 20 10:40:39 1999 UTC (25 years, 8 months ago) by wieck
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -1 lines
Required catalog changes for extended LONG attribute storage.

Jan

Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Dec 16 22:19:37 1999 UTC (25 years, 9 months ago) by wieck
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -2 lines
Some changes to prepare for LONG attributes.

Jan

Revision 1.72: download - view: text, markup, annotated - select for diffs
Wed Nov 24 00:58:48 1999 UTC (25 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +2 -2 lines
Rename heap_replace to heap_update.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Sun Nov 7 23:07:59 1999 UTC (25 years, 10 months ago) by momjian
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +7 -7 lines
New NameStr macro to convert Name to Str.  No need for var.data anymore.

Fewer calls to nameout.

Better use of RelationGetRelationName.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Mon Oct 25 03:07:43 1999 UTC (25 years, 10 months ago) by tgl
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +5 -3 lines
Standardize on MAXPGPATH as the size of a file pathname buffer,
eliminating some wildly inconsistent coding in various parts of the
system.  I set MAXPGPATH = 1024 in config.h.in.  If anyone is really
convinced that there ought to be a configure-time test to set the
value, go right ahead ... but I think it's a waste of time.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Oct 6 21:58:02 1999 UTC (25 years, 11 months ago) by vadim
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +58 -27 lines
XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
First step in cleaning up backend initialization code.
Fix for FATAL: now FATAL is ERROR + exit.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Mon Sep 27 20:26:58 1999 UTC (25 years, 11 months ago) by momjian
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +1 -2 lines
Massimo's SET FSYNC and SHOW PG_OPTIONS changes, without SET QUERY_LIMIT.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sat Sep 18 19:06:27 1999 UTC (25 years, 11 months ago) by tgl
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +18 -11 lines
Mega-commit to make heap_open/heap_openr/heap_close take an
additional argument specifying the kind of lock to acquire/release (or
'NoLock' to do no lock processing).  Ensure that all relations are locked
with some appropriate lock level before being examined --- this ensures
that relevant shared-inval messages have been processed and should prevent
problems caused by concurrent VACUUM.  Fix several bugs having to do with
mismatched increment/decrement of relation ref count and mismatched
heap_open/close (which amounts to the same thing).  A bogus ref count on
a relation doesn't matter much *unless* a SI Inval message happens to
arrive at the wrong time, which is probably why we got away with this
sloppiness for so long.  Repair missing grab of AccessExclusiveLock in
DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi.
Recommend 'make clean all' after pulling this update; I modified the
Relation struct layout slightly.
Will post further discussion to pghackers list shortly.

Revision 1.60.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 2 05:56:52 1999 UTC (26 years, 1 month ago) by scrappy
Branches: REL6_5_PATCHES
Diff to: previous 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60: +6 -54 lines

Another mass of them... just #include file changes and/or DOUBLEALIGN->MAXALIGN

Revision 1.66: download - view: text, markup, annotated - select for diffs
Mon Jul 19 02:27:04 1999 UTC (26 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +4 -5 lines
Re-add getopt.h check, remove NT-specific tests for it.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Jul 17 20:16:47 1999 UTC (26 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -7 lines
 Move some system includes into c.h, and remove duplicates.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Jul 16 04:58:35 1999 UTC (26 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +4 -2 lines
Final cleanup.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Jul 16 03:12:46 1999 UTC (26 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +2 -2 lines
Update #include cleanups

Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu Jul 15 22:38:55 1999 UTC (26 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +1 -43 lines
Remove unused #includes in *.c files.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Thu Jul 15 15:18:46 1999 UTC (26 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +1 -2 lines
Clean up #include in /include directory.  Add scripts for checking includes.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Tue May 25 16:07:56 1999 UTC (26 years, 3 months ago) by momjian
Branches: MAIN
CVS tags: REL6_5
Branch point for: REL6_5_PATCHES
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +5 -3 lines
pgindent run over code.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Mon May 10 00:44:52 1999 UTC (26 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +5 -5 lines
Change error messages to oids come out as %u and not %d.  Change has no
real affect now.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Apr 20 02:19:53 1999 UTC (26 years, 4 months ago) by tgl
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +1 -19 lines
Change elog(ERROR) to get back to main loop via a plain sigsetjmp,
instead of doing a kill(self, SIGQUIT) and expecting the signal handler
to do it.  Also, clean up inconsistent definitions of the sigjmp buffer
in the several files that already referenced it.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Thu Mar 25 03:49:25 1999 UTC (26 years, 5 months ago) by tgl
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +23 -3 lines
Clean up att_align calculations so that XXXALIGN macros
need not be bogus.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Wed Mar 17 22:52:45 1999 UTC (26 years, 6 months ago) by momjian
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +3 -3 lines
Add new postgres -O option to allow system table structure changes.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Feb 13 23:14:52 1999 UTC (26 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +2 -2 lines
Change my-function-name-- to my_function_name, and optimizer renames.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed Feb 3 21:15:46 1999 UTC (26 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -3 lines
Cleanup of source files where 'return' or 'var =' is alone on a line.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Jan 17 06:18:14 1999 UTC (26 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +4 -1 lines
Apply Win32 patch from Horak Daniel.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Nov 27 19:51:45 1998 UTC (26 years, 9 months ago) by vadim
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -4 lines
New HeapTuple structure/interface.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Sep 1 04:27:21 1998 UTC (27 years ago) by momjian
Branches: MAIN
CVS tags: REL6_4
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +4 -3 lines
OK, folks, here is the pgindent output.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Sep 1 03:21:36 1998 UTC (27 years ago) by momjian
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +22 -22 lines
Renaming cleanup, no pgindent yet.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Aug 24 19:04:02 1998 UTC (27 years ago) by momjian
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +10 -8 lines
Fix bootstrap so it properly defines alignment of attributes.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Wed Aug 19 02:01:26 1998 UTC (27 years ago) by momjian
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +26 -24 lines
heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan;
	descriptor; bootstrap can create multi-key indexes;
pg_procname index now is multi-key index; oidint2, oidint4, oidname
are gone (must be removed from regression tests); use System Cache
rather than sequential scan in many places; heap_modifytuple no
longer takes buffer parameter; remove unused buffer parameter in
a few other functions; oid8 is not index-able; remove some use of
single-character variable names; cleanup Buffer variables usage
and scan descriptor looping; cleaned up allocation and freeing of
tuples; 18k lines of diff;

Revision 1.47: download - view: text, markup, annotated - select for diffs
Mon Jul 27 19:37:43 1998 UTC (27 years, 1 month ago) by vadim
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +5 -10 lines
Use Snapshot in heap access methods.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Jul 26 04:30:19 1998 UTC (27 years, 1 month ago) by scrappy
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2 lines

From: t-ishii@sra.co.jp

As Bruce mentioned, this is due to the conflict among changes we made.
Included patches should fix the problem(I changed all MB to
MULTIBYTE). Please let me know if you have further problem.

P.S. I did not include pathces to configure and gram.c to save the
file size(configure.in and gram.y modified).

Revision 1.45: download - view: text, markup, annotated - select for diffs
Fri Jul 24 03:31:08 1998 UTC (27 years, 1 month ago) by scrappy
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +6 -1 lines

I really hope that I haven't missed anything in this one...

From: t-ishii@sra.co.jp

Attached are patches to enhance the multi-byte support.  (patches are
against 7/18 snapshot)

* determine encoding at initdb/createdb rather than compile time

Now initdb/createdb has an option to specify the encoding. Also, I
modified the syntax of CREATE DATABASE to accept encoding option. See
README.mb for more details.

For this purpose I have added new column "encoding" to pg_database.
Also pg_attribute and pg_class are changed to catch up the
modification to pg_database.  Actually I haved added pg_database_mb.h,
pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is
enabled. The reason having separate files is I couldn't find a way to
use ifdef or whatever in those files. I have to admit it looks
ugly. No way.

* support for PGCLIENTENCODING when issuing COPY command

commands/copy.c modified.

* support for SQL92 syntax "SET NAMES"

See gram.y.

* support for LATIN2-5
* add UNICODE regression test case
* new test suite for MB

New directory test/mb added.

* clean up source files

Basic idea is to have MB's own subdirectory for easier maintenance.
These are include/mb and backend/utils/mb.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Jun 27 04:53:29 1998 UTC (27 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +7 -7 lines
Fix for hang after postmaster restart.  Add new proc_exit and
shmem_exit to replace exitpg().

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Jun 15 19:28:04 1998 UTC (27 years, 3 months ago) by momjian
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +1 -33 lines
Remove un-needed braces around single statements.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri May 29 17:00:05 1998 UTC (27 years, 3 months ago) by momjian
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -2 lines
Remove fork()/exec() and only do fork().  Small cleanups.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue May 19 18:05:44 1998 UTC (27 years, 3 months ago) by momjian
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +7 -7 lines
Allow cancel from client of backend query.  Change some int variables
to bool's.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Apr 26 04:06:04 1998 UTC (27 years, 4 months ago) by momjian
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +46 -64 lines
Re-apply Darren's char2-16 removal code.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Apr 7 18:10:21 1998 UTC (27 years, 5 months ago) by momjian
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +64 -46 lines
Back out char2-char16 removal.  Add later.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Mar 30 17:22:49 1998 UTC (27 years, 5 months ago) by momjian
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +46 -64 lines
The following uuencoded, gzip'd file will ...

1. Remove the char2, char4, char8 and char16 types from postgresql
2. Change references of char16 to name in the regression tests.
3. Rename the char16.sql regression test to name.sql.  4. Modify
the regression test scripts and outputs to match up.

Might require new regression.{SYSTEM} files...

Darren King

Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Feb 26 04:30:22 1998 UTC (27 years, 6 months ago) by momjian
Branches: MAIN
CVS tags: release-6-3
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +11 -9 lines
pgindent run before 6.3 release, with Thomas' requested changes.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Wed Feb 11 19:09:34 1998 UTC (27 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
Goodbye register keyword.  Compiler knows better.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Feb 7 06:10:34 1998 UTC (27 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -1 lines
atttypmod now -1.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Feb 6 19:18:06 1998 UTC (27 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -15 lines
Set attcacheoff value to -1 for all tables.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Jan 25 05:12:47 1998 UTC (27 years, 7 months ago) by momjian
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
getpid/pid cleanup

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Jan 7 21:02:30 1998 UTC (27 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +5 -5 lines
Goodbye ABORT.  Hello ERROR for all errors.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Jan 5 03:30:18 1998 UTC (27 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +5 -5 lines
Change elog(WARN) to elog(ERROR) and elog(ABORT).

Revision 1.30: download - view: text, markup, annotated - select for diffs
Thu Jan 1 05:40:28 1998 UTC (27 years, 8 months ago) by thomas
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +10 -4 lines
Bracket #define sigsetjmp() to avoid redefinition.  Linux starts out with
 sigsetjmp as a macro, so gives compiler warning without bracketing.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Nov 24 05:08:01 1997 UTC (27 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +1 -2 lines
Remove tqual.h includes not needed.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Nov 20 23:20:33 1997 UTC (27 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +5 -5 lines
Remove all time travel stuff.  Small parser cleanup.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Nov 17 16:58:55 1997 UTC (27 years, 9 months ago) by momjian
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
Remove 16 char limit on system table/index names.  Rename system indexes.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Sep 18 20:20:04 1997 UTC (27 years, 11 months ago) by momjian
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -2 lines
Inline memset() as MemSet().

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Sep 8 21:42:01 1997 UTC (28 years ago) by momjian
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +7 -7 lines
Used modified version of indent that understands over 100 typedefs.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Sep 8 20:54:40 1997 UTC (28 years ago) by momjian
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
Add typdefs to pgindent run.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Sep 8 02:21:29 1997 UTC (28 years ago) by momjian
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +113 -114 lines
Another PGINDENT run that changes variable indenting and case label indenting.  Also static variable indenting.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Sep 7 04:39:49 1997 UTC (28 years ago) by momjian
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +895 -794 lines
Massive commit to run PGINDENT on all *.c and *.h files.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Aug 19 21:30:24 1997 UTC (28 years ago) by momjian
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +16 -9 lines
Make functions static where possible, enclose unused functions in #ifdef NOT_USED.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Mon Aug 18 20:51:44 1997 UTC (28 years ago) by momjian
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +6 -8 lines
Now that names are null terminated, no need to do all that NAMEDATALEN stuff.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Aug 12 22:52:04 1997 UTC (28 years, 1 month ago) by momjian
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -2 lines
Remove more (void) and fix -Wall warnings.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Jun 25 21:12:19 1997 UTC (28 years, 2 months ago) by momjian
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -4 lines
fix for initdb --debug core dump, from Tatsuo Ishii

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Mar 14 23:18:32 1997 UTC (28 years, 6 months ago) by scrappy
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -2 lines
Date/Time updates from Thomas...

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Mar 12 20:57:33 1997 UTC (28 years, 6 months ago) by scrappy
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] linux/alpha patches

These patches lay the groundwork for a Linux/Alpha port.  The port doesn't
actually work unless you tweak the linker to put all the pointers in the
first 32 bits of the address space, but it's at least a start.  It
implements the test-and-set instruction in Alpha assembly, and also fixes
a lot of pointer-to-integer conversions, which is probably good anyway.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Jan 24 22:42:30 1997 UTC (28 years, 7 months ago) by scrappy
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
Change NEED_SIG_JMP to HAVE_SIGSETJMP in preparation for configure

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Jan 14 08:04:42 1997 UTC (28 years, 8 months ago) by bryanh
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -2 lines
Eliminate dupliclate definition of external variables reldesc and DataDir.
Some compilers recognize this error.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Dec 26 22:06:59 1996 UTC (28 years, 8 months ago) by momjian
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -5 lines
pq/signal() portability patch.  Also psql copy prompt fix.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Nov 22 04:32:41 1996 UTC (28 years, 9 months ago) by bryanh
Branches: MAIN
CVS tags: REL2_0B, REL2_0
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -1 lines
Fix bug: -D options implies -d option.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Nov 14 10:23:34 1996 UTC (28 years, 10 months ago) by bryanh
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +412 -398 lines
Remove most compile-time options, add a few runtime options to make up for it.
In particular, no more compiled-in default for PGDATA or LIBDIR.  Commands
that need them need either invocation options or environment variables.
PGPORT default is hardcoded as 5432, but overrideable with options or
environment variables.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Nov 10 01:37:48 1996 UTC (28 years, 10 months ago) by bryanh
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -1 lines
Add #include <unistd.h> to quiet compiler warning about missing getopt() declaratoin.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Oct 23 07:39:42 1996 UTC (28 years, 10 months ago) by scrappy
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +11 -8 lines
Major code cleanups from D'arcy (-Wall -Werror)

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Oct 21 08:31:23 1996 UTC (28 years, 10 months ago) by scrappy
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +76 -20 lines
-Wall'd

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Oct 18 05:47:12 1996 UTC (28 years, 10 months ago) by scrappy
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +10 -29 lines
Added a #define NEED_SIG_JMP to config.h

Removed #ifdef's for OPENLINK_PATCH.  We enable it by default, and nobody
*has* to enable the functionality, but no reason to retain the "old code"

Revision 1.4.2.2: download - view: text, markup, annotated - select for diffs
Mon Aug 19 18:04:44 1996 UTC (29 years ago) by scrappy
Branches: Release_1_0_3
Diff to: previous 1.4.2.1: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.2.1: +2 -6 lines
The err() bug creeped back in again...

Pointed out by:  brianc@saintjoe.edu

Revision 1.4.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 17 07:50:21 1996 UTC (29 years, 1 month ago) by scrappy
Branches: Release_1_0_3
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -2 lines
fixed err() -> err_out() pointed out by David Bennett...

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Aug 17 06:41:10 1996 UTC (29 years, 1 month ago) by scrappy
Branches: MAIN
CVS tags: Release_2_0_0
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
changed missed err() change to err_out()

Found/submittd by David Bennett

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Aug 13 01:28:28 1996 UTC (29 years, 1 month ago) by scrappy
Branches: MAIN
CVS tags: Release_2_0
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -6 lines
Fixes:

There is a support routine in the standard 4.4BSD C library
called "err()".  There is also a utility routine in
.../src/backend/bootstrap/bootstrap.c
with the same name.

Here's a patch that renames the pg95 routine to something a little
more sane.  As a bonus, one more bit of system-specific code leaves
the system...

Submitted by: "Kurt J. Lidl" <lidl@va.pubnix.com>

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jul 23 02:23:05 1996 UTC (29 years, 1 month ago) by scrappy
Branches: MAIN
CVS tags: Release_1_0_2
Branch point for: Release_1_0_3
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +11 -10 lines
Finished merging in src/backend from Dr. George's source tree

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Jul 16 07:12:27 1996 UTC (29 years, 2 months ago) by scrappy
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -2 lines
fix: BSDi 2.1 requires a port seperate from BSDi 2.0{.1}

submitted by: Bruce Momjian (root@candle.pha.pa.us)

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Jul 15 19:21:59 1996 UTC (29 years, 2 months ago) by scrappy
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +22 -2 lines
fsync patch from openlink

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue Jul 9 06:21:14 1996 UTC (29 years, 2 months ago) by scrappy
Branches: PG95_DIST
CVS tags: PG95-1_01
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
Postgres95 1.01 Distribution - Virgin Sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jul 9 06:21:14 1996 UTC (29 years, 2 months ago) by scrappy
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

PostgreSQL CVSweb <webmaster@postgresql.org>