Skip navigation

Speaker:

Deepak Mahto

Deepak Mahto

Database Migration Specialist

I like to call myself a Database Guy who works in database development, performance tuning, consulting and Migration. I was born and brought up with Oracle and PostgreSQL databases. Since last 7 years actively working on database migration to Cloud. Passionate about PostgreSQL and all Cloud managed database services. Actively working on seeking new migration patterns for solving complex migration challenges when migrating to PostgreSQL.


POSETTE 2024 Talk

Accelerating PL/pgSQL Code Conversion When Migrating to Postgres

(Livestream 2)

Most of the adopters of PostgreSQL are folks moving from another database and code conversion or pl\pgsql development is a critical path. It is a session, we will walk through curated learning I had moving customers and large code bases to PostgreSQL with pl\pgsql.

Topics to cover

  1. Subtle art of code conversion, conversion is art not matching code always.
  2. Key difference in PostgreSQL that is unknown to all assessment tools but critical.
  3. How to migrate not only for primary instance but for Read replicas as well
  4. Key Differentiated feature of plpgsql and how to leverage it.
  5. Leverage newer features added in PostgreSQL like alias, unique on null and more.
  6. Avoid surprises around partitions like missing primary keys in partition columns and more.
  7. Why not to Ignore nulls and empty string comparison and what impact it can bring.
  8. How to Handle Packages in Oracle and how to accelerate its migrations.
  9. Build Code planning and uncover dependency at start of projects.
  10. Data type mapping and how to automate it using ora2pg. And more.

Key Takeaways for the participant

  1. Understand pl\pgsql best practise from a migration perspective.
  2. Uncover hidden caveats with code conversion.
  3. Tips to accelerate code conversion.

View the slides


Speaker Interview

About the Speaker

  • Tell us about yourself: career, family, passions

    I like to call myself the database guy with 15+ years of experience, who started with Oracle and gradually moved to PostgreSQL. As the founder of DataCloudGaze, I now help customers and partners migrate to PostgreSQL with ease and speed.

    I have a 3-year-old son named Shaurya and a lovely wife named Asmita.

    I am passionate about sharing my new learning through my blogs and often post it on my personal blog on wordpress.

  • What is your icebreaker for PostgreSQL events?

    For me, just being at a PostgreSQL event is an icebreaker. However, I love to talk about extensions and compare PostgreSQL features with those of other RDBMS.

  • How do you prepare for an online presentation?

    I do like to share most of my content in the form for sample snippets from databases or the psql command line. I spend some time curating all samples. Later I work on deciding overall flows and prepare speaker notes for each and every slide.

  • Which book are you reading right now?

    I am still hooked on Egor Rogov PostgreSQL 14 Internals. Love the explanation and all the fun internal stuff.

  • What is your favorite hobby?

    I love exploring street food and whenever my wife and I get a chance we explore new street food. Last was my exploration of Rajasthan, where we explored all local famous street food.

About the Talk

  • What will your talk be about, exactly? Why this topic?

    I love to discuss conversion chronicles and gotchas, which are the differences between other RDBMS and PostgreSQL. Code conversion is crucial in the overall migration process, and any acceleration in this area can save considerable cost and time. In my past experience with AWS, we migrated customers with substantial procedural code and gained insights that I always share.

  • What is the audience for your talk?

    The core audience includes database developers, migration engineers, and DBA admins who want to help their employers, customers, or partners succeed with migration to PostgreSQL. They are looking to upskill and become aware of accelerators for PL/pgSQL conversion.

  • What existing knowledge should the attendee have?

    Knowing any procedural language from any RDBMS is beneficial but not mandatory.

  • Which other talk at this year’s conference would you like to watch?

    I am looking forward to most talks related to migration or tuning. Some of the sessions I am particularly interested in are:

    • "Tuning Parameters in Postgres vs. Tuning Your Queries" by Henrietta Dombrovskaya
    • "Making Postgres Inserts Faster on Azure" by Gayathri Paderla
    • "Comparing Postgres Connection Pooler Support for Prepared Statements" by Jelte Fennema-Nio
    • "Lessons Learned from Benchmarking and Profiling Distributed PostgreSQL" by Lotte Felius
    • "Where Do the Performance Cliffs Come From?" by Tomas Vondra
  • How do you balance technical depth with engaging storytelling in your conference presentations?

    I incorporate my personal experiences with customers and the overall journey of overcoming blockers and challenges. I also share snippet-based examples to make the content relevant to developers.

About PostgreSQL

  • What inspired you to work with PostgreSQL?

    Wide adoption of the databases: PostgreSQL has become the de facto choice for multiple use cases and is favored as one of the most widely used managed databases on the cloud. I love the vibe in the community as well, and the affection folks have towards open source and databases is inspiring.

  • What is your favorite PostgreSQL feature?

    My favorite feature is the extensibility with hooks as extensions. "Create Extension" is one of the best features of PostgreSQL.

  • What is the single thing that you think differentiates PostgreSQL most from other databases?

    Community, Freedom from Licensing and Truly Open Source

  • What is your favorite PostgreSQL extension or tool? And why?

    psql is a command-line tool that makes interacting with databases easy and time-efficient. Pg_stat_statements and plpgsql are favorite extensions.

  • What advice would you give to someone starting their journey with PostgreSQL?

    If you are coming from another database background, don’t compare features directly. Instead, learn how to do in PostgreSQL what you are accustomed to doing in another database; i.e., work backwards.

  • What are your favorite resources for learning about PostgreSQL?

    I read lots of blogs from the community, such as Planet PostgreSQL and Tune to Podcat PostgresFM, and books are my go-to for learning.

  • Could you share a memorable experience or challenge you faced while working with PostgreSQL?

    When I first started performance tuning with PostgreSQL, it was memorable. I explored different ways to tune problematic SQL, understood the underlying execution plan, and learned how to get input values for bind variables of problematic SQL. During that time, I learned a lot, which helped me uncover tools, configurations, and extensions as my armor for performance investigation.

  • In your opinion, what are the most common pitfalls or mistakes developers make when working with PostgreSQL?

    Assumption: Assuming it works similarly to what we might have seen in another database. I advise always trying a sample or mock examples to build a foundation; don’t assume how things should work.

  • Which skills are a must have for a PostgreSQL user/developer?

    Knowing sql and plpgsql is always better.

  • What is the most overlooked thing about PostgreSQL?

    I think the default configuration works for me.We need a better way to configure it based on the machine or the nature of work, whether it's OLTP, OLAP, or HTAP.

  • PostgreSQL is open-source, did that ever help you in anyway and how?

    Yes, always. I refer to GitHub source code repositories to read comments and understand decisions for a better foundation of knowledge.

  • If you had a magic wand, what single thing would you change in PostgreSQL as it is today?

    I will make it a single word either “postgres” or “PostgreSQL” and let SEO struggle relax in peace!

About POSETTE & Events

  • Have you enjoyed previous POSETTE (formerly Citus Con) conferences, either as an attendee or as a speaker?

    I was an Attendee, with Posette my first time as Speaker.

  • What motivated you to speak at this year’s POSETTE: An Event for Postgres?

    It’s being Virtual!! That was the motivation.

  • What other PostgreSQL events in 2024 are you excited about?

    I am always excited about the PGConf that happens in Bengaluru every year and all meetups that are happening here in India.

  • What advice would you give to fellow speakers preparing for a PostgreSQL conference?

    Curate your best works, prepare a call for papers (CFP), and submit your ideas. The remaining steps will automatically follow in the process until the presentation.

  • What would be helpful for a first-time speaker?

    Lighting talks in conferences surely helps. Will advise you to start from it and later you are confident for a bigger stage.

  • Could you share a memorable moment from a previous PostgreSQL conference you attended or spoke at?

    I did a lightning talk at PGConf India, and it was pretty exciting. I loved being on stage, sharing what I love and have affection for in PostgreSQL. It enlightens me to do it more often.

The Postgres team at Microsoft is proud to be the organizer of POSETTE: An Event for Postgres (formerly Citus Con).