Charles Duffy
a67688f198
minor format string and comment fixes (add missing newlines, fix english usage, format string argument order)
2011-02-10 17:01:59 -05:00
Charles Duffy
f74b806e4f
repmgr: exit with nonzero status on obvious errors
2011-02-10 17:00:33 -05:00
Gabriele Bartolini
556f256bb6
Now standby clone command accepts configuration file - for logging purposes only
2011-02-10 16:08:07 -05:00
Gabriele Bartolini
83eee2ed96
added some messages to the clone command
2011-02-10 16:08:07 -05:00
Gabriele Bartolini
cb36aaddff
- Added \n
2011-02-10 16:08:07 -05:00
Gabriele Bartolini
3146d2c676
fixed some bugs with standby clone
2011-02-10 16:08:07 -05:00
Gabriele Bartolini
3f1c6a5852
Removed any sprintf/strcpy call and use snprintf/strncpy - Fixed bug with tblspc_dir - added debug messages after every query
2011-02-10 16:08:07 -05:00
Gabriele Bartolini
716a0ae9d3
removed any malloc operation, added t_runtime_options struct
2011-02-10 16:05:03 -05:00
Gabriele Bartolini
7a3be3a2f9
Cleaned log messages (\n at the end of every line)
2011-02-10 15:58:55 -05:00
Gabriele Bartolini
f6a6632169
Added new log system to both repmgr and repmgrd. Needs cleaning, but it is a good starting point
2011-02-10 15:58:55 -05:00
Gabriele Bartolini
2c1eafd7a9
first alpha version for syslog support
2011-02-10 15:56:10 -05:00
trbs
52313a2d6e
made rsync_options configurable
2011-02-10 15:06:09 -05:00
trbs
814863edf2
use struct for config file information
2011-02-10 15:06:09 -05:00
trbs
03ed0e692a
fix strformat order reversal in error message
2011-02-10 15:00:44 -05: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
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
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
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
Greg Smith
3172ad97cf
Add rsync remote user name option. Expand docs to
...
include command line help examples.
2010-11-08 15:29:53 -05:00
Jaime Casanova
58498389dc
Temporarily remove the check if promote actually works, because
...
when the database is taking too long to recover and start it thinks
the database is not online.
2010-10-28 18:47:56 -05:00
Jaime Casanova
a70a6d2912
Really fix STANDBY FOLLOW this time.
2010-10-24 19:20:25 -05:00
Jaime Casanova
f45aa077b1
Add message to remember we should REINDEX any hash indexes, i decided
...
not to do it myself because it could take a long time if the index is
big.
2010-10-23 20:44:05 -05:00
Jaime Casanova
91276394e8
Check STANDBY PROMOTE actually promote the node
2010-10-23 19:54:45 -05:00
Jaime Casanova
028aeb452d
Fix STANDBY FOLLOW to correctly recreate recovery.conf
2010-10-23 19:44:07 -05:00
Jaime Casanova
ed3038ef6b
Fix a few typos in my last commit
2010-10-23 15:51:08 -05:00
Jaime Casanova
219b4431b4
Replace the function is_supported_version() with the function pg_version()
...
the main difference is that this new function doesn't return a bool but
a string representing the current major version of the postgresql server
or an empty string if it's earlier than 9.0.
Teach all commands that could connect to master and standby that they
both should have the same major version.
2010-10-23 15:27:24 -05:00
Jaime Casanova
8409727f0c
A few more comments
2010-10-22 18:41:31 -05:00
Jaime Casanova
45fdbbb426
Another segmentation fault caused by an uninitialized string
2010-10-22 18:38:35 -05:00
Jaime Casanova
e3d1580d76
In repmgrd there was the same problem that cause the segfault
2010-10-21 17:58:38 -05:00
Jaime Casanova
7ddc80ea92
I was having a segmentation fault because i was using a pointer to char
...
but never indicated a size for the compiler to reserve... malloc()
solves my problem
2010-10-21 14:49:26 -05:00
Jaime Casanova
ff511f19b4
Remove the second --port parameter, we now use repmgr.conf for get
...
conninfo of the standby
2010-10-21 01:04:23 -05:00
Jaime Casanova
14ae59c6b2
Add a function that checks the parameters based on the action.
...
Refactor some actions and use repl_nodes to get connections to
master.
2010-10-21 00:48:04 -05:00
Jaime Casanova
cd287f923a
I failed to add the schema "repmgr_%s" in all places where the repl_*
...
tables are used.
2010-10-18 09:34:14 -05:00
Jaime Casanova
378bdd7bd4
Add MASTER REGISTER and STANDBY REGISTER commands.
2010-10-18 02:21:55 -05:00
Jaime Casanova
6779a96b0b
The short option for --force is now -F, because i will use the other
...
to indicate a config file. also for simetry with repmgrd
2010-10-13 14:54:09 -05:00
Jaime Casanova
7dce793882
Add a --force option to upgrade an existing PostgreSQL instalation.
...
This could be useful, for readding recently failed nodes.
2010-10-08 02:55:52 -05:00
Jaime Casanova
d42f3e25f4
Fix a typo in the last commit that show the right directory in error messages
2010-10-07 00:29:10 -05:00
Jaime Casanova
f5e95dd46a
Exclude pid files from standby clone
2010-10-06 01:04:30 -05:00
Jaime Casanova
172caf8968
When the directory for a tablespace cannot be created or exists
...
but is not empty, it was sending the message using dest_dir instead.
2010-10-05 21:20:20 -05:00
Jaime Casanova
5cd9e3957c
A few changes from repmgrd and improve the SQL of the repl_status
...
view in order to actually show something useful
2010-10-01 14:44:08 -05:00
Jaime Casanova
533a4e31a0
Copy tablespaces locations separately
2010-10-01 00:43:51 -05:00
Jaime Casanova
5617a75741
Create subdirectories $PGDATA/global and $PGDATA/pg_xlog
2010-09-30 21:17:19 -05:00
Jaime Casanova
8408e3a551
A few fixes product of Cedric Villemain's review
2010-09-30 19:43:13 -05:00
Jaime Casanova
dcc7c4492c
Move configuration files and global/pg_control separately from data_directory
2010-09-30 15:27:22 -05:00
Jaime Casanova
4660c4ea13
There was a segfault because of the strcpy (seems rather obvious now)
...
Reported by: Cedric Villemain
Fixed by me
2010-09-30 12:17:28 -05:00
Jaime Casanova
12916315eb
A few more bugs revealed in tests.
2010-09-29 06:45:22 -05: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