Hacker News new | past | comments | ask | show | jobs | submit | more killbrad's comments login

Child-side foreign keys? Does that mean constraints in app logic instead of the database?


No, on the database itself. I used "child side" for lack of better terminology. Every foreign key has two edges: the "parent" table and the "child" table. Rows in the "child" table depend on existence of matching rows in the "parent" table.

It should be feasible to run `gh-ost` to ALTER a table that only has "child"-side constraints. It will be impossible to run `gh-ost` to ALTER a table that has "parent" side constraints.

Hope this clarifies.


I'm probably really ignorant asking this, but how do you "pause" schema migrations period. And even if you did, how do you ensure a consistent experience for your users if your db is broken? Some sort of application logic to deal with inconsistencies? That seems really expensive (from a development work perspective).


With gh-ost migrations are performed on a copy of the table. This, combined with the way data is copied to this table mean: - you can pause just by suspending the copy, - changes are invisible until the end, when tables are swapped.

The first point depends on the mechanism used to keep up with changes to the original table. You can’t fully pause migrations on pt-online-schema-change for example, as it leverages triggers for that part.

From my phone so sorry if too brief, gh-ost’s docs are great and would tell the whole story.


It's all described in the readme, but generally online schema change tools work by creating a new table, copying the data from the old table over, somehow keeping track of new writes to the old table, and then syncing those over. At the end the tables are swapped. With gh-ost you can pause the writes to the new table.


Not OP but I’m familiar with the topic and run similar tooling on large clusters. By pause he probably means prevent it from starting on more databases and let whatever is inflight finish. For the second point, correct, your application needs to handle both schemas during transition. When that’s done, you can rip out the unneeded logic from your application.


> your application needs to handle both schemas during transition.

How is this typically done? Have a version number in the db? Have the app examine the schema with every transaction? Have the app assume old/new schema optimistically, and if that fails rollback and try with alt schema? Something else?


Whose definition says that?


I will never use this service and think Uber is a negative for society. It's unfortunate that people don't see it.


It only takes a couple weeks working in any company that has young employees to know that 90+% of those employees under 30 think they're the greatest thing since sliced bread and that all of their amazingness is simply unused and underpaid.

It's really sad actually because it means in 10 years we are gonna have significant work depression levels due to children being raised to believe their reality would be much different than it will turn out.


I saw the exact same thing at one of my jobs! Kids barely out of school convinced everyone over 30 was completely out of touch and unable to learn new things. After two years of working they all expected to be "architect" this and "manager" that. Of course, this was 20 years ago, which is to say - the more people change the more they stay the same


“The children now love luxury. They have bad manners, contempt for authority; they show disrespect for elders and love chatter in place of exercise.”

-Socrates, ~450 BC


Nope. https://quoteinvestigator.com/2010/05/01/misbehaving-childre...

I would say this is an example of Abraham Lincoln's famous observation "you shouldn't trust quotes on the Internet", but that one predates the Internet, so you probably shouldn't trust quotes in newspapers either.


I dont think the author of that comment expected people to take that one literally. I interpretted it as how the op felt older generations view younger generations.


The fact is, some older people have always been prejudiced towards younger people, to the point it's a cliche, and, therefore, the five millionth iteration of it isn't interesting, or valid, or true, or even much worth hearing.

(... and it's especially rich to hear it coming from the Boomers...

and I'm sure the more historically-aware of the Boomers thought it was quite rich to hear it coming from the Jazz Age refugees... )


It doesn't really invalidate his argument considering the quote was a summary of ancient writing in a student's thesis.


Thank you!


I think a lot of this stems from training for job interviews.

A few years ago, I was doing a gig as a consultant for a while before I realized that side of the industry wasn't for me. While on the job, I was trained (by 45+ y/o's) to walk into interviews and new jobs like I was 100% the best because that's what employers expect in today's job market. I believe its more the effect of a "Fake it 'til you make it" culture that stems from a result of lowered employment prospects as mentioned in this thread.


Depends where you work. At my site (hp, engineering R&D) we've hired a lot of young employees lately and I'm very impressed with their attitude and maturity. Popular current opinion had me fearing for the worst but now I think our future is in good hands.

There is a shift in communication styles and processes, but even though I'm an old fart I have no hangups about trying new processes. Just don't take my email away (or my statically typed language).


That hasn't been my experience at all. The young people I've worked with work hard, don't have overly high expectations, and are generally fun to get along with. Perhaps this is a reflection of the kind of people your company is hiring (newer hires tend to be younger) rather than young people, in general.


People who are fresh out of school can be way overconfident, in part because they don’t know what they don’t know yet. No generational trends required, I was certainly that way in the ‘90s.

So many times when I hear people complain about kids today and contrasting it with themselves at the same age, they’re comparing how they thought of themselves at the time (which is usually very different from how other people saw them), vs how they view someone else today. It’s a variant of, we judge ourselves by our motivations but we judge other people by their actions. It’s a very difficult thing to be objective about.


Please. Spend a week on a cruise ship surrounded by rude, fat, entitled old people. I've never been more ashamed of my fellow Americans than the time I was forced to spend a week surrounded by a typical baby boomer's idea of a vacation.


Why do you think that's a "typical baby boomer's idea of a vacation"? The people you were observing were 100% pre-selected to be the type of people who would go on a cruise. It's obviously not representative of the population at large.


In the last two years I hired 6 college graduating seniors.

None of them knew how to address an envelope... and only one thought to google for the answer.

We had to throw out a ton of (customer conference) literature packets because the labels and stamps were just randomly (and unattractively) slapped on.


Maybe put that on your interview exam, rather than silly programming questions no one uses in real life.


Truly the height of engineering achievement; addressing letters.


It seems needlessly expensive to have engineers stamping letters as opposed to administrative assistants.


Cut the cord works


Classic crap


The first few paragraphs of this article put me off of the entire thing.


You are using an internet troll forum as your source of data??!


Nexus 5X owner. I won't buy one of these due to lack of aux output, and I'm not in "the industry".


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: