FireflyFOSDEM PGDay 20232023-02-032023-02-053https://www.postgresql.eu/events/fosdem2023/schedule/08:3000:30OtherRegistrationhttps://www.postgresql.eu/events/fosdem2023/schedule/session/4248/09:0000:20Brussels Ballroom 2Welcome and Openinghttps://www.postgresql.eu/events/fosdem2023/schedule/session/4252/Magnus Hagander09:2000:50Brussels Ballroom 2LFMF: how a CREATE INDEX CONCURRENTLY led to a 6 hour downtime*War story time!*
My client - who prefers to remain unnamed - introduced a new table with an ON DELETE CASCADE foreign key. Which wasn't backed by an appropriate index.
Creating that missing index (and a couple of bad decisions, some of them many years in the past) led to a downtime of about six (!) hours.
The talk
* *describes* what happened
* then *explains* what happened and
* shows which decisions - by the client, the DBA (me), but also the PostgreSQL developers TBH - caused the catastrophic course of events
Obviously, we'll also discuss the lessons learned and which measures were taken to prevent a reoccurence.
This completely took me by surprise (and what an unpleasant one!), so:
*Learn from my fail!*https://www.postgresql.eu/events/fosdem2023/schedule/session/4167/Gunnar "Nick" Bluth10:2000:50Brussels Ballroom 2Securing PostgreSQL From External AttackThis talk explores the ways attackers with no authorized database access can steal Postgres passwords, see database queries and results, and even intercept database sessions and return false data. Postgres supports features to eliminate all of these threats, but administrators must understand the attack vulnerabilities to protect against them. This talk covers all known Postgres external attack methods.https://www.postgresql.eu/events/fosdem2023/schedule/session/4148/Bruce Momjian11:1000:20OtherCoffeehttps://www.postgresql.eu/events/fosdem2023/schedule/session/4249/11:3000:50Brussels Ballroom 2Fuzzy Text Search: An unassertive guide to almost getting what you wantDescription:
In this presentation, I'll explain what fuzzy logic is and demonstrate a number of methods you can use to implement this in your application using PostgreSQL. Ranging from not so fuzzy to very fuzzy. In addition, I'll explain what scenarios each method is suitable for and methods to improve speed and efficiency.
Presentation
- intro
- what is fuzzy logic
- why you might want it
- pattern matching
- text search vectors (tsvectors)
- Ngrams (trigrams)
- levenstein distance
- phonetics (Soundex, Metaphone, Double Metaphone)
Live Demo
We'll look at a small dataset and demonstrate what kind of results you can expect.https://www.postgresql.eu/events/fosdem2023/schedule/session/4137/Brendan Scullion12:3000:50Brussels Ballroom 2Understanding PostgreSQL Query Plans (aka EXPLAIN)One of the most complex parts of the PostgreSQL system is the planner and the optimizer. This talk will help you understand what happens when you ask the database to execute a query on your behalf. We will go over EXPLAIN, EXPLAIN ANALYZE, other ways of running EXPLAIN, how to adjust parameters to view alternative possible plans, and what the output and results mean.https://www.postgresql.eu/events/fosdem2023/schedule/session/4132/Stephen Frost13:2001:00OtherLunchhttps://www.postgresql.eu/events/fosdem2023/schedule/session/4250/14:2000:50Brussels Ballroom 2Deep dive into the pgBackRest worldHave you already installed pgBackRest but are now wondering if you discovered all of its possibilities? This talk will start from a base installation of the tool and then deep dive into its richer features for more expert use.
After a quick reminder of its basic functionalities, we'll go deeper with some less common operations: refresh a standby server, take backups from a standby, and setup asynchronous archiving.
By doing so, we'll have a look at the current implementation of the multi-repositories support.
During this pgBackRest capabilities exploration, we'll also discover the latest features releases, such as TLS server, file bundling and backup annotations.https://www.postgresql.eu/events/fosdem2023/schedule/session/4203/Stefan Fercot15:2000:50Brussels Ballroom 2Fighting write amplification by stimulating HOT updates through the fill factorWe can mitigate a lot of the write amplification effects on PostgreSQL by setting a lower fill factor for tables and stimulate the amount of HOT Updates.
Before setting the fill factor we have to understand the underlying mechanisms for updates, HOT updates, single page clean up and vacuum.
When we understand the technical processes we can start tuning, monitoring and adjusting the fill factor.
The effects on our systems were more than significant and I hope you can have the same results!https://www.postgresql.eu/events/fosdem2023/schedule/session/4196/Derk van Veen16:1000:20OtherTeahttps://www.postgresql.eu/events/fosdem2023/schedule/session/4251/16:3000:50Brussels Ballroom 2Crazy Things You Can Do with PostgreSQL IndexesOf the relational databases, PostgreSQL is fairly unique in the indexing capabilities it offers. While most of us are familiar with the use of indexes to speed performance when filtering on columns, PostgreSQL indexes can do far more than this.
This talk will focus on cases where difficult problems were solved through the creative use of indexes. Each of these cases is from an episode in my career.
In this presentation, you will learn: - The general index access methods PostgreSQL supports out of the box - How the planner uses indexes (only on a high level) - Functional indexes - Creative use of Index Only scans.
This is a talk for all audiences. The talk is primarily for beginner to intermediate users, but should have enough information for more advanced users to get some insight or inspiration from the talk as well.https://www.postgresql.eu/events/fosdem2023/schedule/session/4216/Christopher Travers09:0000:50PostgreSQL DevroomTour de Data Types: VARCHAR2 or CHAR(255)?Ever wondered what might be the best data type for a certain use case? Is it better to use INTEGER or BIGINT, and should you use TIMESTAMP or is it better to use TIMESTAMPTZ? When is the last time you migrated a legacy database and wondered what to use as replacement for VARCHAR2 or CHAR(255)? How to store IP addresses or geographical data, does that fit into VARCHAR or is there something more suitable?
PostgreSQL 15 comes with around 40 different data types preinstalled. This talk looks beyond INTEGER and VARCHAR and dives into some of the lesser known PostgreSQL data types. Use cases and examples show which data type is a good fit for a certain situation.https://www.postgresql.eu/events/fosdem2023/schedule/session/4120/Andreas Scherbaum10:0000:50PostgreSQL DevroomHow to Give Your Postgres Blog Posts an Outsize ImpactOne of the sayings about development in the Postgres world is “it’s not just open source, it’s open engineering.” In the spirit of openness, this talk will show you how to increase the impact and the reach of your Postgres blog posts. These best practices begin with empathy for your readers—and cover lots of ground from there, including key things to know about SEO, as well as tips on how to promote your blog post. This talk is an updated version of the PGConf EU 2022 talk I gave in Berlin and it's not just theory: real-world examples are included throughout the talk.https://www.postgresql.eu/events/fosdem2023/schedule/session/4217/Claire Giordano11:0000:50PostgreSQL DevroomWhen it all GOes rightThis talk covers how to use PostgreSQL together with the Golang (Go) programming language. I will describe what drivers and tools are available and which to use nowadays.
In this talk I will cover what design choices of Go can help you to build robust programs. But also, we will reveal some parts of the language and drivers that can cause obstacles and what routines to apply to avoid risks.
We will try to build the simplest cross-platform application in Go fully covered by tests and ready for CI/CD using GitHub Actions as an example.https://www.postgresql.eu/events/fosdem2023/schedule/session/4096/Pavlo Golub12:0000:50PostgreSQL DevroomThe Human Factor: Why Database teams Need Crew Resource ManagementOur industry talks a great deal about human error, with the idea that we can automate away human mistakes. However, we are generally missing a fundamental and technical model of how we as humans operate, and what can be done to minimize errors and maximize good outcomes. As much as "human error" sometimes gets us into problems, the human factor is the only thing that gets us out.
Fortunately, as an industry, we do not have to figure this out all by ourselves. Medicine, rail operators, and most importantly, airlines have been on the forefront of research and training in this field.
In this presentation you will learn:
- The history of Crew Resource Management
- Specific case-based examples on how database teams suffer the same problems that flight crews, fire crews, and medical teams face
- What crew resource management training teaches
- How to Implement Crew Resource Management in your teams or company
- How Crew Resource Management training delivers benefits
The speaker offers no commercial services in this field but has been involved in implementing crew resource management programs in database teams.https://www.postgresql.eu/events/fosdem2023/schedule/session/4219/Christopher Travers13:0000:50PostgreSQL DevroomBulk Inserts With PostgreSQL: Four Methods For Efficient Data LoadingIn a world where data continues to grow at an overwhelming rate, knowing how to load and insert data into PostgreSQL as efficiently as possible is a key skill for any software or data engineer. Whether loading data from files, manually generating multi-valued INSERT or UPSERT statements, or using some of the more popular language SDKs, knowing which option is right for each situation can sometimes be difficult to figure out.
This talk will review how to efficiently insert large amounts of data into PostgreSQL using freely available tools and well-crafted SQL. We'll demonstrate the usage of tools like COPY, how to batch data using multi-valued INSERT statements, functions to look for in language SDKs, and even demonstrate how to use array parameters to speed up multi-valued inserts.
By the end of this session, you will know at least four ways to insert bulk data, the impact it will have on your PostgreSQL database, and options for improving your current application code to perform at its best!https://www.postgresql.eu/events/fosdem2023/schedule/session/4245/Ryan Booz14:0000:50PostgreSQL DevroomDBA Evolution (the Changing Role of the Database Administrator)Do you ever find yourself pondering life’s important questions: What does a DBA actually do? How has the role changed over the years? What will it look like in the future? Why are DBAs so grumpy?
It shocked me to realise recently that it’s almost a quarter of a century since I started work as a junior database administrator, fresh out of university. Just like everything else in the IT world, the role of the DBA has evolved massively in that time. Has it changed beyond recognition, or does today’s DBA still do fundamentally the same job?
I don’t imagine most DBAs currently spend their time reorganising their datafiles to create contiguous blocks of free space that the database can make use of. And I’m fairly certain the world is a better place for it.
My 21 year-old self could never have imagined managing a self-healing, automated, scalable database cluster on Kubernetes.
On the other hand, the questions of data modelling, disk capacity, query performance, and user management are as relevant today as they were back then.
Let’s take a light-hearted look at the changing role of the DBA over the past couple of decades, with some guesses about what the DBA of the future will be doing. Or will autonomous databases finally have put us all out of work?https://www.postgresql.eu/events/fosdem2023/schedule/session/4143/Karen Jex15:0000:50PostgreSQL DevroomDeep dive into Query PerformanceIf you look at data store as just another service, the things Application cares about is successfully establishing connection and getting results to the queries promptly and with correct results.
In this presentation, we will explore this seemingly simple aspect of working with PostgreSQL in details. We will talk about why you want to go beyond the averages, and how to group queries together in the meaningful way so you’re not overwhelmed with amount of details but find the right queries to focus on.
We will answer the question on when you should focus on tuning specific queries or when it is better to focus on tuning the database (or just getting a bigger box).
We will also look at other ways to minimize user facing response time, such as parallel queries, asynchronous queries, queueing complex work, as well as often misunderstood response time killers such as overloaded network, stolen CPU, and even limits imposed by this pesky speed of light.https://www.postgresql.eu/events/fosdem2023/schedule/session/4205/Peter Zaitsev16:0000:50PostgreSQL DevroomDon't Do ThisBased on the legendary "Don't Do This" PostgreSQL wiki page, this talk will explore some of the common pitfalls and misconceptions that Postgres users can face - and show possible ways to undo them or workarounds.
Some topics:
* Correct types for data storage
* (Sub-)Partitioning
* Bad SQL habits
* Table inheritance
* Security issues
* Connectionshttps://www.postgresql.eu/events/fosdem2023/schedule/session/4099/Jimmy Angelakos