Commit Graph

542 Commits

Author SHA1 Message Date
Bruce Momjian
7487a82667 More cleanups for compiler warnings. 1998-06-27 14:06:41 +00:00
Bruce Momjian
48a94aaf51 Rename proc_exit_clear to on_exit_reset. 1998-06-27 13:24:21 +00:00
Bruce Momjian
e747c58718 Fix for hang after postmaster restart. Add new proc_exit and
shmem_exit to replace exitpg().
1998-06-27 04:53:49 +00:00
Bruce Momjian
94cc3abe60 Cleanups. 1998-06-18 03:44:00 +00:00
Bruce Momjian
6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
Bruce Momjian
19a95d9742 Fix for exec() removal. 1998-06-09 17:36:28 +00:00
Bruce Momjian
a608637768 Another for for exec() removal and finding binaries. 1998-06-09 17:13:06 +00:00
Bruce Momjian
cb8539f9be Attached is a patch that fixes these leaks, and does a couple other
things as well:
  * Computes and saves a cancel key for each backend.  * fflush
  before forking, to eliminate double-buffering problems
    between postmaster and backends.

Other cleanups.

Tom Lane
1998-06-09 04:06:12 +00:00
Bruce Momjian
3912b75705 Fixed exec path problem. 1998-06-08 22:28:30 +00:00
Bruce Momjian
0957e08ac3 Show filename on exec failure. 1998-06-08 19:36:40 +00:00
Bruce Momjian
1572800b16 Fix typo. 1998-06-08 19:15:05 +00:00
Bruce Momjian
556e603b25 Add real random() call to postmaster for use in cancel. 1998-06-08 04:27:59 +00:00
Bruce Momjian
a576a60e3f Show backend status on ps command line. Remove unused args from
pg_exec_query().
1998-06-04 17:26:49 +00:00
Bruce Momjian
ff84c98a65 cleanup. 1998-05-29 17:10:07 +00:00
Bruce Momjian
212c905e2c Remove fork()/exec() and only do fork(). Small cleanups. 1998-05-29 17:00:34 +00:00
Bruce Momjian
3af1cc6755 postmaster/postgres options cleanup. 1998-05-27 18:32:05 +00:00
Bruce Momjian
9a0dd4fb18 There's a patch attached to fix gcc 2.8.x warnings, except for the
yyerror ones from bison. It also includes a few 'enhancements' to
the C programming style (which are, of course, personal).

The other patch removes the compilation of backend/lib/qsort.c, as
qsort() is a standard function in stdlib.h and can be used any
where else (and it is). It was only used in
backend/optimizer/geqo/geqo_pool.c, backend/optimizer/path/predmig.c,
and backend/storage/page/bufpage.c

> > Some or all of these changes might not be appropriate for v6.3,
since we > > are in beta testing and since they do not affect the
current functionality.  > > For those cases, how about submitting
patches based on the final v6.3 > > release?

There's more to come. Please review these patches. I ran the
regression tests and they only failed where this was expected
(random, geo, etc).

Cheers,

Jeroen
1998-03-30 16:47:35 +00:00
Bruce Momjian
a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
Marc G. Fournier
0227a4e114 From: "Denis V. Dmitrienko" <denis@null.net>
What it does:
It solves stupid problem with cyrillic charsets IP-based on-fly recoding.
take a look at /data/charset.conf for details.
You can use any tables for any charset.
Tables are from Russian Apache project.
Tables in this patch contains also Ukrainian characters.

Then run ./configure --enable-recode
1998-02-24 15:27:04 +00:00
Marc G. Fournier
93211b9170 From: Phil Thompson <phil@river-bank.demon.co.uk>
I haven't had final confirmation from Peter yet, but the attached patch
needs to be applied for the Beta otherwise password and crypt
authentication just won't work.

It puts back the loop in libpq and also fixes a couple of problems with
maintaining compatability with pre-6.3 drivers.
1998-01-31 20:14:15 +00:00
Bruce Momjian
b4564a98fa Deadlock ceallnup.
(void) change for aix and hp compilers.

protocol cleanup.
1998-01-27 15:35:30 +00:00
Bruce Momjian
7c3dc8f772 Protocol cleanup from Phil. 1998-01-27 03:11:46 +00:00
Marc G. Fournier
d5bbe2aca5 From: Phil Thompson <phil@river-bank.demon.co.uk>
I've completed the patch to fix the protocol and authentication issues I
was discussing a couple of weeks ago.  The particular changes are:

- the protocol has a version number
- network byte order is used throughout
- the pg_hba.conf file is used to specify what method is used to
  authenticate a frontend (either password, ident, trust, reject, krb4
  or krb5)
- support for multiplexed backends is removed
- appropriate changes to man pages
- the -a switch to many programs to specify an authentication service
  no longer has any effect
- the libpq.so version number has changed to 1.1

The new backend still supports the old protocol so old interfaces won't
break.
1998-01-26 01:42:53 +00:00
Bruce Momjian
c16ebb0f67 getpid/pid cleanup 1998-01-25 05:15:15 +00:00
Marc G. Fournier
5379b84eff More cleanups. I can now compile without PORTNAME being defined n
Makefile.global.

End result, if all goes well, should allow for much easier porting, since
there will no longer be a concept of a "port".  Most, if not everything,
*should* be determined by configure, or by the compiler itself.  Still
work to be done though :)
1997-12-19 02:09:10 +00:00
Bruce Momjian
0f1802f00c Fix for user password packet processing, from Goran Thyni. 1997-12-15 22:03:59 +00:00
Bruce Momjian
645cc13276 Remove PGDATA setting and use DataDir. 1997-12-11 17:03:52 +00:00
Marc G. Fournier
da72b903ff Major code cleanup following the pg_password insertion...
...malloc/free -> palloc/pfree
	...fopen/fclose -> AllocateFile/FreeFile
1997-12-09 03:11:25 +00:00
Marc G. Fournier
bec35da8bf Add error check on getenv("DATADIR")
Add code to set DATADIR in postmaster.c if -D is used
1997-12-07 20:57:45 +00:00
Marc G. Fournier
4c04f7724e From: todd brandys <brandys@eng3.hep.uiuc.edu>
An extension to the code to allow for a pg_password authentication database
that is *seperate* from the system password file
1997-12-04 00:28:15 +00:00
Marc G. Fournier
9bcf350cc7 Apply Bryan's IPC Patches
From: Bryan Henderson <bryanh@giraffe.netgate.net>
1997-11-17 03:47:31 +00:00
Bruce Momjian
baeb8790ac Fix case issues with quotes. 1997-11-10 05:10:50 +00:00
Bruce Momjian
c17fa36d3c Add Unix domain socket support, from Goran Thyni, goran@bildbasen.se 1997-11-07 20:52:15 +00:00
Bruce Momjian
f3af1368bd Rename strNcpy to StrNCpy, and change third parameter. 1997-10-25 01:10:58 +00:00
Bruce Momjian
3f365ba0fc Inline memset() as MemSet(). 1997-09-18 20:22:58 +00:00
Bruce Momjian
59f6a57e59 Used modified version of indent that understands over 100 typedefs. 1997-09-08 21:56:23 +00:00
Bruce Momjian
075cede748 Add typdefs to pgindent run. 1997-09-08 20:59:27 +00:00
Bruce Momjian
319dbfa736 Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
Bruce Momjian
1ccd423235 Massive commit to run PGINDENT on all *.c and *.h files. 1997-09-07 05:04:48 +00:00
Bruce Momjian
8d0e658d06 Small cleanup. 1997-08-25 04:15:40 +00:00
Bruce Momjian
1d8bbfd2e7 Make functions static where possible, enclose unused functions in #ifdef NOT_USED. 1997-08-19 21:40:56 +00:00
Bruce Momjian
ea5b5357cd Remove more (void) and fix -Wall warnings. 1997-08-12 22:55:25 +00:00
Bruce Momjian
edb58721b8 Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary. 1997-08-12 20:16:25 +00:00
Bruce Momjian
6ed1715b1f Cleanup for NAMEDATALEN use. 1997-08-03 02:38:47 +00:00
Marc G. Fournier
ecefacd07d Due to BIND 8.1.1, my Solaris 2.5.1 machine doesn't define MAXHOSTNAMELEN...
so, add a check that basically says if it isn't defined, set it to 256...
1997-07-30 14:08:11 +00:00
Marc G. Fournier
5089f6ce87 Check for and use <netdb.h> for postmaster.c, instead of checking if
MAXHOSTNAMELEN is defined.  For some reason, my 2.5.1 Solaris box at
work fails on that check...
1997-07-30 14:03:33 +00:00
Marc G. Fournier
ca746f512d -m <arg> -M weren't setup properly in getopts()...
These are undocumented in the man pages though...should they be removed?

Reported by: "A. Duursma" <it@portsite.nl>
1997-05-25 15:37:15 +00:00
Marc G. Fournier
79ee06c186 Fixes:
postgres backend processes end up as so called zombies. It seems that
only Linux a.out (libc.4.6.27) systems are affected.


By:

Wolfgang Roth <roth@statistik.uni-mannheim.de>
1997-04-24 20:27:46 +00:00
Marc G. Fournier
3a7c93e7f3 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] password authentication

This patch adds support for plaintext password authentication.  To use
it, you add a line like

host         all         0.0.0.0       0.0.0.0           password  pg_pwd.conf


to your pg_hba.conf, where 'pg_pwd.conf' is the name of a file containing
the usernames and password hashes in the format of the first two fields
of a Unix /etc/passwd file.  (Of course, you can use a specific database
name or IP instead.)

Then, to connect with a password through libpq, you use the PQconnectdb()
function, specifying the "password=" tag in the connect string and also
adding the tag "authtype=password".

I also added a command-line switch '-u' to psql that tells it to prompt
for a username and password and use password authentication.
1997-03-12 21:23:16 +00:00
Bruce Momjian
26eb44f202 Prevent SIGPIPE from crashing server, by Dan McGuirk. 1997-03-02 02:17:32 +00:00
Bruce Momjian
34f35a4c19 Delete -e option to postmaster, keep postgres -e option. 1997-02-19 01:31:30 +00:00
Bruce Momjian
a17b01f320 Update btree patches that were missed. 1997-02-18 17:14:25 +00:00
Bruce Momjian
31c8e94b34 Remove WIN32 defines. They never worked. 1997-02-14 04:19:07 +00:00
Marc G. Fournier
a5494a2d92 Various patches for nextstep by GregorHoffleit
Replaced NEED_STRDUP by !HAVE_STRDUP
1997-02-13 08:32:20 +00:00
Bruce Momjian
89868af425 Remove extra paren in ifdef. 1997-02-06 19:27:22 +00:00
Marc G. Fournier
a7257ff41f autoconf test for and set HAVE_VFORK 1997-02-06 06:15:49 +00:00
Marc G. Fournier
6ab9db7b78 Apply usage patches for European Dates patch from Keith 1997-01-27 22:37:52 +00:00
Marc G. Fournier
632c44d829 Bring in a patch from Keith Parks to move the use of European dates
from a #define to a run-time option '-e'

Man page was updated to reflect new option
1997-01-26 15:32:28 +00:00
Marc G. Fournier
f12c5f898c Another switch for configure: NEED_SYS_SELECT_H to HAVE_SYS_SELECT_H 1997-01-24 18:27:32 +00:00
Marc G. Fournier
3ffd5694dd Replace occurances of USE_{LIMITS,VALUES}_H with HAVE_* in preparation
for switch over to configure
1997-01-24 18:00:48 +00:00
Marc G. Fournier
c1392c57cf Another one that should be including limits.h vs machine/limits.h 1997-01-22 04:45:45 +00:00
Bryan Henderson
05b0f22900 Eliminate dupliclate definition of external variables reldesc and DataDir.
Some compilers recognize this error.
1997-01-14 08:05:36 +00:00
Bruce Momjian
e8f43854ac pq/signal() portability patch. Also psql copy prompt fix. 1996-12-26 22:08:34 +00:00
Bruce Momjian
0681513693 In file: .../src/backend/postmaster/postmaster.c I found 3 leaks and
probably a bug.
To find code added/modifyied, search "Fixed".

Gianluca Puggelli
1996-12-26 17:49:05 +00:00
Bruce Momjian
2e20099e32 Reduce printing from deub level 2 ande layout change. 1996-12-07 04:38:40 +00:00
Bryan Henderson
9c0afeabb7 More stuff to make it compile on various ports. 1996-11-27 08:16:44 +00:00
Bryan Henderson
d3f9d6ad4f Move include of signal.h inside pqsignal.h so it's always where it's needed. 1996-11-24 04:07:17 +00:00
Bryan Henderson
f64b840387 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.
1996-11-14 10:25:54 +00:00
Bryan Henderson
17befd6c69 Use new utils/version.c instead of backend/utils/init/magic.c. 1996-11-12 06:47:10 +00:00
Bruce Momjian
aaeef4d17d All external function definitions now have prototypes that are checked. 1996-11-10 03:06:38 +00:00
Bryan Henderson
bf5cbbf789 Quiet compiler warnings. 1996-11-10 02:27:15 +00:00
Bruce Momjian
4b2b8592a0 Compile and warning cleanup 1996-11-08 06:02:30 +00:00
Marc G. Fournier
daa93cf5c5 Clean up Makefile, make sure that postmaster.c compiles 1996-11-03 04:48:27 +00:00
Bryan Henderson
1dfe4eaeb1 Fix small syntax error. 1996-10-30 00:36:59 +00:00
Bryan Henderson
71c1d59d1a Remove another snprintf() for Solaris. 1996-10-29 21:51:13 +00:00
Bryan Henderson
63481f0b92 Use strncpy() and local buffers instead of snprintf(), since not everyone
has snprintf().
1996-10-28 09:05:29 +00:00
Marc G. Fournier
20b4c46e26 Fixes: Errors when PQexec() in backend creates temp
relations and transaction is aborted

Submitted by: wieck@sapserv.debis.de (Jan Wieck)
1996-10-24 07:55:54 +00:00
Bruce Momjian
baf9a6e24c Added include needed for recent addition.
I hope everyone has sys/socket.h.
1996-10-13 18:38:04 +00:00
Bruce Momjian
86be8677a9 Added consistent include file handling for MAXHOSTNAMELEN.
If I have introduced any syntax errors with this, I will patch them in
the morning, and Marc will have a good laugh.
1996-10-13 04:50:27 +00:00
Bryan Henderson
bef3c89a1c Fix prototypes so postmaster.c will compile. 1996-10-13 04:01:05 +00:00
Bryan Henderson
785234d6ca New host-based authentication -- send error message when authentication fails 1996-10-12 07:48:49 +00:00
Marc G. Fournier
3dc0c8e4e5 Fixed a missed change from Carsten Heyl <heyl@nads.de> 1996-10-07 07:18:34 +00:00
Marc G. Fournier
4feb696be7 Here the fix for the first assertion failure I had which killed
my postmaster 1.07.
It's really simple, the loop dealing with all sockets
can't handle more than one ready socket :-)
A simple logic error dealing with lists.
OR IS THERE ANY REASON FOR SETTING curr TO 0?

Submitted by:  Carsten Heyl <Heyl@nads.de>
1996-10-04 20:32:07 +00:00
Marc G. Fournier
f8009e1786 The remainder of D'Arcy's changes, most notibly the usage of SIGNAL_ARGS 1996-10-04 20:17:11 +00:00
Bruce Momjian
deaaecdf2e Prevents possible packet loss from SIGCHLD. 1996-09-26 03:17:44 +00:00
Marc G. Fournier
e3b41d40fa More code cleanups from "Kurt J. Lidl" <lidl@va.pubnix.com> 1996-09-16 05:40:31 +00:00
Marc G. Fournier
c028568217 first pass...move some of the "Port" dependencies to src/include/config.h 1996-08-27 06:55:28 +00:00
Marc G. Fournier
80d0c4ffd3 The following patch makes postmaster -D work. -D specifies a different PGDATA
directory.  The code that looks for the pg_hba file doesn't use it, though,
so the postmaster uses the wrong pg_hba file.  Also, when the postmaster
looks in one directory and the user thinks it is looking in another
directory, the error messages don't give enough information to solve the
problem.  I extended the error message for this.


Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-14 04:51:34 +00:00
Marc G. Fournier
bb0bdfd101 Fixes:
I've enclosed two patches.  The first affects Solaris compilability.  The
bug stems from netdb.h (where MAXHOSTNAMELEN is defined on a stock
system).  If the user has installed the header files from BIND 4.9.x,
there will be no definition of MAXHOSTNAMELEN.  The patch will, if all
else fails, try to include <arpa/nameser.h> and set MAXHOSTNAMELEN to
MAXDNAME, which is 256 (just like MAXHOSTNAMELEN on a stock system).

The second patch adds aliases for "ISNULL" to "IS NULL" and likewise for
"NOTNULL" to "IS NOT NULL".  I have not removed the postgres specific
ISNULL and NOTNULL.  I noticed this on the TODO list, and figured it would
be easy to remove.

The full semantics are:
        [ expression IS NULL ]
        [ expression IS NOT NULL ]

--Jason


Submitted by: Jason Wright <jason@oozoo.vnet.net>
1996-08-06 16:43:41 +00:00
Marc G. Fournier
7344d69898 Finished merging in src/backend from Dr. George's source tree 1996-07-23 02:23:54 +00:00
Marc G. Fournier
55aab6a434 fix: BSDi 2.1 requires a port seperate from BSDi 2.0{.1}
submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 07:13:58 +00:00
Marc G. Fournier
d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00