Commit Graph

22 Commits

Author SHA1 Message Date
Dan Farina
bfd3aed33b Fix a myriad of problems introduced by merging
Signed-off-by: Dan Farina <drfarina@acm.org>
2011-02-06 18:32:49 -08:00
Dan Farina
c356f9e97f Merge remote-tracking branch 'tbrs/master' into heroku
Grab the configuration struct changes. It was expeditious to un-do
some of my by-hand line-wrapping that avoids 80 character limit,
though.

Conflicts:
	config.c
	config.h
	repmgr.c
	repmgr.h
	repmgrd.c
2011-02-04 18:35:56 -08:00
Dan Farina
a52ebc412c Merge remote-tracking branch 'origin/master' into heroku
The Great Whitespace Reconciliation

Conflicts:
	check_dir.c
	config.c
	dbutils.c
	repmgr.c
	repmgr.h
	repmgrd.c

Signed-off-by: Dan Farina <drfarina@acm.org>
2011-02-04 18:27:28 -08:00
trbs
57169f51cf made rsync_options configurable 2011-01-08 01:46:39 +01:00
trbs
fc2405f17d use struct for config file information 2011-01-07 01:36:46 +01:00
Greg Smith
9843205a4f Reformat all source code using astyle
astyle --style=ansi --indent=tab
2010-12-22 19:07:01 -05:00
Greg Smith
1ddb78ddd8 Merge branch 'license' of https://github.com/gbartolini/repmgr into gbartolini-license 2010-12-22 19:02:50 -05:00
Dan Farina
7b0a142075 Merge remote branch 'gbartolini/gabriele-2010-12' into heroku
Conflicts:
	config.c
	dbutils.c
	dbutils.h
	repmgrd.c

Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-21 16:08:07 -08:00
Dan Farina
ec73a07e2f Make various buffers larger
MAXLEN definitely needed to be bigger to properly format fairly common
connection strings.  In addition, the reliance on xsnprintf helps
detect cases where even this buffer is not long enough.

the buffer in parse_config has been made bigger in a bit of sloppy
programming, but what really needs to happen is reporting when a line
cannot be properly parsed/is too big for the buffer.  That is just a
kludge.

Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
2010-12-21 15:19:28 -08:00
Dan Farina
fc13d50e37 Canonicalize whitespace
Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
2010-12-21 15:19:28 -08:00
Dan Farina
84b69b3bd4 Whitespace to adjust for longer snprintf identifier
This is done in a separate patch to try and reduce the sound and fury
of the patch that actually did the conversion from sprintf to
snprintf-alikes.

Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
2010-12-21 15:19:28 -08:00
Dan Farina
916c0492fb sprintf to snprintf conversion
Move out string operations to another file, and introduce a frontend
to snprintf for various situations.  This change is important for
catching and eliminating sprintf overflows, which are as of now many
times silently corrupting memory.

Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
2010-12-21 15:19:28 -08:00
Dan Farina
af2edf10a0 Attack of whitespace pedantry
pgsql conventions (tabs, four-spaces-wide, etc) applied all around.

Also tried to fix some very tiny capitalization errors, auto-fill
problems, and some inter-block vertical whitespacing issues.

Long strings in repmgr.c were left intact, though. They are rather
numerous and are less of a problem than tiny bits of function calls
and comments wrapping over a line; the latter kind of problem has been
mostly fixed.

Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
2010-12-21 15:19:28 -08:00
Gabriele Bartolini
f2bec9a08f Some cosmetic changes 2010-12-16 22:31:26 +01:00
Gabriele Bartolini
05e88a2cc8 removed strncmp improper usage, initialise values asap 2010-12-16 22:21:27 +01:00
Gabriele Bartolini
763a1e8b3d Reviewed the code, fixed a small bug with option name detection 2010-12-16 22:14:18 +01:00
Gabriele Bartolini
c687d0d670 Reviewed the code, fixed a small bug with option name detection 2010-12-16 22:13:30 +01:00
Gabriele Bartolini
9b7a078e0e Added license information in every source file 2010-12-16 21:50:15 +01:00
Jaime Casanova
3b8e8183cc Changes when trying to compile:
- Fix Makefile to include check_dir.c
- Add function mkdir_p that was taken from initdb.c
- Replace some strcpy for assignment to const char * to keep compiler quite
- Add STANDBY_NORMAL to initialize action
- fix typos and add headers needed to compile
2010-09-29 05:13:23 -05:00
Jaime Casanova
ae628d0527 Changes in repmgr are:
- Add checks to test if the directories are useful for us (basically
  the checks follow the same approach as initdb does)
- Add connection parameters
- Better use of rsync
- Some more clean up of code

Changes in repmgrd are:
- Add a parameter to allow the user specify an repmgr.conf
- Change the name of the repl_status table for repl_monitor
- Create a repl_status view that also shows lag in time
- Some more clean up of code
2010-09-28 17:28:56 -05:00
postgres
d728ef0eef Fix some typos and replace the variable Inrecovery with
the function RecoveryInProgress() in the function
sql_utils/repmgr_wrapper_funcs.c:last_xlog_replay_timestamp()
2010-09-14 03:05:28 -05:00
postgres
a12e719259 Initial commit 2010-06-17 10:43:35 -05:00