0

One of my clients recently migrated a CRM product from MS SQL to PostgreSQL. I have a question about how data backup works using pg_dump.exe

As so far in MS SQL, when the backup started, the database was given a "time stamp" and the database copy was performed at a given moment, regardless of whether new data was added to the database during, say, an hour's data backup. Just a copy and so it did for the selected initial moment of time, and the copy was coherent for that moment.

At least that's how I understand the process and how I can describe it. You can verify my knowledge if I'm wrong. If I am correct, please let me know what this "ability" is called.

Now let's move on to PostgreSQL. Is the data copy done the same?

I mean, if the data backup process starts at midnight and takes about a hour, is it possible to start working with CRM, for example, a minute after starting the backup, or do you have to hold off on making changes until the backup is completed?

1 Answer 1

2

The data produced by pg_dump corresponds to the state of the database at the start of the backup, and is not affected by changes occuring during the backup. From pg_dump's documentation:

It makes consistent backups even if the database is being used concurrently. pg_dump does not block other users accessing the database (readers or writers).

The reason is that the complete dump is performed in a single REPEATABLE READ transaction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.