PostgresCourse.com
PostgresCourse.com
  • 8
  • 103 593
Backing up PostgreSQL users and groups (pg_dump and pg_dumpall)
The pg_dump utility is the first utility most Postgres users encounter when creating a backup. However, because the pg_dump utility is used to backup a single Postgres database, users and groups aren't included in the backup contents.
The solution to this issue is to first do a pg_dumpall using the -g option, which will backup global objects ... users and groups. This video demonstrates how to accomplish the backup of Postgres users and groups using pg_dumpall.
Переглядів: 22 154

Відео

Introduction to pg_stat_statements
Переглядів 5 тис.4 роки тому
This is quick tutorial to get up and running with pg_stat_statements, a PostgreSQL extension that provides statistics about database table perfomance.
Installing newer versions of PostgreSQL on RedHat/CentOS
Переглядів 8225 років тому
By default, Linux operating systems like RedHat or CentOS don't offer the latest versions of PostgreSQL for installation. This video shows how to get more recent packages for installation.
Debug PostgreSQL startup problems
Переглядів 1,6 тис.6 років тому
Simple approach towards getting rapid feedback about startup issues by invoking the postgres server executable directly.
Logical Replication with PostgreSQL 10
Переглядів 34 тис.7 років тому
A quick start tutorial to demonstrate the native logical replication feature in PostgreSQL 10.
Dump query results from PostgreSQL to file
Переглядів 4,5 тис.8 років тому
Quick tutorial on how to dump data from PostgreSQL
Upgrade PostgreSQL 9.4.x to 9.5
Переглядів 10 тис.8 років тому
Step-by-step tutorial showing how to do a manual major version upgrade of PostgreSQL.
Logging into PostgreSQL without password
Переглядів 26 тис.8 років тому
This video is a quick tutorial showing how to log in to the psql interactive terminal using: 1) The PGPASSWORD environment variable 2) The .pgpass file 3) The pg_hba.conf configuration file

КОМЕНТАРІ

  • @marinaortegapicazo196
    @marinaortegapicazo196 Місяць тому

    good tutorial thanks

  • @juancarlospastillo7417
    @juancarlospastillo7417 Місяць тому

    Buen video .. quiero sacar un backup y me sale el error ... Pg_dump: el esquema 2201 no existe... Portgresql-11.?

  • @KenSeedarnee
    @KenSeedarnee 10 місяців тому

    Really good, straight to the point and concise explanation of how to export a PostgreSQL DB!

  • @AmolGautam
    @AmolGautam Рік тому

    thanks

  • @wackogames
    @wackogames Рік тому

    So why use pg_dump at all if you can just use pg_dumpall without the -g parameter and have all the data and user objects in a single file?

  • @Hashterix
    @Hashterix Рік тому

    Mine just refuses to produce the file on dump though. Frustrating af.

  • @Fr33manTV
    @Fr33manTV Рік тому

    This was very helpful and calmly and clearly explained with high quality audio and video. Thank you SO much for that.

  • @joaovictormello546
    @joaovictormello546 Рік тому

    Gretae Video!

  • @braydenwerner197
    @braydenwerner197 Рік тому

    thanks :)

  • @julienmercier7790
    @julienmercier7790 Рік тому

    Thanks, that was very helpful

  • @tornoutlaw
    @tornoutlaw 2 роки тому

    So to recap: If I have a postgres instance with 1 self created DB and I want to export both the DB and all the users, I use pg_dumpall without the -g flag? If I then import the dump file to a new postgres instance, will it overwrite the pre-existing default postgres schemes, i.e. information_schema, pg_catalog, pg_toast, public?

  • @jayaprakashduraisamy2184
    @jayaprakashduraisamy2184 2 роки тому

    Hello Guys, I am an Oracle/SQL Server DBA. Currently I've a requirement for configuring postgresql database. Which am new to this environment and want to manage the database(Backup, Restore, Health Check, Alerts monitor). Kindly assist me on this

  • @QuinnFavo
    @QuinnFavo 2 роки тому

    Helpful! Thanks

  • @raise8715
    @raise8715 2 роки тому

    o melhor!

  • @pravinmahandule4893
    @pravinmahandule4893 2 роки тому

    in result set of pg_stat_statements max_exec_time records e.g. 19sec while mean_exec_time records 0.7sec there is huge difference for calls around 500...I couldn't find the cause of this huge difference in time..could you please help

  • @hajamoinudeen8059
    @hajamoinudeen8059 3 роки тому

    really a excellent tutorial , any best practice for wal files to be archived,

  • @devops__guy8909
    @devops__guy8909 3 роки тому

    such a simple and clear turorial.

  • @dimasadriansyh
    @dimasadriansyh 3 роки тому

    Great videos 👍🏼

  • @malikrumi1206
    @malikrumi1206 3 роки тому

    Five years old but still very good.

  • @obivolgaz1661
    @obivolgaz1661 3 роки тому

    nice explanation tq so much

  • @yehiamcp
    @yehiamcp 3 роки тому

    Well explained, thanks. In some managed postgres DBs you can't run dumpall, because it needs super user permission. How can I dump users in that case?

  • @sajeevguru7151
    @sajeevguru7151 3 роки тому

    Thanks do you viedo for pg restore ?

  • @vitache1276
    @vitache1276 3 роки тому

    Very useful. Thanks. Do you offer PostgreSQL training?

  • @IMADETHISACCFORRAY
    @IMADETHISACCFORRAY 3 роки тому

    Thanks, that's really helpful. Any plans to make a video covering how to create a backup from e.g a remote postgres running on AWS RDS onto a local backup machine? I'm trying to understand how I could automate daily backups to my extra linux machine.

    • @postgrescourse
      @postgrescourse 3 роки тому

      No immediate plans to make a video covering that topic. However, almost all the binaries installed with PostgreSQL are simply client applications. Most of them have a "-h" option. That allows you to connect the client, in this case pg_dump, to a remote host. So, if you want to backup from RDS to a local server, you can simply run pg_dump on your local server and use "-h myrds-instance1.123456789012.us-east-1.rds.amazonaws.com" to connect to the remote RDS instance. The backup files will be created on the local server. From there, simply use cron to schedule the backup. There are several great backup utilities for PostgreSQL. However, for simple SQL backups of smaller databases, the approach above is easy to implement.

  • @triptisharma5809
    @triptisharma5809 3 роки тому

    How to create these 2 nodes ?

  • @fahadkhanchughtai3279
    @fahadkhanchughtai3279 3 роки тому

    Loved the simple no-bullshit kinda tutorial! Thanks

  • @nolssmit
    @nolssmit 3 роки тому

    What I need: Logical replication from Posgres on Windows to Postgres in docker container on Linux

  • @rizwanrauf9347
    @rizwanrauf9347 4 роки тому

    Very well explained , how can we add a table to an existing replication slot.

  • @dmitrybaycharov4904
    @dmitrybaycharov4904 4 роки тому

    my postgresql.conf file was actually located in /etc/postgres/10/main/ the directory outputted by running the 'SHOW data_directory' command only had a postgres.auto.conf file

  • @florantinetansi603
    @florantinetansi603 4 роки тому

    Thanks for the video. Its really clear. But why creat database Baltimore in 9.5, why not just restore from the logical backup from 9.4?

    • @postgrescourse
      @postgrescourse 4 роки тому

      The logical backup file does not contain a 'CREATE DATABASE' statement. The logical backup file for a single database (from pg_dump) only contains the DDL to create objects INSIDE the database. So, before restoring the database, an empty one must be created.

    • @florantinetansi603
      @florantinetansi603 4 роки тому

      @@postgrescourse Thank you so much.

  • @Vinaum8
    @Vinaum8 4 роки тому

    this replication is synchronous? is possible write some things on node 2 and automatically replica for node 1 or only writing on node 1 for node 2?

    • @postgrescourse
      @postgrescourse 4 роки тому

      Native logical replication, the approach demonstrated here, is not intended to be bi-directional.

  • @BeeRich33
    @BeeRich33 4 роки тому

    You take requests?

  • @Chandrasekhar-xw9jk
    @Chandrasekhar-xw9jk 4 роки тому

    can u know how to do postgresql replication in windows machine

  • @RapRapKun
    @RapRapKun 4 роки тому

    I've followed everything step by step (pausing and playing the video), and still can't get machine 2 to replicate. I've tried 3 times now.

    • @esra_erimez
      @esra_erimez 4 роки тому

      Were you able to get it to work?

    • @srikanth2384
      @srikanth2384 4 роки тому

      What is the issue you are facing ? Any error message in postgres.log ?

  • @samilekesiz1354
    @samilekesiz1354 4 роки тому

    Thank you, clearly tutorial.

    • @forestismael3863
      @forestismael3863 3 роки тому

      a tip: watch series at flixzone. Been using them for watching lots of of movies recently.

    • @dillonhudson1440
      @dillonhudson1440 3 роки тому

      @Forest Ismael Yup, been using Flixzone} for years myself =)

  • @abacus8393
    @abacus8393 4 роки тому

    Awesomely explained, crisp and clear :+1:

  • @dougtalbot193
    @dougtalbot193 4 роки тому

    Does anyone know where I can download a 9.0 installer for Windows?

  • @yhyh-kn4uu
    @yhyh-kn4uu 5 років тому

    Thanks, man. You fixed my problem!

  • @rockNpappu
    @rockNpappu 5 років тому

    I was trying to automate through Ansible, but wasn't able to set the Setup, now I'm, Thank you very much!!

  • @jeffersonsantiago7902
    @jeffersonsantiago7902 5 років тому

    Hi! in 3:54 of your video may I ask how did you exit inside .pgpass after entering hostname:port:postgress...?

  • @badrlinux6786
    @badrlinux6786 5 років тому

    greate Job Man your awsome

  • @ddg170
    @ddg170 5 років тому

    Can you create a new schema in node2 (subscriber), and read data from the subscription "employee" table?

  • @LaxaArts
    @LaxaArts 5 років тому

    Is it possible to login PostgreSQL with Windows Authentication. Please help with your answers.

  • @adammulla9181
    @adammulla9181 5 років тому

    Simple but High thinking to do in couple of minutes logical replication....I will try...

  • @boodjel
    @boodjel 5 років тому

    hi @PostgresCourse.com , is it possible if I create subscription to different schema name? on your tutorial, the schema name is the same which is public. But I want to replicate the master "public" schema to my slave "not-public" schema (schema name is different). is it possible to do that?

  • @guillermocastro2971
    @guillermocastro2971 5 років тому

    Hello, very good tutorial. I see that the replica is active - passive. I would like to know if there is a way for it to be active - active.

  • @KISHOREVIGNESHBARATHARAJ
    @KISHOREVIGNESHBARATHARAJ 6 років тому

    Thanks for making the information available.

  • @asero82.
    @asero82. 6 років тому

    Thanks for sharing this excellent tutorial. ¿Would you please make one about backup plans, and backups having in mind replication?

  • @tranicus
    @tranicus 6 років тому

    awesome; short, direct, clearly stated. THANK YOU!

  • @gizmoMKD
    @gizmoMKD 6 років тому

    is it possible to replicate only 1 or 2 tables and not all the tables? for example if we have 10 tables in node1 server but only 2 tables to be replicated to node2 server using this approach?

    • @postgrescourse
      @postgrescourse 6 років тому

      Yes. It is possible. You would simply alter the CREATE PUBLICATION command. Example: CREATE PUBLICATION mypublication FOR TABLE users, departments; This example is direct from the core documentation: www.postgresql.org/docs/10/static/sql-createpublication.html