714 reputation
311
bio website bsd-box.net/~mikeg/blog
location New York, United States
age 32
visits member for 3 years, 3 months
seen Apr 30 at 15:37

Generic sysadmin. Hack coder. Jack of all trades, master of some.


Please Note:

I expect you to read any reference material I link to in my answers. If the answer to your question is contained in said reference material and the reference source is not likely to disappear I will probably not cut and paste it onto SF unless it's really cool/interesting/obscure.
In return I promise not to link anyone to goatse or tubgirl

I expect you to think for yourself and do a little thinking (and mayhaps even some work) to solve your problems. If you aren't capable of this, please exit the profession via the door on your left.
In return I promise to do my best to aim you in the right direction, and to clarify any points you have trouble with


Sep
30
awarded  Explainer
Jul
24
awarded  Yearling
Feb
28
comment Repair table field: Import/append records from specific backup field if they are not null
@square_eyes Without your database I can't even begin to tell you what such a query would look like. you would have to be able to uniquely identify each row in which data was lost (ideally by a primary key), extract the lost (presumably NULL) columns from your temp database, and UPDATE your main database with the missing data. The SELECT/UPDATE bit could be done with a short program in your favorite language (possibly even within MySQL itself, that's not my choice of database so I can't help there), but the identifying of rows & their missing columns nobody can do but you...
Feb
28
answered Repair table field: Import/append records from specific backup field if they are not null
Dec
10
comment Creating a mysql trigger without hard-coding database name
This is the default behavior on most database systems I've encountered: "If the database name / schema namespace is not specified, assume the current one."
Dec
10
answered best practices indexed views computed columns
Dec
10
revised Creating a mysql trigger without hard-coding database name
Improve title
Dec
10
suggested suggested edit on Creating a mysql trigger without hard-coding database name
Dec
9
accepted Restoring SQL_ASCII dumps to a UTF8-encoded database
Dec
3
awarded  Popular Question
Jul
24
awarded  Yearling
Jun
8
comment Restoring SQL_ASCII dumps to a UTF8-encoded database
Hmm - this might be workable: I can use make a text dump of just the tables with strings in them & use this to try to determine if there is a consistent encoding. The problem is my database encoding is SQL_ASCII - the encodings of each string are indeterminate (because Postgres performs no encoding conversion when SQL_ASCII is specified, and this DB has been abused by a variety of applications of varying code quality) but I might luck out with the apps all being consistent :)
Jun
7
comment Need a log based replication / CDC solution to publish postgres to oracle subscribers
Is there a particular reason you need to move the data out (as opposed to querying your Postgres server from the other databases)? You could theoretically do CDC with triggers, or write something to process archived WAL segments, but both of those strike me as particularly nasty solutions...
Jun
7
comment Troubleshooting high CPU usage from postgres and postmaster services?
@asadz no, it was truncated (fixed now) -- If you have specific PIDs and want to see what they're running you can isolate them with a WHERE clause, but if you don't have a huge number of PIDs it's just as easy to search through the full output. The Postgres manual has additional detail on what you can get out of pg_stat_activity, as well as the other statistics-collector tables (which can help you if your problem isn't a user query).
Jun
7
revised Troubleshooting high CPU usage from postgres and postmaster services?
Finish query
Jun
7
asked Restoring SQL_ASCII dumps to a UTF8-encoded database
Jun
7
answered Troubleshooting high CPU usage from postgres and postmaster services?
Feb
13
answered Replication between SQL Server 2005 and Azure database
Dec
19
comment Postgres scalability - What is the impact of connection pooling?
That's a good point - at the moment our front-end loads are relatively light so even under load tests we're not spawning an insane number of Apache processes, but that may change in the future. (we've got "other problems" with poolers like pgpool breaking prepared statements (still?), but adjusting our app to do its own pooling is certainly possible and probably a good idea)
Dec
19
asked Postgres scalability - What is the impact of connection pooling?