Commit Graph

1360 Commits

Author SHA1 Message Date
Hannu Krosing 4c5fad2070 simple support for creating deb file 2011-01-27 00:32:52 +02:00
Greg Smith 0dd31b09dd Additional notes on 32 vs. 64 build issues 2011-01-22 09:59:43 -05:00
Greg Smith 943dda0ad0 Document potential build issues on RPM 2011-01-22 09:09:37 -05:00
Greg Smith d4de19bc78 Doc warning: need server restart after config change 2011-01-17 15:38:44 -05:00
trbs 1999b534fd added note about postgresql-server-dev-9.0 and use libxslt-dev instead of version specific package name 2011-01-11 18:24:17 +01: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
trbs 4a0e827464 fix line 2011-01-07 01:32:31 +01:00
trbs 745392e3a2 added readme.html to gitignore 2011-01-06 23:46:21 +01:00
Jaime Casanova 170f519d84 Fixing a message, shouldn't show progname in the middle of a line.
Is one message not two.
2010-12-29 00:45:33 -05:00
trbs cf5717ad59 Updated README with Debian/Ubuntu install information 2010-12-23 15:02:23 +01:00
trbs cb1192b912 fix strformat order reversal in error message 2010-12-23 15:02:02 +01:00
Dan Farina 156714f3f1 Fix quoting misbehavior
Move the single quote in the formatting string to the end of the line.

Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-23 01:04:05 -08:00
Dan Farina dd5ac660bf Comments and cleanup
Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-23 00:55:39 -08:00
Dan Farina 3a430397dc Avoid overwriting the new password-in-recovery.conf formatting
Previously: did that work, then threw it away/overwrote it.

Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-23 00:55:39 -08:00
Dan Farina 1f098c60ac Remove dead-ish code
This is a leftover after having fixed various problems in the verbose
output here.

Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-23 00:55:39 -08:00
Dan Farina 0bae682a0d Fix off-by-one in passing buffer size to xsnprintf
This would cause a consistent panic (exit() call) without reason.
This should not enable any overruns (but check my work).

Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-23 00:55:32 -08:00
Dan Farina f969dca821 Hack to get passwords in recovery.conf
Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-22 20:10:32 -08:00
Dan Farina 29c39c21f6 Avoid a use-after-free in verbose logging (again)
Previously, this print would use memory freed by PQClear previously.

Also allocate/free memory to prevent this tiny memory leak.

Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-22 20:10:15 -08:00
Dan Farina 620974ba04 Fix unsafe string handling
It looks like the old code would overflow in some cases.

Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-22 19:00:21 -08: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
Greg Smith b0e1428caa Add contribution information 2010-12-22 19:01:58 -05:00
Greg Smith 47349b01e0 Merge branch 'gabriele-2010-12' of https://github.com/gbartolini/repmgr into gbartolini-gabriele-2010-12 2010-12-22 18:43:14 -05:00
Greg Smith e5d886d651 Add CREDITS file 2010-12-22 18:42:24 -05:00
Greg Smith 91a304e3ee Add HISTORY file. Ignore build artifacts in git. 2010-12-22 18:34:29 -05:00
Dan Farina faddaed316 Avoid a use-after-free in verbose logging
Previously, this print would use memory freed by PQClear previously.

Signed-off-by: Dan Farina <drfarina@acm.org>
2010-12-22 15:03:05 -08: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 309bb92d95 Prevent a double-free
This can occur because prior to this, there is a code path that looks
like this:

    primaryConn = myLocalConn

CloseConnections will subsequently try to free both with PQFinish.
I'm not sure if this is the right fix -- it's more of hack -- without
more information about design intention.

One reasonable alternative would be to have CloseConnections perform
this check itself. As-is I am pretty sure that this fix leaves a
signal-race (when CloseConnections is called, without the check, in
the interrupt handler) unfixed.

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 6cea339697 Fix a use-after-free
A result is being cleared while there are still pointers that
refer to datums in it.

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 3f2094a242 Initialize connection pointers to NULL
This makes some bugs easier to find.

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 846c0b92e8 Install install/uninstall SQL also.
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 778303bb6e Split up install/uninstall actions more like a standard contrib
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 d88783a4d9 Changed pg_version() prototype in order to remove the small memory leak 2010-12-16 22:48:19 +01: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
Greg Smith 56c65acd99 Add force option to help and docs on help 2010-12-06 00:33:02 -05:00
Greg Smith 9c238f64c3 Update docs: requirements, walkthrough setup, copyediting v1.0.0 2010-12-05 21:09:48 -05:00
Greg Smith 046d3b6851 Correct log message formatting 2010-12-05 19:54:56 -05:00
Greg Smith 8d84d165ef Update README with Robert's walkthrough 2010-11-22 15:20:31 -05:00
Jaime Casanova 6c484409bb Added a --wal-keep-segments parameter which is the minimum value that the
PostgreSQL's GUC wal_keep_segments should have for "standby clone" to work
reliable. We default to 5000 but it could be changed for the user if it
knows what he is doing.
2010-11-19 08:36:15 -05:00
Jaime Casanova b4d6966283 After 30 minutes of retry we are supposed to exit, so do that... 2010-11-10 13:41:05 -05:00