Ian Barwick
ee69730f8b
Error message correction
2014-12-24 15:36:03 +09:00
Ian Barwick
28fd9d5aeb
Spelling
2014-12-22 16:21:08 +09:00
Ian Barwick
24b2ee09b3
Add -S/--superuser option for witness database creation
...
Previously the witness database creation code was hard-coding the
username 'postgres' when accessing the previously initialised database.
However initdb was not passed any explicit username, meaning the
default database superuser name was the same as the user running
repmgr.
With this patch, a superuser user name (default: postgres) will
be passed to initdb.
Per report by eggyknap [1]
[1] https://github.com/2ndQuadrant/repmgr/issues/38
2014-12-22 16:01:58 +09:00
Ian Barwick
763881b1ed
Whitespace cleanup
2014-12-18 10:52:20 +09:00
Ian Barwick
94f520e1de
Fix variable name
2014-12-09 15:14:41 +09:00
Marco Nenciarini
f72bb2f093
Fix syntax errors in repmgr.c
2014-10-30 12:09:55 +01:00
Jaime Casanova
927667905e
Code review: Do not use psql on do_witness_create,
...
use createdb and createuser binaries instead
2014-10-29 19:25:14 -05:00
Jaime2ndQuadrant
684d66f48e
Merge pull request #27 from Nexperteam/witness-fixes
...
Witness fixes: create a db and user to avoid using postgres
This is so, we can create the appropiate user and database on the witness.
2014-10-29 19:05:38 -05:00
Jaime2ndQuadrant
406c325ccb
Merge pull request #23 from wamonite/fix_witness
...
fix: witness creation and monitoring.
On copy_configuration() we are using the res variable when is still used on the loop.
2014-10-29 18:44:53 -05:00
Martín Marqués
dc0dfe9b56
If the user doesn't pass the port on which the primary server is listening
...
we have to assume it's the DEFAULT_MASTER_PORT.
This was not done, so we added a check to see if it has a value that is
usable, else we use DEFAULT_MASTER_PORT.
2014-09-29 16:06:05 -03:00
Ian Barwick
0cbd5d3933
Fix log messages in do_standby_promote()
...
Initial connection is to current standby, before attempting to
connect to old master.
2014-07-07 11:30:29 +09:00
Ian Barwick
98c5215871
Change successful standby promotion message to log level 'NOTICE'
...
Was previously 'ERROR'.
2014-07-07 11:09:07 +09:00
Ian Barwick
e40b9db0a6
Properly specify rsync --exclude directories
...
Using '--exclude=dirname/*' to explicitly specify directories whose contents
should not be copied. This will result in empty directories being created
on the destination if they exist on the source, but that's not a problem as
they are needed anyway.
Previously the generated rsync command contained '--exclude=pg_log*', which
will break replication on 9.5 as the wildcard expansion prevents the
'pg_logical' directory from being copied.
2014-07-07 10:42:45 +09:00
Nathan Van Overloop
4f810aee2c
on init of witness server create db and user to avoid using postgres
2014-06-06 14:36:12 +02:00
Warren Moore
30045f3bec
keep naming consistent
2014-03-24 15:18:37 +00:00
Warren Moore
d93d42fadb
fix: witness creation and monitoring
...
While reading node entries from master use a separate PGresult when inserting into witness.
Witness monitoring supplies a null value for 'last_apply_time'.
2014-03-24 14:19:29 +00:00
József Kószó
2a6c835a5a
debian init script and config file documentation fixes
2014-03-21 14:18:07 +01:00
Christian Kruse
653e11c2a7
basic min_recovery_apply_delay support
2014-03-10 15:41:38 +01:00
Christian Kruse
98b1f8d28a
rather big refactoring: use a naming scheme
...
In the past naming of functions, variables and such didn't really have a
naming scheme. Now they should have.
2014-03-06 18:34:40 +01:00
Christian Kruse
9eba986833
avoid usage of snprintf()
...
We have a nice little abstraction for snprintf with covering the case
that a string is too big for the target buffer – let's use that!
2014-03-06 18:34:40 +01:00
Christian Kruse
164cf9d08f
completely avoid usage of strnlen()
2014-03-06 18:34:40 +01:00
Christian Kruse
d8b8bf0e2a
pg_indent'ing all files…
2014-03-06 18:34:40 +01:00
Warren Moore
7e55ce737d
fix: store the master connection user name on standby follow
2014-03-05 16:49:56 +00:00
Christian Kruse
c3b58658ad
fixing repmgr repl_status columns
...
repmgr repl_status had the column time_lag which was documented to be
the time a standby is behind master. In fact it only works like this
when viewed on the standby and not on the master: there it only was the
time of the last status update. We dropped that column and replaced it
by a new column „communication_time_lag“ which is the content of the
repl_status column on the master. On the standby we contain the time of
the last update in shared mem though refer always to the correct time
nonetheless where repl_status is queried. We also added a new column,
„replication_time_lag“, which refers to the apply delay.
2014-02-15 01:35:27 +01:00
Christian Kruse
c4ac2d3343
fixing PQexec() calls
...
fixing several calls where we did not check the result status but only
the return value; the query may fail nonetheless
2014-02-15 01:27:53 +01:00
Christian Kruse
ca470647cb
cleanup of usage text
...
Now it properly aligns and breaks at 78 characters.
2014-01-30 14:26:17 +01:00
Christian Kruse
701cf043fd
fix: seems as if I missread -hackers
2014-01-23 16:46:49 +01:00
Christian Kruse
bbb67c55f6
simple past of set is set
2014-01-23 10:50:37 +01:00
Christian Kruse
680f23fb1d
copyright push
2014-01-23 10:37:49 +01:00
Christian Kruse
1159113c58
ignore the dynamic shared memory directory, too
2014-01-23 10:02:32 +01:00
Christian Kruse
0fdcce0477
use if instead of switch and avoid a warning
2014-01-22 15:12:29 +01:00
Christian Kruse
f2a0b31a20
more log format fixes
2014-01-22 14:30:24 +01:00
Christian Kruse
d235c696af
fix: do not newline at the start of a log line
...
This breaks the log file format since it will have a line break directly
after the timestamp
2014-01-22 11:47:02 +01:00
Christian Kruse
c81793b63f
fix: added forgotten options.priority value
...
Patch by Marco Nenciarini <mnencia@debian.org >
2014-01-21 14:18:12 +01:00
Christian Kruse
9563877fbb
new config option, stdout/stdin closed
...
Now stdin and stdout get closed. Additionally stderr gets closed and
reopened to the new config option „logfile“ if specified
2014-01-16 15:22:34 +01:00
Christian Kruse
4f3bd6612c
do not exit in getMasterConnection()
2014-01-16 15:07:15 +01:00
Christian Kruse
192ee3cdb0
do not exit in get_cluster_size
2014-01-16 15:07:06 +01:00
Christian Kruse
6f149ead8f
do not exit in guc_setted and guc_setted_typed
2014-01-16 14:48:46 +01:00
Christian Kruse
77aa6aa326
do not exit in pg_version
2014-01-16 14:48:42 +01:00
Christian Kruse
4fabfbbbd0
fix: do not exit in is_standby()
...
Instead we now return an int with 0 meaning „not a standby,“ 1 meaning
„is a standby“ and -1 meaning „connection dropped“
2014-01-10 17:11:16 +01:00
Christian Kruse
a0fdadd5d2
this way it is much cleaner
2014-01-09 15:35:44 +01:00
Christian Kruse
4c3d7f80ed
now code compiles with -ansi -pedantic and has less warnings
2014-01-09 14:45:07 +01:00
Christian Kruse
6e3fe059d8
added config options pg_bindir and pg_ctl_options
2014-01-09 14:44:34 +01:00
Christian Kruse
9f26254ac3
fix: added some missing initializers to avoid compiler warning
2014-01-09 13:33:22 +01:00
Christian Kruse
d0f3cb59c7
fix: create data directory after sanity check
2014-01-07 14:42:55 +01:00
Christian Kruse
7428e92e10
fix: correctly check the return value of PQexec()
...
not only check if return value is not NULL but also check that the
returned result is a PGRES_COMMAND_OK (e.g. the INSERT was successful)
2014-01-07 14:27:31 +01:00
Christian Kruse
a97065113d
fix: remove own node earlier if force is set
...
We have to remove our own node before we check for a new master if force
is set; else master register would fail on the second time since there
already is a master (ourselves), even if we specify -F
2014-01-07 14:16:58 +01:00
Christian Kruse
9e2f276fcf
fix: do not exit after pg_start_backup() w/o pg_stop_backup()
2014-01-07 14:02:29 +01:00
Jaime Casanova
5e04ab6eae
Add a ssh_options parameter to allow ssh checking
...
to consider non-default values (ie: a different port)
Patch by Jay Taylor
2013-12-19 01:22:55 -05:00
Jaime Casanova
a1f4285e2b
Add guc_setted_typed() function to allow
...
wal_keep_segmeents to be checked as an integer instead
of text
Patch by Jay Taylor
2013-12-19 01:22:42 -05:00