summaryrefslogtreecommitdiff
path: root/src/janitor.c
AgeCommit message (Collapse)Author
2015-07-31Disable server_idle_timeout when server count gets below min_pool (#60)Marko Kreen
2015-07-31c-style: More consistent brace usageMarko Kreen
Use more braces in places where statement boundaries are not obvious at glance.
2013-12-18Fix a bunch of typos.Euler Taveira de Oliveira
2013-12-18Replace C++ comments.Euler Taveira de Oliveira
2013-10-07auth_user supportCody Cutrer
query the database's pg_shadow table for user information, instead of using a local userlist.txt. Brings transparent support for Postgres 9.0+ which no longer has a compatible file format. Tested with trust and md5 auth_types only.
2013-09-27fix launching new connections during maintenanceCody Cutrer
match up waiting connections with tested/used until we run out. launches new connection if there are more waiting than could be fulfilled by refreshing current connections. this situation can happen if you have high churn on client connections (i.e. with transaction pooling), such that there is *always* at least one connection in sv_tested or sv_used.
2011-10-26Merge remote-tracking branch 'mtharp/rpath'Marko Kreen
Conflicts: src/janitor.c Instead not flagging paused auto-db as inactive, I moved the check to auto-db cleanup.
2011-10-17dns: query zone SOA, recheck hosts if changesMarko Kreen
2011-10-09idle_transaction_timeout: new config optionMarko Kreen
2011-10-03min_pool_size (draft)Marko Kreen
2011-03-30Fix copy-paste error in last autodb fix.Marko Kreen
2011-03-29Fix autodb cleanupMarko Kreen
Old cleanup code was mixing up databases and pools - as soon as one empty pool was found, the database was tagged as 'idle', potentially later killing database with active users. Change the code to tag database as active when active pool is found and later checking for inactive databases. Reported-By: Hubert Depesz Lubaczewski
2011-03-23Don't expire auto DBs that are paused -- that would un-pause them.Michael Tharp
2011-03-18Add KILL command to pause a db and terminate all connections.Michael Tharp
2010-10-07client_login_timeout: check wait_for_welcomeMarko Kreen
When rebooting, then pool->welcome_msg_ready=0 does not mean that ->waiting_client_list will contain only new connections.
2010-06-11convert few static buffers into pktbufMarko Kreen
2010-05-04<usual/strpool.h>Marko Kreen
Removes fixed-length limit from parameter values.
2010-05-04<usual/slab.h>Marko Kreen
2010-05-04<usual/list.h>, <usual/statlist.h>Marko Kreen
2010-04-23Let disconnect_server/client() take printf style args.Marko Kreen
2010-04-14Move fast-fail relaunch logic around.Marko Kreen
Do it together with fast-fail disconnect. When kept separately it can launch even if there are no new clients coming. This causes problem with permanently dead dbs/users, as the retry will not stop if all clients are gone.
2010-02-12log message: statement timeout -> query timeout, to match config varoriginMarko Kreen
2010-02-12Don't let clients queue in case no servers and connections fail.Marko Kreen
That allows to avoid unnecessary delays in hopeless situations.
2010-02-12Introduce a new configuration setting: query_wait_timeoutMarko Kreen
If a query spends more than query_wait_timeout seconds waiting it is disconnected. This prevents unresponsive servers from wasting resources. Patch by Martin Pihlak
2009-12-04Apply client_login_timeout to clients waiting for welcome pktMarko Kreen
Otherwise the clients stay waiting infinitely, unless there is query_timeout set. This only applies for servers that have never been up. If server has been connected once, the query_timeout is only thing that kills clients, as clients are let freely log in after first connect to server.
2009-11-13Disable maintenance during SUSPENDMarko Kreen
Otherwise some timeout may activate and close connection that is already reported to other side;
2009-01-28Apply ISC license clarification, bump copyright years.Marko Kreen
Clarification: for f in */*.[ch]; do echo -e "%s;and distribute;and/or distribute;\nwq" | ed "$f"; done Details at: http://en.wikipedia.org/wiki/ISC_licence
2009-01-10some more cleanups:Marko Kreen
- avoid NULL values for config variables - cf_shutdown=2 means fast shutdown - export cf_config_file
2009-01-02Reserve pool implementation.Marko Kreen
Allow to increased pool size in case main pool size cannot serve clients anymore. This allows to continue use of small pool_size, which smooths small peaks, while also handling large peaks. (Eg, one bouncer server down, others need to handle load.)
2008-11-19Dynamic database creation for non-defined databases.Marko Kreen
Activated by "*" entry in [databases] section. Patch by David Galoyan
2008-08-04suspend_socket_list can drop sockets, so needs _safeMarko Kreen
2008-07-09log proper reason for disconnectMarko Kreen
2008-06-25New database setting: connect_queryMarko Kreen
Specifies a query to be executed after connection is established. Original patch by Teodor Sigaev, applied with minor modifications
2008-01-22server_lifetime=0 drop connection immidiatelyMarko Kreen
2008-01-18move ->admin flag from pool to dbMarko Kreen
2008-01-11move db/user/pool alloc also to slabsMarko Kreen
2008-01-11actively kill databases removed from configMarko Kreen
2008-01-11make failure from event_del() non-fatalMarko Kreen
- pgsocket: keep open sbufs in justfree lists, retry close later - pooler: keep track socket states, retry in per-loop main function
2008-01-09suspend_timeout, to force suspendMarko Kreen
2008-01-08remove unnecessary labelMarko Kreen
2008-01-08less scary -R: move takever before forkMarko Kreen
2008-01-07safe_accept, safe_connect, safe_evtimer_addMarko Kreen
2008-01-02error checks for all libevent callsMarko Kreen
try to survive errors delicately, by dropping connection where possible. Thats not yet possible for event_del() and evtimer_add(), exit immidiately then.
2007-11-21separate disconnects from each other to avoid reconnect floodMarko Kreen
requested by Simon Riggs
2007-09-11dont load users if auth_type=anyMarko Kreen
2007-08-13Magic number and error message cleanup.Marko Kreen
Thanks to David Fetter
2007-08-02Server parameter tracking.Marko Kreen
2007-08-01small stuffMarko Kreen
2007-07-23Fix sloppy english in the comments.Marko Kreen
Patch by Robert Gogolok.
2007-06-13pause/resume specific databaseMarko Kreen