Good morning my beautiful internet friends. Here's the thing, I am in no way sincerely from the bottom of my heart. I don't think I ever have been in any way prejudiced against anyone who uses any kind of mobility aid, wheelchairs in particular. I am deeply prejudiced against using wheelchairs in my own life and this has caused problems and is continuing to cause them and I thought I'd come clean about it. So let's have a little heart to heart shall we? This past weekend I was in Dallas, Texas.  It was a really great experience but I only brought my eye walk. I don't actually have a wheelchair that I can use. I do have like a hundred dollar wheelchair from Walgreens where someone can push me. I used it briefly after surgery only to get out of house when I could not walk without like passing out from being in pain and being exhausted. So I went to a all-day conference where there were thousands and thousands of people and I had to do a lot of walking, an absence of Uber so we did a lot of walking and my stubbornness where I made myself do a lot of walking with just the eye walk. Now you'll remember this video in which I said so the eye walk is an awesome short-term solution but it is not designed to be used every day for hours a day because that is not how our bodies work. We're trying to be really careful with it and decide when it's worth it to use it. I'm also switching to crutches sometimes which kind of crushes my soul a little bit. I'm trying to walk less on the eye walk, give my knee a break, blah blah blah. That's obviously going really well by the fact that I walked probably a couple miles a day at least one or two of the days that I was down there. And at the end of the weekend a situation came up that kind of brought to my attention that I think I need to just like bury my pride because it's injuring my life and my body but it's really hard for me. I don't know why ever since I first injured my ankle I like refuse to ever be pushed in a wheelchair like if I went to the grocery store and I was on crutches when I was like 14 I would crutch around gosh darn it and mom would always be like let's get you a wheelchair and I'd be like no mom I've got this. I think it's an independence thing where like I want to be able to I don't even know if that's it because actual wheelchairs that you can maneuver yourself do give you a lot of independence but I have never been able to stomach the idea of other people pushing me around. I just don't like it unless it's absolutely necessary and so the whole weekend went on it actually was okay like my knee wasn't terrible I took care of it at the end of every night I just doused it in blue emu which is like this numbing green again I'll link that down below if you're interested in what it is but it helps me a little bit so I just like tried to like kill the nerves and numb the pain but the day that we had to fly home I woke up with a migraine and my leg really hurt and my knee was messed up and I only had the eye walk and so I'll tell you what going to an airport when you have a migraine is not my idea of a fun time it was pretty rough and I was doing pretty rough and my friends were absolutely lovely I went down there with two of my friends and they were great they helped me out so much I mostly did a lot of refusing their help because I have problems accepting help and I was doing a fine job hopping through the you know airport suffering along just doing a good job of not accepting help and taking care of myself and I they had me sit on a bench while they went and like took care of ticketing or whatever came back and they had a wheelchair looked up and my friend Josie was like you can murder us later because I think she knows how I feel about this Josie by the way thank you I love you and I was like I just I might uh but at that point it was like I can't say no like I couldn't say no they literally had it there and they were like no we are going to help you because you were obviously in a lot of pain and internally I was kind of like ticked off about it I was like no like this is when I want I can do it myself like I'm fine blah blah blah and it turns out it was really helpful and definitely helped my migraine to be able to close my eyes at least going through the airport if nothing else and so that was really helpful if there's one thing I truly hate it is being in a wheelchair and my head was really hurting and my leg was hurting and my friends were terrible people aka really good friends and forced a wheelchair on me so uh so I just said okay and I accepted the help and guess what it actually helped so thank you Josie and Amanda and here's another step towards actually accepting help and not doing everything yourself oh but I hate it oh but there's something I just hate it and I was thinking about the next trip I have coming up today because I am going to the EpiT Coalition's conference down in San Antonio I've never been to Texas before but I'm going there twice in two weeks and my mom really wants to bring like the push wheelchair that we have I've been fighting her on it and I had told her like yeah just bring it just to bring it and I was literally about to text her you know what don't worry about it I did fine with the eye walk all conference weekend like let's not even bring that extra possibly very helpful tool that could save me pain and suffering and I thought about it and I was like Joe what are you doing seriously what are you doing I was talking to one of the friend of mine online a couple days ago and I was mentioning how the eye walk was hurting my knee and he's also an amputee and he was like yeah I use the eye walk a lot I found that you know wheelchair actually worked a lot better for me because it didn't hurt me and it still gave me a lot of independence and I was like oh maybe I should consider that now my house does not allow for wheelchair use very well uh it's three levels to get in from the garage there's there's a stair like it's just not very wheelchair accessible or friendly but I'm wondering if it might be a good time to break down and apply to insurance to help pay for one that I could actually manage myself and not have to have someone else push me side note there is no badge of courage or accomplishment in riding the struggle bus and like struggling along and having a hard time or an unnecessary suffering and I think somewhere along the line I got it in my head that like it was better to have a harder time if it meant that I was doing it myself it was like giving in or a bad thing or somehow lesser if I made my life easier breaking it down like that makes no sense and I honestly do think that there is strength in accepting help I think that there is strength in admitting that you need something I think what I'm trying to say is I am struggling to find that strength and it is it is a um I'm still in the gym for that one I have not reached the peak of accomplishing that just yet but I am literally making this video and I'm going to publish it as a way of forcing myself to accept help in this case that means allowing my mom to bring the wheelchair as a backup option I'm not committing to letting anyone use it I'm just saying it's going to be there in case I need it because I think I repeatedly shoot myself in the foot I just push myself way too hard for what I don't know it's just so important to me that like I have that independence but again I have literally never thought that someone using a wheelchair was not independent like I don't have that thought about other people but as soon as it's about me I get so upset and so angry and so flustered and frustrated it's a real punch in the gut trying to stomach pride and like clamp that down it's hard and mostly my friends have to either like corner me or force me into helping me which is really that's not a nice thing for me to do to them and I've talked in other videos about how you're really because it's true you're taking away someone else's joy by being able to help you because I'm someone who loves helping other people sincerely it's great and when people are constant like no I don't need your help it's kind of pushing people away so like I know what I'm doing but I keep doing it sometimes so this week I am very actively consciously focusing on stopping that and I feel like a conference for amputees is a good place to talk to people about that and to actually focus on accepting a little bit more help bit by bit so what is something that you have trouble accepting help on or are you on the flip side of the coin and you are totally fine asking for an accepting help if that's the case I would love to know your secret or any advice if you are going to be at the conference I would absolutely love to run into you let me know if you'll be there I'll be looking out for people to say hey to there as always a huge thank you goes out to all my patrons over on patreon it's kind of like an online tip jar and I really appreciate all of you guys there it's an amazing little community that we have growing there I couldn't do this without you guys thank you before reading your comments down below I love you guys I'm thinking of you and I'll see you in the next video bye guys


Yn ystafell i fynd i gael y cyfnodau, Stephen Kerr? Mae Gweithdoedd yn cydwylliant i'r parlymyn gynlluniaeth sy'n ei ddod i'r cyfnodau. Mae gynnyddio yn fawr i gael y cyfnodau, ac mae'n gwybodaeth i'r parlymyn gan gweithio'r cyfnodau. S&P ministers a MSPs have been repeating the claim made by the First Minister on 29 September that 98.8 per cent of our energy was from renewable sources. The First Minister corrected her incorrect claim quietly in the official record, but it remained inaccurate. I sought clarification from the chairman of the UK statistics authority who has written to me, and he states that the First Minister's clarification is incorrect. The First Minister will no doubt seek to clarify that her clarification was wrong. The figures are for the record 63.1 per cent. Now, whether the First Minister misled Parliament on purpose or otherwise is a matter for her conscience, but she has a responsibility, as we all do, to be accurate. When ministers say things to the Parliament that are untrue, correcting the official record behind the scenes on the quiet is not enough. Furthermore, the official record should not be treated by ministers like a 1984 Ministry of Proof, giving ministers a get-out-of-jail card for mistaken or misleading statements. Once the misleading statement is made, it is in the public domain, through Parliament, TV and through its archives, and the way that we all use the videos of these sessions. I very much doubt that many people check that everything that was said in this chamber reflects the official record. It has been said in the past that if you tell a lie big enough and repeat it often enough, people will believe it. The truth is important, despite the heckling from the SNP benches. The truth is important. What powers do you have to compel ministers, especially the First Minister, to come to this chamber and clarify in person verbally when they have made a mistake? What powers does this Parliament have to allow oral statements to this chamber to correct mistakes and misleading information? We must find a way to avoid the perception that lies are being told for political ends. I thank Mr Kerr for his point of order. I remind all Members that we have a duty to treat one another with courtesy and respect at all times. I would certainly prefer it if we did not have suggestions that Members were treating one another in the way that Mr Kerr describes. Mr Kerr will be aware, as will all Members, that Members have a personal responsibility for ensuring that their contributions and proceedings are accurate. In the event that a member becomes aware that they have provided inaccurate information, they can seek to make use of the existing correction mechanism. Mr Kerr was asking what powers the Parliament might have, but the Parliament has previously agreed what steps are appropriate to make other Members aware when a correction has been made. Corrections 2 are highlighted in the Business Bulletin and on the Parliament's website to ensure transparency around the use of the mechanism. The procedure 2 allows a member to seek to make a statement to the Parliament if they realise that a significant error has been made. The decision on whether or not to seek to make such a statement is a matter for the member concerned. We will now move to topical questions, and at question 1 I call Katie Clark. To ask the Scottish Government what its response is to reports of misuse of fireworks and pyrotechnics on bonfire night. The disorder and thuggery that occurred on and around bonfire night involving not just fireworks and pyrotechnics but bricks and even petrol bombs was sickening. I give my heartfelt thanks to our emergency services for their dedication and bravery in working in appalling situations to keep our communities as safe as possible. I welcome the fact that Police Scotland has made clear that investigations are on-going and that it aims to bring culprits to justice. I urge any member of the public with relevant information to get in touch with the police, either directly or anonymously, through crime stoppers. I warmly welcome the minister to her new role and associate myself with the comments that she has made regarding the emergency services. Between 2016 and 2020 there were only four solemn and 16 summary firework convictions and no firework convictions whatsoever in 2020 2021. Given the way that the Scottish Government has constructed its proposed licensing scheme, it makes it even more important that there are convictions. How will the minister ensure that there are convictions arising from this year's events? I thank Katie Clark for her question and her welcome. There is no equivocation on the part of the Scottish Government where there is offending of the type that has been seen over recent days. We will fully support Police Scotland in pursuing investigations and where sufficient evidence is obtained using their powers appropriately to make arrests and bring charges. As regards to convictions, it is difficult to get an entirely comprehensive picture because of the range of common law and statutory offences that may be relevant. As regards the matter for the courts, it would be wrong for ministers to criticise or second-guess the sentences that the courts impose as only they have all the weighted evidence in front of them. However, I am clear that the sentences and powers of the courts in this area, under a range of common law as well as statutory provisions, are extensive and I will be keeping a close eye on how things develop. Katie Clark. The criminal justice committee considered the recent fireworks legislation. There was considerable discussion about how people might bypass the licensing system by buying online or on the black market. Will the minister take steps to find out where the fireworks, which were misused, came from, whether they were bought in a shop online or obtained elsewhere? Once there has been a full investigation into the full circumstances of this year's events, will she ensure that there is a full report to Parliament? At this point in time, we are not aware of any clear evidence to suggest that there is a lot of black market sales and that it is a widespread issue. We know that there is the isolated incidents involving the supply of illicit fireworks products. Enforcement agencies have well-established processes in place to tackle black market sales. There is a big multi-agency planning that is carried out every year that involves Police Scotland trading standards and the Scottish Fire and Rescue Service to identify and tackle emerging issues. We will and I plan to work closely with enforcement bodies to monitor illicit fireworks sales in Scotland. As part of this, the Scottish Government has funded trading standards to undertake a fireworks enforcement engagement project with retailers building on the success of similar projects last year. That is something that I will keep a close eye on and bring back to Parliament. Gordon MacDonald Thank you, Presiding Officer. It is important that we acknowledge the appalling behaviour by some over the bonfire weekend, including the incident in the city hall park area of my constituency. However, we should also note that the number of calls that police received related to such behaviour was down from 581 last year to 483 this year, a 17 per cent reduction. That is in mind, can I ask the Scottish Government what work was carried out by the Scottish Government and partners in preparation for the bonfire night period? The Minister for Rural Affairs and the Constitution I welcome the year-on-year reduction in incident numbers. The 17 per cent reduction is very welcome. It is absolutely imperative that we make sure that the bonfire night does not happen the way that it did because it was intolerable. We support the vast amount of multi-agency partnership work that is undertaken by our emergency services, local authorities and wider community safety partners in preparation for the bonfire night period. On the bonfire night itself, I attended the operation Moonbeam Gold Command Room in Bilston-Glen to witness the effectiveness of the partnership working and see the scale of the challenge faced as it unfolded in real time. I cannot praise them enough. Planning in preparation for the bonfire night includes prevention and diversionary work in local communities by a range of partners, particularly in the areas that are affected most by fireworks where we have serious multiple deprivation. With partners, the Scottish Government also launched our three long-standing national public awareness raising campaigns to ensure that we do enhance the messaging on the new proxy supply offence. Again, we have funded training standards colleagues so that they are better able to promote and enforce the new legislation around sales. A constituent of mine wrote to me yesterday to express their concern about the disgraceful scenes across Edinburgh at the weekend after violence erupted and police were injured in petrol bomb attacks. A substantial number of youth terrorised residents by throwing fireworks at innocent car drivers, in scenery devices at emergency response vehicles, police vehicles were attacked and officers suffered facial and eye injuries. This behaviour was utterly disgraceful and cannot be repeated. The SNP rushed through the fireworks bill in June, but it has done nothing to address community safety concerns. Will the minister commit to reversing the SNP budget cuts to the police to ensure that our officers have the resources to tackle the type of disorder and keep our communities safe? I associate myself with Sue Webber's comments on the intolerable behaviour that we see. At this point in time, we only have a resource spending review in front of us and we do not have a budget set, but I will definitely keep a close eye on that because our communities cannot endure what was seen last weekend. We need to make sure that we have enough resources in place to do that early intervention and prevention work that we need to do in our communities where there is multiple deprivation and we do see a rise in those types of cases. I will come back to the member on this issue. To ask the Scottish Government how it plans to mitigate the threat of avian influenza outbreaks among domestic poultry populations in light of its impact on wild bird populations in Scotland. The Scottish Government has already taken steps to mitigate the threat of avian influenza in the wider domestic populations through the introduction of national avian influenza prevention zone on 17 October. That made it a legal requirement for all birdkeepers to follow strict biosecurity measures to help to detect their flocks. That was in response to a risk assessment and follows the worst outbreak of the disease on record. I thank the cabinet secretary for that answer. Birds do not stop at borders between Scotland and England, so as long as that is the case, nor will avian flu. The same threat that exists south of the border that the UK Government have acted decisively to mitigate exists here in Scotland Am i'n myth, the largest outbreak of avian influenza the UK has ever seen over 200 cases and many culls according to an FOI from the ferret since October 2021. Why is the cabinet secretary just monitoring when England is acting decisively? I do not think that that is a fair assessment of the situation at all and I hope the member would appreciate that we take decisions and we base our decisions on the best available scientific advice and expertise that we have within the Scottish Government and through our chief veterinary officer. I know that the member is referring to the mandatory housing order that was implemented in England this week but any decision to require mandatory housing has to be based on risk to improve animal health and welfare concerns. That kind of decision has to be based on the balance between the positive and negative impacts that housing otherwise free-range birds might have and this is not a simple or a light undertaking. As the member is aware and as the chamber will be aware, the situation is being kept under constant review and the decision on whether a housing order is introduced is a matter for Scotland's chief veterinary officer and it follows that analysis of a wide range of available evidence. The NFUS have labelled the Scottish Government's response as wholly inadequate and as we speak more outbreaks are being confirmed across the country in Aberdeenshire, in Orkney and reported sightings of wild birds in distress in my own constituency of the Scottish borders. Evidence shows that housing flocks reduces the risk of birds being infected, birds on no respecters of borders, so the Scottish Government must explain the basis for its decision given the importance to businesses approaching the hugely significant Christmas market and the on-going devastating loss of wild birds on the coast and in our countryside. Firstly I want to emphasise that I completely appreciate the member's concern here and I've heard those calls from the NFUS and had those discussions as well and I completely understand just how concerning this must be for poultry keepers in Scotland given the sheer number of challenges that the industry as a whole faces at the moment together with this. Now, as I've said in my previous response, this isn't a simple light or light undertaking and it needs to be based on scientific analysis and the evidence that we have at the moment. So the member talked about the number of outbreaks that we're seeing across the UK. There are a number of outbreaks in England. I believe the last number was 107 that we've seen there. We've seen six in Scotland. The CVOs in Wales and Northern Ireland also have not taken the decision not to introduce a mandatory housing order. Now, the types of consideration or the issues that we have to give consideration to when that decision is taking is looking at the numbers, the geographical distribution of poultry cases, the epidemiological reports on risk pathways, risk assessments on disease risk level, alongside case numbers and the geographical distribution of wild bird findings as well. Those are just some of the considerations that the CVO and her team have to look at when making those decisions. I hope that the member can appreciate again that I depend on that advice from the chief veterinary officer and on that expertise and the scientific analysis that's undertaken when we're looking to make these decisions. Emma Roddick. Thank you, Presiding Officer. This is clearly a worrying time for poultry farmers. My understanding though is that keeping birds indoors is not a silver bullet for combating avian influenza. The recent comments of the chief veterinary officer give us assurance that Scotland's approach to this situation is being led by the evidence. Can the cabinet secretary set out some detail on how other methods to prevent direct and indirect contact between flocks and wild birds could help to protect poultry from this disease? The Scottish Government has published some guidance that has been developed jointly with DEFRA and Welsh Government on our Gov.Scot webpages with guidance on bi-security and preventing welfare impacts in poultry and captive birds and advice for all captive birds and poultry keepers. That includes game birds, waterfile and pet birds. It also has published an avian influenza prevention zone self-assessment checklist. It's also important to emphasise some of the key requirements that we'd be asking or looking for keepers to follow. Some of that includes checking the integrity of buildings where birds are kept for any defects that could potentially allow water ingress or other contamination, fencing off or netting any ponds, standing water, a waterlogged land in the range to prevent access by poultry or other captive birds, and also using a Government-approved disinfectant at the correct concentrations. All of that advice, which has been developed jointly, is available on our webpages, and I would encourage keepers to look at that. The impact on the poultry sector of the worst of our avian flu outbreak has been devastating with more than 90,000 hens alone culled, with new cases still emerging. That number will rise as will death among wild birds. If the Cabinet Secretary has rolled out introducing a house-in-order at this time, we need to see robust implementation and monitoring of biosecurity standards. However, there have also been worrying reports in England that avian flu has been found in game birds such as pheasants, reared in activity and then released into the wild for hunting. What assessment has the Scottish Government made of the likely number of pheasants that have died of avian flu and whether their release has had any impact on spreading the deadly disease? I would be happy to get back to the member with further information on that, but I would just come back to the initial point that he made about the difference that excellent biosecurity measures make in this type of situation as well. Again, we have not ruled out a mandatory housing order. We are continuing to monitor this situation every day. That could well change and we could well look to implement that, but, again, we need to base that on the analysis and the evidence that we have.


Okay, so now we have Nick who's going to talk to us about PostgreSQL's archiving and back-up and replication tools. Hello, Martin Kestel here. Well, yeah, we do have a little bit of redundancy, but redundancy is good, especially when you're talking about back-ups, so it's okay. Who's been in Gülchen's talk earlier, like two hours ago? Half of you, okay. So, well, we will have some redundancy, I'm afraid, but still. Anyway, so my name is Nick. I'm currently working as a full-time DBA at Elster, which is the German system for the Elektronische Steuererklärung. So, when you're German and you did your text activation earlier this year, then it's in my database. Fully encrypted, no worries. So, I did think about doing some kind of decision tree. The documentation about back-up, archiving, restore, and replication covers about 50 pages of A4, which is a lot, but considering that the whole documentation is more than 3,000 pages, it's just enough, right? At the end of the day, I said, no, let's just go on, mention the other stuff, but tell them what they probably want to do. So, for 90% of you, or even more, what we will have at the end of this talk, we'll do one way or the other. There's still some misconceptions, so the idea for this talk raised from a discussion we had on the mailing list, because I ran into an issue and I didn't find anything in the docs, and well, it ended up in like, yeah, you can't write it down, you can't write everything down, right? So, some things people just have to know. Anyway, let's see. Some assertions. You're here because you value your data, otherwise you would not be in the Postgres room, but in some other. You have decent hardware and equipment and data centers, so you will have at least two servers that are the same size. You will have ECC memory, you will have a battery backed up, hard disk controller, or using a SAN. You will have a power supply, an uninterrupted power supply, and so on, so enterprise hardware, enterprise. These are separated as far as feasible. So, when you only have a room with one square meter, they're probably in the same rack. If you have a larger room, they are not in the same rack. When you have more than one room, they are not in the same room. When you have more than one building, they are not in the same building. I could go on. With continents, yeah, we'll get to that. You have at least an idea what your recovery time objectives and your recovery point objectives are, or what your requirements are. You don't have to have them fixed, but you should have an idea. Everybody knows what that means. RPO, RTO. Okay? So, your recovery time objective means the time that you need to recover from a fatal crash or server loss. Something like that. Building loss. Country loss. The recovery point objective is to which point you have to be able to recover. So, like, you are allowed to lose the last six hours of users putting data in your database. Or maybe it's two minutes, or maybe it's one transaction, and so on and so on. Doesn't make sense? Okay, cool. So, there are some natural laws that are always valid. Gravity, speed of light, Murphy. You all know what Murphy's law is. Okay. Disaster does strike. Unlike lightning, disaster does strike twice in the same place. You see that red point up here?  Right. Okay. So, then there's Einstein. I'm not going to read it because, yeah, you probably know all that. There's two stars. Okay. Evolution. Götzchen covered that extensively. What I do think is that amending the docs when you add a new feature is maybe not the right way. Maybe not. You still should read it all if you have the time, but it's more than 50 pages, or almost 50 pages, 49 when I counted yesterday. So, that's a lot of stuff to read just to do some backups, right? You should still read it. Certainly should. So, with 7.0, this is what you had.  Backup and Restore was basically logical backup. We'll come to that in a second. Database Recovery was this. Totally love it. Just imagine Oracle would put something like that in the docs. Logical backup. What does it mean? Basically, you use PGDump or PGDump all to do a textual representation of your data. So, it's really create database, create table, insert. Actually, not insert, but whatever. So, you get a snapshot of your data from the second that PGDump started because it opens in the transaction. MVCC will take care that you get a consistent view of your data, and you can restore exactly that state, by the way, but we'll mention that later as well. It will can dump the whole cluster with PGDump all. You can dump single databases. You can dump single tables, et cetera, pp. You can have a text file, really like readable SQL insert into et cetera, pp. Or you can get some proprietary formats, which file does recognize as PostgreSQL, proprietary, whatever. You know what I mean. So, plain text. It's plain SQL. Use this copy if you don't tell it to use insert because you want to port to MySQL. It can be read by humans, which is a big advantage. Then there's a custom format, which is basically compressed text. I think. I don't know. Yeah. So, you cannot pipe that into PSQL as you can with a text. So, you have to use PG Restore and pipe that into PSQL because it will, again, give you the text. It can restore single tables, and it is compressed. Then you have the custom, no, the directory format, which has an advantage because it can run in parallel. How's that light working? There. With minus j. It will create a directory with a different file or different files for every table that you have. So, you can also restore them in parallel, which makes it faster. Anyway, jumping forward because, well, yeah, you would say PGDump all. Never forget to use PGDump all if you do a textual dump or PGDump dump because PGDump also only reads from databases. Your schemers, sorry, your roles, your tablespaces are database or cluster-wide objects, not in a database. So, you have to dump them separately. And you should probably do that anyway. We'll come to that. RTO and RPO. The recovery time objective is basically, yeah, you can restore. It will take between minutes and days, depending on the size. That's simple. RPO. You can recover to the point in time when you started your backup. So, if you do your backup at Sunday night at 8. And Monday morning, somebody says, delete from customers. Then you can restore pretty well back to Sunday night. If that happens on Friday night, you're not happy. Mind you. Disaster strikes. Pros and cons. It's readable by humans. You can, like PGDump all, dump your schemers and roles on a regular basis to put them into subversion or Git or whatever so that you have it documented, right? A PGDump file can be read by newer versions of Postgres. So, if you have a PGDump backup of your Postgres 8.4, you can easily read that into a 9.6 or 10 and go on. Yeah, you can backup and restore single entities like tables, schemers, databases, and restore them separately. Another thing is, and that's why we mentioned this at all, doing a PGDump all will read all of your database. So, if you have checksums on your PGData and you have this, yeah, that table that you look into once a year and you have a corruption on that, that will be revealed by PGDump all or PGDump. So, it's not that bad after all. Yeah, you can only backup and restore single point in time. It's rather slow, yeah, RTO, RPO, not what you want. It's like commuting in this. It will get you there when it starts raining. It might be uncomfortable and you will not be fast and comfy and so on. It's like writing your text with this or it's like doing your calculations with this. It still works when you have no power. You will need light for this one. But it will still work, right? After that we got the wall back in 7.1. I thought it was an 8, but no, 7.1. 8 added the ability to use the wall. We'll see that. We got point in pitter, which is not pain in the rear. Point in time recovery. We'll come to that as well. 9.1 added pgbase backup, which is a very comfy method to use that stuff. And we'll have a look at that later. Online binary backup. Yeah, I would like to just say, I'll do it this way, but you have to see something. Postgres is using the wall extensively for stuff. You can still go back and watch the stream, but still the wall is basically a logbook. A redo log as other databases would call it. Every change, everything that goes to disk first goes to the wall, except for the log files. At a checkpoint, and the checkpoint can be basically spread over hours, so it's not really a point. The content of the wall is written to the actual heap, so your actual data files, right? And that creates new row versions. Simplified. This is the wall, split in 60 megabyte seconds. At a checkpoint it goes to the heap. It goes to the shared buffer straight away so that you can actually use the data with other sessions. Selects go to the shared buffers. Insert update delete goes to the wall. And the people who actually know the code will want to kill me after this. But still it's simplified, right? So you get an idea. 16 megabyte segments. It's actually not a chain of segments. It's more like a ring that can also grow and shrink again. So whenever a checkpoint happens, actually when two checkpoints have happened, the database will start recycling wall segments. So they get overwritten with, actually they only get renamed. And then the check pointer will write to them. Check pointer. So that's in PGXLog as I learned on Friday. PGXLog got renamed to PGWall because, oh, file system is full. Let's delete some log files. I'm not kidding. So in channel zero it will be called PGWall, but I think the tools will not be renamed. So you will still have PGReceiveXLog. Anyway, size is determined by wall min size and wall max size. Oh my god, it's Boston. That's by default it's one gigabyte or two gigabyte, but those are soft limits. We'll come to that. The archiver. Wallwriter writes wall segments, wall segments, and are then read by the check pointer process. And in between, if you have it, the archiver will run. And we'll do something to them. And we'll come to that as well. PG Start Backup. To get the binary backup simplest way on a, it's just to have it mentioned, right? You call select PG Start Backup. You get a snapshot.  Since you don't want to do that manually, we go on. That snapshot goes to some area down here, which eventually goes to tape, hopefully. Or to something really durable, right? I was googling for tape. Do I need anything more? Like, yeah, okay, cool. I've got a copy of my database now. I can use that, right? Nope. You need all the wall segments that have been created since you started your backup. Why? Among other things, a reading from your database can create right traffic. I'm not going to explain that anyway. It does. So, hopefully, your wall segments are still there. If you have a busy database, do a lot of IO, they can have been recycled in between. Disaster strikes.  You don't want that. So what you want to have is something that will put the wall segments next to your one-to-one copy, and that would be the archive command. Then you can take this copy, your file system copy of your database to some new server, your restore target, and you will do a restore command in a file called recovery conf and tell it to fetch the wall segments and start that database. It will see, oh, I'm not complete. I need some wall segments. We'll fetch them from here, and then you're ready to go. And you're ready to go. Rather fast. If your database is small, rather slow. When your database is large, still like you need to copy the data, et cetera, and also depends on the amount of wall files. So in other words, the activity while you did your backup. RPO, similar to a PG dump, but this time it's the end of your backup. So the moment that you call PG, stop backup. Or, well, or maybe it's the moment when you stop the backup before. That should have been in PG dump as well, right? That last one. It's a one-to-one copy of your database. Rather fail-safe, rather fast. RPO is fine. Oh, wait. The RPO is fine, actually. Never mind. So that's RTO. You can still just, in this case, you can only backup and thus also restore a single point in time. And you can restore, save, backup and restore only a whole database cluster. So an instance of Postgres. Yeah, the recovery point objective. This time it should be RPO. Yeah, still not great. Better than the Abacus, but it's a little bit old school, right? And maybe a little bit too much effort to get. These are not really faster than a capable guy with an Abacus. So options to get that snapshot. You can, for example, do a file system snapshot, LVM snapshot. I know a company who do it like that. Oh, I've heard of one. Stephen is not here, right? Zoom Frost. So you can use R-Sync or you can use PG Basebacker, which you want to use. Right? Everything before is still in the documentation and you should know that you can use it, but you shouldn't. Options to get the wall segments. You can basically have two choices. The archive command. Well, you should have one anyway, but we'll get there. Or you can tell PG Basebacker back up to just fetch the log segments that appear during its runtime. So that would be with xlog method. You probably want to use stream. Okay. Use both. Or actually get used to both. You will have a wall archive. We'll come to that. So PG Basebacker back up, on the other hand, is also handy to set up a new replication slave, whatever. We'll also get there. So when you have a wall archive filled with your archive command all the time, you can just skip the separate backup of the wall segments during your backup. Okay? Why would I want to have a wall archive? That's waste of space. Oh, there's two red stars here. Delete from customers. Among other things, the wall archive will allow you together with that snapshot down here to do a point in time recovery. A pitter. Pain in the rear. Not. And for that, obviously, you need the snapshot and all wall segments. So everything that happened inside the database since you last took that backup. Okay? Makes sense? Good. So your restore target will now not access only the single or a few wall files down here, but you will just have a generic restore command that will fetch it from the wall archive anyway. And you can have that running all the time. That would be a warm standby server. So if you have one of these, say, as a poor man's replication slave, then it can also replay every wall file. That means you are 16 megabytes behind, but you are still quite close to your master database in replaying here. So your RTO goes down massively, massively. If you have a cold standby, like you have a server ready that can take over or can replay from the wall archive, it can still take hours, days, whatever. A warm standby will be up and running in seconds, which is good. Our PEO would be the last archived wall segment. So the master will only send finished wall segments towards the archive, so you will lose everything that happened after that was last sent. So that's why I would call warm standby as a poor man's replication. It's better than nothing. That will do the job like you can do. Text on those calculations, even play games, all fine, right? Works. Maybe a little bit outdated. Maybe you want more. Maybe you want binary streaming replication. That's a warm standby server on steroids. So the wall segments are actually not the wall segments. Everything that is written to the wall gets sent over the network straightaway. The transaction that you have in your wall segments or in that stream will be replayed immediately. That means ASAP. It can fall behind. So you skip all this way down here. You have a direct connection. Fastly simplified again, of course. But you have some options there. You can have synchronous or asynchronous replication, and you can choose on a transaction level if your current transaction should be committed synchronously or asynchronously. Usually for your forum entries or whatnot, you would say, OK, I think it's OK. But when you have a payment, you just set that transaction to be synchronous and that will only commit when it has reached the slave. And still you can choose between remote write, actually remote write on and remote apply. So do I want to commit my transaction here at the moment that the packet has reached the slave when the packet has been written to disk persistently on the slave or when the slave has actually replayed it and will serve the same information like the master? You can use replication slots. I would for now say, yeah, I know that they exist, but you don't actually need them when we're done here. They can be cascaded. We'll have a nice picture there. Slaves can serve read-only requests. You can even take your backup from a slave. But oh, I think I didn't finish there. There's some implications with feedback, et cetera, PPP. So if you don't really, really, really need that, never mind. Streaming slaves can be delayed. So if you have your analyst doing delete from customers, you can still hit the big red button on the slave and say, OK. So you have a 30-minute lag. You hit the big red button, configure your slave to just replay to that moment in time just before the delete from customers happened and then become the master. So that's quite handy. I've seen investment banking systems who had that in Sybase. Now I have no idea why software should come. So that's quite comfy and nice and so on. Still not exactly the full thing, but yeah, it's nice. Like you cannot put a PCI Express card in here. But it's good. It's nice. Works well. So options. You could have a master and one, two, three slaves that receive your replication stream. That's actually what I use in my day job. You could cascade them. Like this master replicates to that slave and that slave replicates towards that slave. And that could go on infinitely, almost infinitely, only like limited by your network connections, by your delays, et cetera, PPP. You get the idea. If you really want to do something like that, read the docs first, all 50 pages, please. And more. If you have synchronous replication like this, if you configure all three of these slaves to be synchronous replication slaves, there are some implications. Like when one falls out, falls down, your DB will still work and it will still serve read only request, but every commit will hang until you have enough synchronous slaves again. So if you have end synchronous slaves configured, have one spare server that is async, right? Because that can still take over and be declared as a synchronous slave. So you just have to catch up a few seconds and then you will still be fine. And then restore that n plus one's server as an async save or whatever. But you get the idea. So you still want to have your system running. And remember, disaster strikes, it does. Network latency. So if you have a synchronous slave in America and you're in Belgium, I don't know what exactly the round trip would be from here to New York. But half a second, something like that. Every commit will travel half a second and it will wait for another half a second until it gets a reply back. Do that with 10,000 TPS. You're fine. You're not well. So choose wisely, right? So you can still, again in Postgres, you can choose if your specific transaction should be synchronous. So you can have an async slave in New York, no problem whenever you have some payment going over. Make that transaction synchronous. It can wait for a second. That's fine. So choose where to put your sync slave, obviously. Same building, fine. No, same building. Of course fine. Same city, still okay, I guess. Same country. Different continent. Not a good plan. Pros and cons. Okay. Fail. You still have a one-to-one copy of your database and it's online. It's there all the time. You can just switch over and use that and carry on, right? It's reliable. It's battle proven. It's been in Postgres since eight, four, one, zero, whatever, for years. The RTO and RPO are obviously very good, right? So you can be up and running in seconds and you lose the last transaction in the worst case. So it's 99.999% availability is possible. On the downside, it works on whole DB clusters only, again. And, yeah, implications on network connection loss.  So, hey, replication. That sounds good. So I don't need backup anymore, right? And this wall archive, nah, I don't need that anymore, right? Replication does not replace backup. You need backup. Rate does not replace backups. Yeah, we have rate controls. We don't need backups. Nah, nothing goes wrong here. Okay, fine. The SAN does not replace backups. Even if it's a mirrored, net-up-based, whatever, SAN, no. The cloud, the rest of that sentence is actually, there is no cloud. Ask the FFV guys. Okay, you get the idea. So then let's combine it. You want a wall archive. You want a replication server, right? Maybe you want more than one replication server. Maybe you want to have one of them or N of them sync. Maybe you want to have a replicated server that is delayed by 30 minutes or maybe even a day or whatever. Maybe you even want to be cascading. Like have a sync slave in the same data center and have two more slaves in the other one. And since bandwidth is not free sometimes, you might want to have those cascaded so you only send the data over the countryside once. Then you have a minimal RTO and you have the closest possible, if you have one sync slave, RTO, or the closest feasible if you are not using a sync slave. And you probably have some protection. Oh, that's missing two stars. Right. Against the delete from customer statement. And you can on top allow read-only queries like reporting, analytic queries, et cetera, pp on one of your slaves and you're not interfering with your OTP stuff. That has some implications again, but that's not covered here. So this is basically what you want. Have a master, have at least one slave, a stream that's feeding the slave. You have an archive command that will put all your walls to the wall archive and you have a restore command that the slave can still use as a fallback option to get the missing wall segments from the wall archive. It's also, you should always configure it to be able. I've read wall stories of customers that were running with replication for years and the replication actually did not work, but they were happy because they still had the archive which was fetching wall segments. They never realized there were 60 megabytes behind, but it worked. Fail again. So you get all of the replication and all of the wall archive pros. That's good, we want that. Still, the major version between these major version has to be the same. So if you're running 960 here and 961 there and you copy the stuff back, you can still run on 960. Don't have to upgrade the binaries first. So that's more like what you want. Current system works like a charm and you can still run Haiku on it if you want. Or a decent operating system, a nice one. Or it's more like this to come back to the commute stuff. It does most of what you want, but you can still change to manual drive and take over control. So what do you have to do there? How much time, by the way? Three? Twenty minutes, oh cool. Fine. After all, we're the last talk. I only have to go back to Münster in Germany today. I'm not going through all the details, but this I would recommend you to just set up in general even if you don't have replication or wall archive in place yet. Put this in puppet or whatever your configuration management does or something similar at least. So set these options in PostgreSQL Conf. Set the wall level to replica. It does add a little bit on top of minimal, but it's not that much. And if you can afford a few megabytes more, just set logical straight away. That adds a little bit more overhead as well, a few percent. Set archive mode on. That just means call the archive command whenever you finish a wall segment. And as archive command, if you write the docs, it says the minimum feasible command is something like cp. Put a script name in there. Like really put your archive script in there with %p, %f. That script could just do an exit zero by now, but have it there, right? And put this into your PostgreSQL Conf. Set max wall senders while you're there. PostgreSQL 10 will have 10 as a default as far as I remember. Right now it's zero. Max replication slots just the same. Just put them in there. They don't hurt you. And synchronous commit. Up to here everything is start time parameters. So except for the archive command. Set wall level is not changeable on the runtime. Archive mode not. Max wall senders, max replication slots all require a restart and we don't like restarts. Not at all. Set synchronous commit on a new server to local. Just for now. Like until you have everything set up, you can just say, okay, I want to commit synchronously locally. You do want that. Most probably. And set synchronous standby names to an empty string or even put your synchronous standby names. That's basically the name that a slave comes to the master and says, hello, I'm slave Bob. Do you have anything for me? And if you then say Bob here, it will take Bob as a synchronous slave. If you put that in, it will not hurt you right now because you have synchronous commit set to local. That's why I recommend setting local for starters. Also.  Right. So configure your slave on the master. Straight away. There's some more settings that you will probably want to touch. But anyway, this one is important and set lock collector to on. We'll come to that. Then go and set up your wall archive and don't roll your own. There's a lot of smart people out there who have done that for you. Use PG Barman, use PG Backrest, use wall E. And there's a couple more. I don't remember most of them. I'm personally a fanboy of PG Barman. Basically because I use it. It's okay. I mean, Backrest is more or less has more or less the same feature said wall E will send your wall files to Amazon, to the cloud. Oh, that's two stars missing there. Whatever. Follow the setup instructions. Most of them are documented quite okay. Don't roll your own. Don't just don't take that time and invest it in thinking about how much redundancy you have and want to have, how much persistence or about persistence in general. We come to that and data safety. Your DB server is certainly not the right place to keep your wall archive. That should have one star and two stars, whatever. Well, the example in the doc says CP. If that's not an NFS share, it's on the same server. It also says the same server is not a good place, but still, yeah, should have been mentioned. Even the same data is a bad choice. Like if a plane crashes or the power plant blows up or whatever, disaster strikes, missing a red star, unless you have a mirror like maybe a sign that mirrors by itself, whatever. So what should that your archive script look like? I will not give you one. One of the reasons why the archive command and the restore command are not like there's no default for that. Not even in the docs because everybody's environment is so different and you cannot cover it all. You can't even try. I think some commercial vendors will try or do try and then you have some different backup solution for that database and so on and so on and that's not what Postgres works like. Archive command. You can write, asking, blah, whatever, into your Postgres queue account, stick up it and it will run that from then on. But yeah, even if you have some error checking, it will not fit, right? So put in a script. The script can just be changed. So next time the archiver runs it, it will be running the new version. Purpose, somehow get the parameter %p to your wall archive as file. So p is a complete parse to the wall file and f is the file name on its own. Comfy, you don't have to split it yourself, so give it both, right?  I think it's actually not a bad choice in my personal opinion. But you have to make sure that f, so the file name of your wall archive, archiving that you want to archive, is not existing yet on the server. Otherwise, well, two stars. You clone your slave by file system copy or whatever and it will start up and run the same script and have the same destination server, the same destination directory and it will receive different updates and then you have conflicting rights on the same wall segment. Nah, not what you want. So make sure that does not exist yet. Call sync. We'll get back to that. Or maybe you want to have... Maybe you want to have that part on a file system, on a remote server that is mounted sync. And what I actually ran into, which led to this talk, is our sync tends to give you return codes of 255 or so when it cannot resolve the name.  Like, ooh, archive of what received archive command return 255 exiting. So, ooh, what fatal, fatal, fatal, fatal. It's the highest level before panic that you can get. Most probably all red lights in your monitoring will go off blasting and yeah, that's not nice. So filter those, right? Don't return anything larger than 127 straight away because otherwise you will have fatal log entries. That's it. At the end of the day, the archival will try and try again except you return zero. When you return 128, it will exit, start again and try again. So not really a difference except that you have a fork in between the log entry. So make sure that you never, ever return zero before you have done the job proper with your script. Sound simple? Actually, it is simple. Unless, of course, yeah, well, when you're still setting everything up and so on, you have an exit zero in the first line. Set minus e, et cetera, you get the idea. Why we turned log collector on is that if you have log collector on in the PostgreSQL command, anything that the archive command will send to standard out and standard error will end up in your PostgreSQL log. Otherwise, it will end up in def zero, def null. Sorry, def zero, def null. So that's not where it belongs. So log collector will collect that and put it to your log. You want to have that. Okay, fail again. But we can start with that, right? It's got two stars. Remember that whatever you do, cp, scp, rsync, copy via NFS, you are probably writing into some page cache. So when rsync finishes, that does not mean that your wall segment has been persistently written to disk on the remote server. It just means that it's in Linux page cache and it can be there for the next 30 seconds or five minutes or whatever. So that's why I said always call sync. NFS is usually async. That's even worse. They're somewhere in the network buffer except you mount sync and then it gets terribly slow. So then when you mount sync, NFS is not really an option anymore, my opinion. But your backup and your wall archive is not safe until it has been flushed to persistent storage in a safe location. So scp to your remote server, the data center goes down and you have lost data at that particular moment because it is still in the page cache of your wall archive server. So that's why you sync. And same goes for the wall segments. I wanted to really, really, really make sure you got that. It's the same sentence. What's the last one? That is in a perfect world, but if your personal RTO and RPO requirements are not that high, mounting something sync is not too effective usually, so you will probably make some compromises. But know about the implications. Remember, you might still lose data. Okay? That's why there's two stars. Humans.  Activate your barman cron job, whatever. No. Remove the exit zero. And watch it. Make sure that you really, really, really write your wall segments to the archive. PG switch X lock. X lock is a function that you can call and it will start a new wall segment and archive the old one. So you can check that if it works. If it does not work, you might run into trouble after a while because Postgres will not throw away any wall segment it has not archived. So if you have a script that does the job right, but does not return zero, Postgres will try to run that over and over again and not throw away the wall segment and then you get called out of bed in the middle of the night because this space is gone or out of this space. Replication slots, by the way, just work the same way, so they will not throw away any wall segment that has not been sent through all replication slots. Keep that in mind if you want to use replication slots. So now try full backup. You are using a tool, promise. You're using a tool, so that would be, for example, if you're using barman, run barman backup all and just watch and check that everything works, right?  Cool? So you have to do something on the PGHP ACON to allow for replication, but you probably did that already when you configured barman or your wall archive because many of them use replication now as well.  Stop it first, maybe. Really do RM minus RF in your new Valepi, PostgreSQL, 9.6, main, whatever. You don't need that to scratch it, but you have a PostgreSQL account, the PGHP ACON, et cetera. In the right location, in its scripts, you can already set up. Yeah. So make sure that you have copied your PostgreSQL account, PGHP ACON, et cetera, over so that your slave will actually work if you promote him to be the new master. And then run it. No, run PG-based backup, actually. First you have to do the copy. So you run PG-based backup on your new slave, let's say tell it to fetch the x-log segments via stream, give it your host, give your user, and so on and so on. And you give it the new PG-data directory, Valepi, PostgreSQL, work, whatever. And it will just copy everything over and provide you with a running instance and because you have given minus R, it will also create a recovery font that will basically work except that you will probably want to add a restore command which enables the new slave to fetch missing wall segments later from your wall archive. Start, enjoy. Rinse, repeat, next slave. Maybe you want to have that async or sync or delayed or whatever. It's not really that hard. Now start looking for software to manage your application. Again, a lot of smart people have done that job already. Don't roll your own. It's not necessary. Wrap manager is, I think now five years old or something, open source project, actively maintained. Path by Dalibor, which is a resource for, what's it name again? What's that Linux HA manager? Pacemaker. It's a pacemaker, so it's PostgreSQL automatic failover. That looks promising. Pacemaker itself has a PostgreSQL resource, but that will mangle with your PostgreSQL account. You probably don't want that. PG Lookout, I actually don't know. I've got that from the Wiki. There's Wiki pages also for the archiving part, so that's a good place to start probably. Or if you are like me, you probably do not rely on some kind of software to assess your high availability, but do it yourself. We don't have that many instances. If you're around 8000 PostgreSQL instances, you probably want something like that.  Logical replication. I'm only mentioning it because it's not yet done, and I can only like, the guy who wrote it is over there could be awkward. Right? But still, logical replication in the not-so-recent past would have meant that you were using Sloney, Bucardi, Bucado, Sky Tools, and what they have in common is we're all gonna die. It's not that bad actually, but still, like, since they are based on triggers and have a lot of options and so on and so on and just keeping track that you replicate everything that you want to replicate, etc., that's the pitter to get back to that point. So yeah, I don't know. Wait for 10. 10 will have logical replication or use PG Logical. Now, if you want logical replication, as mentioned, if you ever, ever plan to use logical replication, set up your wall level to be logical right away because then you can, like, use it later maybe to do a point-in-time recovery and start your logical replication from that and so on and so on, it will allow, or it does allow, nice things like rather painless, low or zero downtime version upgrades like switching from 9.6 to 10 or 10 to 11. Goes to 11. Things like sharding come to mind, collecting data from different OITP databases into your data warehouse, multi-master application, etc., Gucci has covered that part quite extensively. When it is in court, it will be like that. You still have to know that you are in a three-dimensional world and that you have to, like, watch out for trees and so on, but it's much, much more comfortable than this, right? Okay. Hopefully, better. Famous last word.  There are so many smart people who have done all that before and you can only fail where they failed already, right? So, test your backup procedure and even more important, yeah, we're great at backup, but we're bad at restore, right? On a regular basis. And make sure everybody in your team knows how to restore, even maybe knows how to do a point-in-time recovery. Don't have that guy that is now on holiday in Northern India for four weeks. Be the only one in your team who knows how to do a point-in-time recovery, right? Monitor your logs and your legs, monitor your replication legs. That's what I mean here. So, if you fall six hours behind, maybe check earlier. Make sure your conflicts aren't synced.  That means you have a cold startup. Not good. Okay, in case of disaster, keep calm and just carry on and do not try to do LVM, snapshot, restore, whatever. That's it. Fit quite well, only five minutes over.


Let's talk about vital signs. So the rule of thumb here is you need to be updating the vital signs for patients, especially blood pressure every two years. But if somebody has higher blood pressure or even lower blood pressure or it's being monitored, then it's best to do it at least once a year. So I'm going to go over the different vital signs. So blood pressure, pulse, respiration, what's normal and what is not normal. So let's just flip through here. So blood pressure, the main things that you need to know is that this is the force that is exerted by blood on the walls of the blood vessels during contraction and relaxation of the heart. So it's basically the force that's pushing the blood out. If there's not a lot of force, that's not a good thing. If there's too much, that's not a good thing either. Another thing to keep in mind is blood pressure can increase if somebody's been exercising. If somebody's been running outside, it's a super hot day, then the blood pressure can increase.  No, but it needs to be monitored. So for example, if you have a patient who's been running to their appointment because they were late for their teeth cleaning and then you go to take their blood pressure and it's unusually high for them, ask them questions, kind of go, oh, your blood pressure is higher today. Is there a reason for that? Have you been exercising? And then they would likely tell you, well, I just ran to my appointment for the past 20 minutes. So that makes sense. Then it might be best to take the blood pressure at the end of the appointment just to double check. What I normally do is even if the blood pressure is high or low at the beginning of the appointment, I'm going to take it again at the end of the appointment because patients are likely nervous or I don't know about you, but I'm like this too, where if somebody's taking my blood pressure, for some reason it just makes me, maybe nervous isn't the right word, but it's going to be a little bit higher than normal. So take it at the end again, just to make sure that the reading is correct. So then two things you need to keep in mind. And I have highlighted them here at the bottom for you. So systolic pressure, this is the force that is exerted during ventricle contraction, the highest pressure in the cardiac cycle that's going to be the top number. The bottom number of blood pressure is the diastolic pressure. This is the resting pressure, which occurs during ventricle relaxation. This is something you need to know, the lowest pressure of the cardiac cycle. So you need to know the differences between systolic and diastolic. So systolic again, basically it's the highest pressure. It happens during ventricle contraction, whereas diastolic pressure is the resting pressure, happens during ventricle relaxation. So those two things you need to keep in mind. But now let's talk about the pulse. So the pulse is obviously, this is when the diastolic pressure is subtracted from the systolic pressure. So your pulse, your heartbeat in other words. So hypertension is when the blood pressure of the pulse is too high. Hypotension is when it's lower blood pressure. So when you're taking the blood pressure, which we have talked about in the previous one here, maybe their blood pressure is too high, which is called hypertension, or maybe the blood pressure is too low, which is called hypotension. If it's normal, it's normal. If it's too high, too low, you need to make a note of that as well. So normal, with children it does vary on the age. So let me talk about adults next. So basically normal is when the systolic reading, which is the top number, is 120 millimeters of mercury and diastolic is less than 80 millimeters of mercury. If it's 120 over 80, I consider that normal, but of course there's going to be slight variations. If it's 121 over 82, am I gonna think that's too high? Probably not. If it's 119 over 79, am I gonna consider that too low? Probably not. But this is kind of a baseline of what's normal. And as I've mentioned before, blood pressure should be checked every two years because a lot of patients don't go to their family doctor once a year, but they're coming to you for teeth cleanings or whatever dental work they need done. It's good to let them know what their blood pressure is, because if it's too high, you should really tell them and then let them know you should go see your doctor. That could be a sign of something more serious happening. Okay, you guys, so management. This is a common question that I get is prehypertension. What is that? So basically if the top number is between 120 to 139, the bottom number is from 80 to 89, that's considered prehypertensive, okay? So is that cause for concern not necessarily no, but remember you guys, normal is 120 over 80. So anything above, it's not bad, it's not good, it's not bad, you know, but it's considered prehypertension, prehypertension. So if it gets higher, we need to make a note of that, okay? So then we talk about the different stages of hypertension, so stage one. So clients are considered stage one when that top number is 140 to 159. The bottom number, 90 to 99. Keep it simple, this is stage one. So if you're taking the blood pressure reading and you know what the numbers are, you have to put them into a category. Is it normal? Is it prehypertension? Is it stage one or stage two? Depending on the textbook you have, there might be three stages, there might even be four stages or there could be two stages. So it really does depend, but this is a good kind of baseline because you know, prehypertension, as I said, is 120 to 139. For the top number, the bottom number, 80 to 89. Well, what if it's a little bit more? Well, is it higher than 159? Then you're putting them into stage two, okay? So I would make a note of this because it's good to know stage two, I would be more concerned that's extremely high. They should be going to their doctor. Maybe even the hospital, honestly. These days it's very hard to get into see a doctor. You don't want somebody having a medical emergency when they go home alone or maybe there's nobody else there. They're in stage two, hypertension, they didn't know. You don't wanna clean their teeth. You don't want them having any dental work at all because any additional stress might send them over the edge and there could be a medical emergency. So you need to be aware of stage one and stage two. Now, let's talk about temperature. So normal for children and adults, I typically tell people it's lower than 100, okay? Keep it simple. It is lower than 100 degrees Fahrenheit. Anything above that typically means, uh-oh, like something's happening, they have a fever, they need to take Advil, Tylenol, whatever, but anything above 100 is not good. Anything I tell patients 103 or higher, be careful because you might be taking them to the hospital very soon, something is wrong. Pulse, you guys. So let's talk about the pulse. So we talked about the heartbeat before. We talked about blood pressure, but let's kind of put it down now into the pulse. So the pulse is the force of blood through an artery created by a heart's contraction. So the heart is contraction. The heart is contracting, okay? So that is the pulse. It is either fast, slow, regular, irregular, full, strong. In the dental office, we're not as concerned with the pulse and kind of is it fast, slow, steady? We're just more concerned of how many beats per minute, okay? That is the main thing for us. So how many beats per minute? For children ages one to 10, 60 to 140 is normal. It tends to have more than an adult. So, but if you're looking at children that are 10 years or four to adults, normal is 60 to 100. So think adults, okay, think 60 to 100. For children, just to keep it simple, think 60 to 140. So if it's higher for children, that is normal because they have a pulse that is going to be quicker. But you need to know also tachycardia, which is when there is more than 100 beats per minute. If it's too slow, less than 60 beats per minute, that is this one here, bradycardia. So bradycardia and tachycardia has to do with the pulse. Not with the blood pressure has to do with, well, I guess it kind of does, but has to do with the pulse in this case to keep it simple. Respiration, so how the client is breathing in and out. When you're checking this on your patient, don't tell them you're checking because their breathing tends to change. What I do is I'm going to go and check the pulse. I'm going to count it for 30 seconds and then times that by two to get to one minute. The other 30 seconds, I keep my fingers on their pulse, but I look at their chest to see what's happening there. And then I count for 30 seconds the respiration. They don't know I'm doing it. It's not going to change. That way you can really determine what it is properly because if they see you doing it, their breathing is going to change and then you can't really get a proper baseline of what it should be, okay? So normal is 12 to 20 for teens to adults. For preschool children, 20 to 25. Older children, 15 to 25. So the rule of thumb here is children breathe faster. That's normal. Teens to adults is typically up to 20 is normal. Now for the American Society of Inesitesiologists, this is when if they're putting the patient to sleep for say the wisdom teeth, dental surgery, whatever, they look at all of the different vital signs. They look at the blood pressure. They look at the pulse. They looked at all of that. And then they kind of look at other things too. Do they have asthma? Do they have diabetes? Do they have high blood pressure? So these are all of the different categories that you need to be aware of. Feel free to take a screenshot of this. If you want, I have summed it down to it being very simple. So ASA one, two, three and four. So basically one is normal, they'll be fine, okay? There's no extreme diseases. They can handle it. They don't have high blood pressure through the roof. They'll be fine. Class two is basically you can tell they're nervous. They might also have diabetes, asthma or hypertension, but they're still okay. You're not worried about it. A lot of people do have dental anxiety, but does that mean they can't be put to sleep? Well, those people should be put to sleep because they're anxious, but can they handle it? Maybe, maybe not. This is kind of what they look at. Stage two is okay. Stage three though, okay? So this is when somebody has a lot more going on. They might have had a heart attack or there's a greater chance of having one because they have angina. They might have diabetes, but it's controlled COPD. They might have trouble breathing overall. Hey, they might even be a heavy smoker. So they can probably do routine dental care, but there's going to be a risk. You're going to monitor them for medical emergencies. And class four is there's a lot going on. They've had a heart attack six months ago. They have a lot of chest pains. Perhaps they have diabetes that's not controlled. They have high blood pressure. You should not be doing any dental care on them because they need to get their disease or their condition under control first. So you guys, I hope that helps. Let me know if any questions, kind of just to sum it up, blood pressure. What's normal? You need to know what's normal. What's too high and what is too low because as dental professionals, we need to be able to prevent a medical emergencies. And that starts with the vital signs. If you're not taking vital signs, you don't know how healthy the patient is. Even if the patient says they're healthy, they might not be because they haven't had their vital signs taken. They're not going to the doctor. So definitely something that we need to be aware of. So let me know you guys if any questions and I'll talk to you guys in the next one.


In the PC tool section of the downloads, there should be an application called PCScope. If we now open our PCScope tool by double clicking on stm32scope.exe, we will see a nice scope trace that has automatically connected to the COM port that you have just initialised in the stm32f7 board. At the moment you're just picking up random noise that is available on the board which is fairly small in comparison. We now need to attach something to our analog input. The analog input we are using is PA0 which is the top pin of the bottom left header on the underside of the board as shown in the diagram. Once we connect an item to this pin the noise level on the screen will change slightly and as soon as we touch the end of our connected wire to provide additional noise onto the analog input that we are measuring a significant change should be visible in our scope trace as shown on the screen.


Coronary circulation supplies nutrition to heart and normal coronary circulation is approximately 5% of cardiac output. That means it comes to around 225 ml per minute. Now this coronary circulation will increase depending on the demands of the heart. So whenever oxygen requirement increases the coronary circulation can increase up to 3 to 4 times. So that much increase in coronary circulation can occur. However there are certain special characteristics of coronary circulation which we should be aware of because these are important in the various disease processes. So we will be dealing with different characteristics that first of all coronary arteries are end arteries and there is high capillary density in the cardiac muscle. We will see each of them one by one. There is presence of physiological shunting. Then what is the innervation of the heart and how it is important for regulation of coronary circulation. Then flow is directly coupled to oxygen demand because it has high oxygen extraction. Then how auto regulation of coronary circulation takes place and something about phasic coronary flow that is there is difference in coronary flow during systole and diastole. So let us talk about each of these characteristics of coronary circulation one by one. So first is that the coronary arteries are end arteries meaning meaning hardly there is any anastomosis in the arteries. So you see here in this diagram are shown major coronary arteries that is the right coronary artery and then there is left coronary artery. Both of these arteries arise from the root of aorta root of aorta and then you see left coronary artery where it is supplying it is supplying the anterior part of the left ventricle and the lateral part of the left ventricle while right coronary artery is supplying the right ventricle and also this branch is growing posteriorly. So posterior part of the left ventricle also is supplied by right coronary artery in majority of people. Now I am not going to talk about the anatomical aspects of these arteries we will restrict ourselves to physiology only. So yes I was talking about that these arteries are end arteries so these major arteries you see there is hardly any anastomosis between the arteries. The end of these arteries are supplying a particular area and there is no overlap in the supply. So that means if a particular coronary artery is blocked the area which is supplied by that particular artery there will be decrease in blood flow in that particular area. But one thing we should remember here that this anastomosis is lacking mainly in the larger arteries of the coronary circulation. When we talk about the division of the arteries you see the arteries are dividing there is presence of many anastomosis when we consider the smaller branches very small branches of these arteries which are basically in size of 20 to 250 micrometers there anastomosis is present. So yes the blockage of the major artery will lead to ischemia and ultimately infarction but some salvage is there because of the collaterals present in these smaller arteries. Also if the blockage develops slowly in these larger arteries then these anastomosis in the smaller arteries actually increase and that can little bit prevent the damaging effects of this slow blockage which is occurring as in case of atherosclerosis. However remember that as the blockage enlarges that anastomosis may not be sufficient to prevent the infarction of the cardiac muscle. Coming to another important aspect as far as these arteries are considered you see we were talking about these arteries which are present on the surface the major arteries and then the branches of these arteries dip into the cardiac muscle so there is dipping and just below the endocardium there is sub endocardial arterial plexus. So there is heart chamber right so the surface of the heart is supplied by these epicardial coronary arteries then there is these intramuscular arteries and just below the endocardial region there is sub endocardial arterial plexus. Now you see the heart chambers have blood but the oxygen which is present in this blood is not sufficient to supply the all layers of the heart instead the endocardial region which is the innermost lining see there is endocardium myocardium and there is epicardium so epicardium is the surface and here blood is present so this blood is capable of supplying oxygen only to a very thin layer of the endocardium rest area for that coronary arteries are important. Now why I am talking about this epicardial and sub endocardial arterial plexus because you see when there is contraction of the heart there will be compression right the muscles will contract and this sub endocardial arterial plexus will get compressed because it is present within the muscle just below the endocardium so it will get compressed and that will decrease the blood supply of the heart especially when the heart is contracting that is during the systole. We will talk about this concept in detail later on little bit more. Coming to the next characteristic that this cardiac muscle has high capillary density you see if we compare the capillaries in skeletal muscle versus that of the cardiac muscle what we are seeing here that say suppose that this is a schematic diagram showing these larger circles as muscle fibers and in between there is presence of these capillaries on the other hand if we see the ratio of capillary with the muscle fibers this ratio is much more in case of the cardiac muscle so number of the capillaries is increased in case of the cardiac muscle and this is important because the main mechanism for increasing the blood flow to the heart when the demand of the heart increases oxygen demand increases then it is mainly by increase in the blood flow then you might be wondering then it is same in other organs as well yes it is there but other organs also increase the oxygen extraction you see that in arteries blood is 100 saturated with oxygen but in veins how much is the saturation is it fully deoxygenated no in veins also it is 75 oxygenated hemoglobin is 75 saturated with oxygen so that is because the cells are not fully extracting the oxygen from the hemoglobin but this oxygen extraction is very high in case of the heart so for heart main mechanism to increase oxygen supply to the tissue will be by mainly by increasing blood flow only for other tissues they can increase the extraction of oxygen from hemoglobin as well so there are two mechanisms but for heart because of increased resting oxygen extraction it cannot increase it much further when the oxygen demand increases coming to third characteristic that there is presence of physiological shunting that means all the coronary circulation after supplying to the heart it doesn't get oxygenated by passing via the lung cell see it is venous blood right it should pass via the lungs there should be oxygenation and then it should go to the left side of the heart but if we see the distribution you see here there is coronary arteries arterioles capillaries veins and yes there is coronary sinus or anterior cardiac veins which drain into the heart chamber and this coronary sinus anterior cardiac veins mainly drain to the right side of the heart so they drain into the right atrium so this blood is going to enter into the right ventricle and then pass via the pulmonary circulation to the lungs and then enter into the left atrium but there is other pathways also you see this coronary artery directly drains into the heart chambers some of the arteries directly drain into the heart chambers by means of arterioluminal vessels and also there is another pathway arteriosinocidal vessels which also drain into heart chambers directly and this is not limited to right side of the heart some of them drain into the left side as well both into the left atrium and left ventricle as well so what will happen that that particular blood is not getting oxygenated in turn it is mixing with the oxygenated blood which is present in the left atrium and it is decreasing the oxygenation of the hemoglobin so that is known as physiological shemping coming to the innovation of coronary arteries coronary arteries are innovated both by sympathetic and parasympathetic nerves where sympathetic nerves release epinephrine and norepinephrine and parasympathetic nerves release acetylcholine now this norepinephrine which is released from sympathetic nerves acts on alpha receptors and is responsible for causing vasoconstriction on the other hand parasympathetic supply causing increase in acetylcholine release causes vasodilation so that is the direct effect of activation of sympathetic and parasympathetic nerves however this doesn't happen in heart this is not the effect which takes place in heart actually with increase in sympathetic nerve action there is vasodilation why is it so that is because of the indirect effects when there is increase in sympathetic stimulation direct effects causes vasoconstriction because of the action of norepinephrine on alpha receptors but this sympathetic stimulation also increases cardiac activity because of the action of epinephrine on beta receptors where it will cause increase in the heart rate and increase in the contractility so this in turn is going to increase the oxygen utilization and decrease local oxygen levels in the coronary circulation plus because of increased heart activity there will be increase in the production of metabolites that is there will be increase in carbon dioxide hydrogen ions adenosine potassium ions all this will increase locally and because of fall in oxygen levels and increase in these metabolites there is vasodilation so this is the indirect effect which is more potent so sympathetic stimulation directly causes vasoconstriction but physiologically this is not seen what is seen is vasodilation because of the increased heart activity similar thing happens with parasympathetic stimulation parasympathetic stimulation directly will cause vasodilation but parasympathetic stimulation will decrease heart activity causing decrease in oxygen utilization and this metabolite production will also decrease so basically major effect will be vasoconstriction so remember that the effect of sympathetic and parasympathetic stimulation mainly is because of their indirect effect rather than the direct effect coming to very important concept of phasic coronary flow that is coronary flow is different in systole versus diastole so let us see how it is different and what is the difference between left ventricle and right ventricle so in this graph you see x axis is showing time in seconds and y axis is showing coronary blood flow in ml per minute and also is shown aortic pressure in millimeter mercury now you see in systole systole this is the time this is the phase systole what is happening in left coronary artery coronary blood flow is falling it is decreasing but it is much more in diastole right why is it so see blood flow depends on perfusion pressure that is there is a gradient of pressure from aorta that is from where the coronary vessels are arising to the region where it is flowing so we are talking about left ventricle right so left coronary artery what will be the perfusion pressure see they are arising from the root of aorta so the pressure which is pushing will be the same as that of the aortic pressure that is 120 millimeter mercury and how much will be the gradient will depend on the left ventricular pressure so during systole left ventricular pressure is how much it is 120 millimeter mercury right that is the maximum pressure so you see how much is the pressure gradient it is zero millimeter mercury so zero pressure gradient is there so there is almost no blood flow during systole so this is during systole what happens in diastole in diastole the pressure in aorta will be 80 millimeter mercury and that in left ventricle it will be zero millimeter mercury yes that is the minimum pressure in the left ventricle during diastole so how much is the perfusion pressure it is 80 millimeter mercury so you compare when will the blood flow occur in the diastole because the perfusion pressure is 80 millimeter mercury however same is not the case on the right side which is supplied by right coronary artery you see in the graph flow is more in systole as compared to that of the diastole why is it so because again you see in right ventricle this right coronary artery is arising from aorta only so pushing pressure will be 120 millimeter mercury but what is the right ventricular pressure maximum right ventricular pressure during systole it is only 25 millimeter mercury okay so the perfusion pressure will be 95 millimeter mercury on the other hand in diastole how much will be the pressure aortic pressure in diastole is 80 millimeter mercury and right ventricular pressure again it is zero millimeter mercury so the perfusion pressure becomes 80 millimeter mercury so you see perfusion pressure is more in systole in the flow for right coronary artery so that is why in right coronary artery flow is more during the systole so what is the implication implication is that left coronary artery the region which is supplied by the left coronary artery it is not getting any flow during systole and it is only during diastole that this flow is reaching that musculature now when the contraction is occurring that time oxygen becomes less and the metabolites are accumulating but during systole these arteries are compressed also we have shown that diagram before that how subendocardial vessels will be compressed during systole so these are all compressed but during diastole when that compression will be released and the perfusion pressure is present in that time the flow is going to increase both because perfusion pressure is there and depending on the strength of contraction the metabolites would have accumulated which will dilate the arterios so there will be increased flow during the diastole but suppose when the heart rate increases what happens then the time of the diastole duration of the diastole decreases so there is less time available for the blood flow to occur but you see even heart rate increases and the metabolites also increase so the dilation will be more so even though there is less time available for coronary flow the dilation of the arterios will ensure that the blood flow is reaching the musculature however this will be compromised if there is some block in the vessels so during tachycardia the person becomes more prone for ischemic damage and that too especially in the subendocardial region because these are the vessels which are compressed during the systole second thing is that in case of aortic stenosis when the aortic valves are stenosed in that case left ventricle contracts much more powerfully so that it can overcome the resistance which the heart is facing right so that resistance has to be overcome that blood has to be ejected into the aorta so left ventricle contracts much more powerfully so oxygen demand is increasing much more in case of aortic stenosis so that's why aortic stenosis again makes the person more prone for ischemia again in which region subendocardial region because these vessels are compressed can you tell what will happen in aortic regurgitation aortic regurgitation is a state in which aortic valves are not closing properly so during diastole the blood is flowing back into the left ventricle so is it harmful for coronary circulation yes it will be harmful because you see during diastole this is the perfusion pressure which is being maintained so when the blood flows back into the left ventricle this diastolic pressure is going to decrease much more so that means the perfusion pressure during diastole is going to decrease so the coronary circulation during diastole is going to compromise so that will also make the person more prone for ischemia so that was about various characteristics of coronary circulation but before ending just one concept of auto regulation i want to talk about that yes we have said that there is auto regulation depending upon the oxygen requirement of the heart but suppose oxygen requirement of the heart is not increasing say suppose the heart is functioning normally but there is increase in the blood pressure so this increase in blood pressure will it increase coronary circulation yes perfusion pressure is going to increase because aortic pressure is increasing perfusion pressure is going to increase so it is going to increase the coronary circulation but that doesn't happen between 60 to 200 millimeter mercury of mean arterial pressure coronary blood flow remains constant if heart activity doesn't change and why does that happen this is because of myogenic auto regulation myogenic auto regulation so whenever there is increase in the blood pressure what happens there is increase in the stretch of the vessels okay so vessels is stretch the wall of the vessels is stretch now this wall is stretch it causes increase in calcium entry within the vessel wall and this calcium is important for contraction so as the calcium entry increases in the muscle there is muscle contraction so muscle contraction of the vessels what it is going to cause it is going to cause vasoconstriction so you see that the stretch is basically causing vasodilation right it is causing mechanical vasodilation it is stretching the wall but because of some physiological phenomena there is increase in the calcium entry actually there is mechanogated calcium channels mechanogated so they are detecting the stretch and they open when there is increase in stretch so these mechanogated calcium channels open there is increase in the calcium entry and this causes reflex vasoconstriction but remember here I am talking that heart activity is not changing so depending on the requirements of the heart it is the metabolic theory of autoregulation that is the metabolites which are causing change in the coronary circulation so that was all about the features of coronary circulation hope you got the concept thanks for watching the video if you liked it do press the like button share the video with others and don't forget to subscribe to the channel physiology open thank you


Hey director, how's it going? Question for you. What was your best job? My best job was the job I had putting myself through college and law school, working in a lumber yard. What made it a good job? It was a good job because I had the ability to work with really good people in a really safe and productive work environment, making sure that we had the tools that we needed to do the job that still stayed safe. So generally, what's your definition of a good job? To me, a good job is a job in which the employer provides you with those tools so that you have a safe and healthy workplace. Also, if you should happen to become injured, that you have workers' compensation benefits so that you don't fall into poverty. But then also having a workplace where you're free from discrimination, mistreatment, and also making sure that there's fair and equitable pay for everyone.