PGCOPYDB RESTORE(1)

🌸 PGCOPYDB RESTORE β€” bestie edition πŸ’–

okay so. introducing pgcopydb restore from the pgcopydb manual girlies. yes it's literally the same name twice, that's just how manpages are, don't @ me.

✨ NAME ✨

pgcopydb restore β€” pgcopydb restore

pgcopydb restore β€” Restore database objects into a Postgres instance 🫢

This command prefixes the following sub-commands:

  • pgcopydb restore: Restore database objects into a Postgres instance

Available commands:

  • pgcopydb restore
    • schema β€” Restore a database schema from custom files to target database
    • pre-data β€” Restore a database pre-data schema from custom file to target database
    • post-data β€” Restore a database post-data schema from custom file to target database
    • roles β€” Restore database roles from SQL file to target database
    • parse-list β€” Parse pg_restore --list output from custom file

πŸ¦‹ PGCOPYDB RESTORE SCHEMA πŸ¦‹

pgcopydb restore schema β€” Restore a database schema from custom files to target database

so the command pgcopydb restore schema uses pg_restore to create the SQL schema definitions from the given pgcopydb dump schema export directory. πŸ’… and listen β€” this command is not compatible with using Postgres files directly, no ma'am. it must be fed with the directory output from the pgcopydb dump ... commands. that's the vibe, that's the rule, periodt.

pgcopydb restore schema: Restore a database schema from custom files to target database
usage: pgcopydb restore schema  --dir <dir> [ --source <URI> ] --target <URI>
  • --source β€” Postgres URI to the source database
  • --target β€” Postgres URI to the target database
  • --dir β€” Work directory to use
  • --restore-jobs β€” Number of concurrent jobs for pg_restore
  • --drop-if-exists β€” On the target database, clean-up from a previous run first
  • --no-owner β€” Do not set ownership of objects to match the original database
  • --no-acl β€” Prevent restoration of access privileges (grant/revoke commands).
  • --no-comments β€” Do not output commands to restore comments
  • --no-tablespaces β€” Do not output commands to select tablespaces
  • --filters <filename> β€” Use the filters defined in <filename>
  • --restart β€” Allow restarting when temp files exist already
  • --resume β€” Allow resuming operations after a failure
  • --not-consistent β€” Allow taking a new snapshot on the source database

πŸŽ€ PGCOPYDB RESTORE PRE-DATA πŸŽ€

pgcopydb restore pre-data β€” Restore a database pre-data schema from custom file to target database

the pgcopydb restore pre-data command uses pg_restore to create the SQL schema definitions from the given pgcopydb dump schema export directory. and again, bestie, it is not compatible with using Postgres files directly β€” it must be fed with the directory output from the pgcopydb dump ... commands. no shortcuts, iykyk. πŸ™ˆ

pgcopydb restore pre-data: Restore a database pre-data schema from custom file to target database
usage: pgcopydb restore pre-data  --dir <dir> [ --source <URI> ] --target <URI>
  • --source β€” Postgres URI to the source database
  • --target β€” Postgres URI to the target database
  • --dir β€” Work directory to use
  • --restore-jobs β€” Number of concurrent jobs for pg_restore
  • --drop-if-exists β€” On the target database, clean-up from a previous run first
  • --no-owner β€” Do not set ownership of objects to match the original database
  • --no-acl β€” Prevent restoration of access privileges (grant/revoke commands).
  • --no-comments β€” Do not output commands to restore comments
  • --no-tablespaces β€” Do not output commands to select tablespaces
  • --skip-extensions β€” Skip restoring extensions
  • --skip-ext-comments β€” Skip restoring COMMENT ON EXTENSION
  • --filters <filename> β€” Use the filters defined in <filename>
  • --restart β€” Allow restarting when temp files exist already
  • --resume β€” Allow resuming operations after a failure
  • --not-consistent β€” Allow taking a new snapshot on the source database

🌈 PGCOPYDB RESTORE POST-DATA 🌈

pgcopydb restore post-data β€” Restore a database post-data schema from custom file to target database

pgcopydb restore post-data also uses pg_restore to create the SQL schema definitions from the given pgcopydb dump schema export directory. same deal as the others: not compatible with using Postgres files directly, it must be fed with the directory output from the pgcopydb dump ... commands. iconic behavior honestly. ✨

pgcopydb restore post-data: Restore a database post-data schema from custom file to target database
usage: pgcopydb restore post-data  --dir <dir> [ --source <URI> ] --target <URI>
  • --source β€” Postgres URI to the source database
  • --target β€” Postgres URI to the target database
  • --dir β€” Work directory to use
  • --restore-jobs β€” Number of concurrent jobs for pg_restore
  • --no-owner β€” Do not set ownership of objects to match the original database
  • --no-acl β€” Prevent restoration of access privileges (grant/revoke commands).
  • --no-comments β€” Do not output commands to restore comments
  • --no-tablespaces β€” Do not output commands to select tablespaces
  • --skip-extensions β€” Skip restoring extensions
  • --skip-ext-comments β€” Skip restoring COMMENT ON EXTENSION
  • --filters <filename> β€” Use the filters defined in <filename>
  • --restart β€” Allow restarting when temp files exist already
  • --resume β€” Allow resuming operations after a failure
  • --not-consistent β€” Allow taking a new snapshot on the source database

πŸ’œ PGCOPYDB RESTORE ROLES πŸ’œ

pgcopydb restore roles β€” Restore database roles from SQL file to target database

okay so pgcopydb restore roles runs the commands from the SQL script you got from the command pgcopydb dump roles. roles that already exist on the target database? skipped. bye. πŸ’…

here's the tea: the pg_dumpall command issues two lines per role β€” the first one is a CREATE ROLE SQL command, and the second one is an ALTER ROLE SQL command. both of those lines get skipped when the role already exists on the target database. both. fr fr. πŸ‘‘

pgcopydb restore roles: Restore database roles from SQL file to target database
usage: pgcopydb restore roles  --dir <dir> [ --source <URI> ] --target <URI>
  • --source β€” Postgres URI to the source database
  • --target β€” Postgres URI to the target database
  • --dir β€” Work directory to use
  • --restore-jobs β€” Number of concurrent jobs for pg_restore

🧚 PGCOPYDB RESTORE PARSE-LIST 🧚

pgcopydb restore parse-list β€” Parse pg_restore --list output from custom file

pgcopydb restore parse-list outputs pg_restore to list the archive catalog of the custom file format file that has been exported for the post-data section. πŸ“‹

when you use the --filters option , then the source database connection is used to grab all the dependend objects that should also be filtered, and the output of the command shows those pg_restore catalog entries commented out. 🌸

a pg_restore archive catalog entry is commented out when its line starts with a semi-colon character (;). noted. scribbled in my notes app. ✍️

pgcopydb restore parse-list: Parse pg_restore --list output from custom file
usage: pgcopydb restore parse-list  [ <pre.list> ]
  • --source β€” Postgres URI to the source database
  • --target β€” Postgres URI to the target database
  • --dir β€” Work directory to use
  • --filters <filename> β€” Use the filters defined in <filename>
  • --skip-extensions β€” Skip restoring extensions
  • --skip-ext-comments β€” Skip restoring COMMENT ON EXTENSION
  • --restart β€” Allow restarting when temp files exist already
  • --resume β€” Allow resuming operations after a failure
  • --not-consistent β€” Allow taking a new snapshot on the source database

⭐ DESCRIPTION ⭐

the pgcopydb restore schema command implements the creation of SQL objects in the target database β€” and that's the second and last step of a full database migration. big main character energy, honestly. πŸ’«

when the command runs, it calls pg_restore on the files found at the expected location within the --target directory, which has typically been created with the pgcopydb dump schema command. 🫢

meanwhile pgcopydb restore pre-data and pgcopydb restore post-data are limiting their actions to the file with pre-data and post-data in the source directory.. yes there are two dots there. i don't make the rules. 😭

✨ OPTIONS ✨

okay bestie, here's the whole menu of flags for pgcopydb restore schema β€” and yes, we're doing ALL of them, no skipping πŸ’…

  • --source β€” the connection string for your source Postgres instance. All the deets live in the Postgres docs on connection strings, over at https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING. Short version tho: both the quoted form "host=... dbname=..." and the URI form postgres://user@host:5432/dbname are supported. both. always both. 🫢
  • --target β€” the connection string for your target Postgres instance.
  • --dir β€” during its normal operations, pgcopydb makes a lot of temporary files to track sub-process progress, and they land in the directory you name here. No --dir? Then it defaults to ${TMPDIR}/pgcopydb when that environment variable is set, and otherwise falls back to /tmp/pgcopydb.
  • --restore-jobs β€” how many threads or processes can be used during pg_restore. A genuinely great pick here is to set this to the number of CPU cores available on your Postgres target system. and if you don't set it at all? Then we reuse the --index-jobs value, and if that one isn't set either, we just use the default value for --index-jobs. chain reaction, but make it reasonable ✨
  • --drop-if-exists β€” when restoring the schema on the target Postgres instance, pgcopydb is actually using pg_restore under the hood. Pass this option and these extra pg_restore options get added to the party too: --clean --if-exists.

This one is so useful when you run the same command several times in a row β€” like, to fix a previous mistake, or when it's living inside a continuous integration system doing its thing over and over.

⚠️ Heads up bestie: this option causes DROP TABLE and DROP INDEX and other DROP commands to be used. Make sure you understand what you're doing here! πŸ”₯
  • --no-owner β€” don't output commands that set ownership of objects to match the original database. By default, pg_restore issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements, and those statements will fail unless the initial connection to the database is made by a superuser (or the same user that owns all of the objects in the script). With --no-owner? Any user name can be used for the initial connection, and that user will own all the created objects. slay, no superuser required πŸ’…
  • --filters <filename> β€” this option lets you exclude table and indexes from the copy operations. Peep the Filtering section for the details on the expected file format and the filtering options available. the file format matters, ok? πŸ“‹
  • --skip-extensions β€” skip copying extensions from the source database to the target database.

When you use it, schema that extensions depend-on is skipped too: it's expected that creating the needed extensions on the target system then becomes the responsibility of another command (such as pgcopydb copy extensions), and schemas that extensions depend-on are part of that responsibility. it's giving "somebody else's job now" πŸ™ˆ

Because creating extensions requires superuser, this lets you do a multi-steps approach where extensions get handled with superuser privileges, and then the rest of the pgcopydb operations run without superuser privileges. king shit.

  • --skip-ext-comments β€” skip copying COMMENT ON EXTENSION commands. This is implicit when you're using --skip-extensions. ✨
  • --restart β€” here's the deal: when you run the pgcopydb command again, if the work directory already contains information from a previous run, then the command refuses to proceed and delete information that might be used for diagnostics and forensics. rude, but responsible.

In that case, the --restart option can be used to allow pgcopydb to delete traces from a previous run. permission granted, bestie 🫑

  • --resume β€” when the pgcopydb command was terminated before completion, either by an interrupt signal (such as C-c or SIGTERM) or because it crashed, it is possible to resume the database migration. we bounce back πŸ’ͺ

When resuming activity from a previous run, table data that was fully copied over to the target server is not sent again. But table data that was interrupted during the COPY has to be started from scratch even when using --resume: the COPY command in Postgres is transactional and was rolled back. no half copies, periodt.

Same reasonning applies to the CREATE INDEX commands and ALTER TABLE commands that pgcopydb issues β€” those commands are skipped on a --resume run only if known to have run through to completion on the previous one. trust but verify ⭐

Finally, using --resume requires the use of --not-consistent. that's the rule, iykyk.

  • --not-consistent β€” okay so here's the consistency lore. In order to be consistent, pgcopydb exports a Postgres snapshot by calling the pg_export_snapshot() function on the source database server. The snapshot is then re-used in all the connections to the source database server by using the SET TRANSACTION SNAPSHOT command. cute, right?

Per the Postgres documentation about pg_export_snapshot:

Saves the transaction's current snapshot and returns a text string identifying the snapshot. This string must be passed (outside the database) to clients that want to import the snapshot. The snapshot is available for import only until the end of the transaction that exported it.

Now, when the pgcopydb process was interrupted (or crashed) on a previous run, it is possible to resume operations, but the snapshot that was exported does not exists anymore. The pgcopydb command can only resume operations with a new snapshot, and thus can not ensure consistency of the whole data set, because each run is now using their own snapshot. 😭 different snapshot, different story.

  • --snapshot β€” instead of exporting its own snapshot by calling the PostgreSQL function pg_export_snapshot(), it's possible for pgcopydb to re-use an already exported snapshot. bring your own snapshot πŸŽ€
  • --verbose β€” increase current verbosity. The default level of verbosity is INFO. In ascending order pgcopydb knows about the following verbosity levels: FATAL, ERROR, WARN, INFO, NOTICE, DEBUG, TRACE. more words, more info πŸ‘‘
  • --debug β€” set current verbosity to DEBUG level.
  • --trace β€” set current verbosity to TRACE level.
  • --quiet β€” set current verbosity to ERROR level. 🀫

🌸 ENVIRONMENT 🌸

PGCOPYDB_TARGET_PGURI

Connection string to the target Postgres instance. When --target is ommitted from the command line, then this environment variable is used. it's the backup plan that's actually the main plan πŸ’œ

PGCOPYDB_DROP_IF_EXISTS

When true (or yes, or on, or 1, same input as a Postgres boolean) then pgcopydb uses the pg_restore options --clean --if-exists when creating the schema on the target Postgres instance. env var said what it said πŸ”₯


🌈 EXAMPLES 🌈

First, using pgcopydb restore schema:

$ PGCOPYDB_DROP_IF_EXISTS=on pgcopydb restore schema --source /tmp/target/ --target "port=54314 dbname=demo"
07:45:10.626 39254 INFO   Using work dir "/tmp/pgcopydb"
07:45:10.626 39254 INFO   Restoring database from existing files at "/tmp/pgcopydb"
07:45:10.720 39254 INFO   Found 2 indexes (supporting 2 constraints) in the target database
07:45:10.723 39254 INFO   Using pg_restore for Postgres "16.2" at "/usr/bin/pg_restore"
07:45:10.723 39254 INFO   [TARGET] Restoring database into "postgres://postgres@127.0.0.1:5435/demo?keepalives=1&keepalives_idle=10&keepalives_interval=10&keepalives_count=60"
07:45:10.737 39254 INFO   Drop tables on the target database, per --drop-if-exists
07:45:10.750 39254 INFO    /usr/bin/pg_restore --dbname 'postgres://postgres@127.0.0.1:5435/demo?keepalives=1&keepalives_idle=10&keepalives_interval=10&keepalives_count=60' --section pre-data --jobs 4 --clean --if-exists --use-list /tmp/pgcopydb/schema/pre-filtered.list /tmp/pgcopydb/schema/schema.dump
07:45:10.803 39254 INFO    /usr/bin/pg_restore --dbname 'postgres://postgres@127.0.0.1:5435/demo?keepalives=1&keepalives_idle=10&keepalives_interval=10&keepalives_count=60' --section post-data --jobs 4 --clean --if-exists --use-list /tmp/pgcopydb/schema/post-filtered.list /tmp/pgcopydb/schema/schema.dump

Then the pgcopydb restore pre-data and pgcopydb restore post-data would look the same with just a single call to pg_restore instead of the both of them. same energy, one command instead of two ✨

Using pgcopydb restore parse-list it's possible to review the filtering options and see how pg_restore catalog entries are being commented-out. yes, commented-out, like a lil -- in front πŸ’…

$ cat ./tests/filtering/include.ini
[include-only-table]
public.actor
public.category
public.film
public.film_actor
public.film_category
public.language
public.rental

[exclude-index]
public.idx_store_id_film_id

[exclude-table-data]
public.rental

and here's the rest of that run, bestie β€” the parse-list output scrolling past like it's got somewhere to be πŸ’…

$ pgcopydb restore parse-list --dir /tmp/pagila/pgcopydb --resume --not-consistent --filters ./tests/filtering/include.ini
11:41:22 75175 INFO  Running pgcopydb version 0.5.8.ge0d2038 from "/Users/dim/dev/PostgreSQL/pgcopydb/./src/bin/pgcopydb/pgcopydb"
11:41:22 75175 INFO  [SOURCE] Restoring database from "postgres://@:54311/pagila?"
11:41:22 75175 INFO  [TARGET] Restoring database into "postgres://@:54311/plop?"
11:41:22 75175 INFO  Using work dir "/tmp/pagila/pgcopydb"
11:41:22 75175 INFO  Removing the stale pid file "/tmp/pagila/pgcopydb/pgcopydb.pid"
11:41:22 75175 INFO  Work directory "/tmp/pagila/pgcopydb" already exists
11:41:22 75175 INFO  Schema dump for pre-data and post-data section have been done
11:41:22 75175 INFO  Restoring database from existing files at "/tmp/pagila/pgcopydb"
11:41:22 75175 INFO  Using pg_restore for Postgres "12.9" at "/Applications/Postgres.app/Contents/Versions/12/bin/pg_restore"
11:41:22 75175 INFO  Exported snapshot "00000003-0003209A-1" from the source database
3242; 2606 317973 CONSTRAINT public actor actor_pkey postgres
;3258; 2606 317975 CONSTRAINT public address address_pkey postgres
3245; 2606 317977 CONSTRAINT public category category_pkey postgres
;3261; 2606 317979 CONSTRAINT public city city_pkey postgres
;3264; 2606 317981 CONSTRAINT public country country_pkey postgres
;3237; 2606 317983 CONSTRAINT public customer customer_pkey postgres
3253; 2606 317985 CONSTRAINT public film_actor film_actor_pkey postgres
3256; 2606 317987 CONSTRAINT public film_category film_category_pkey postgres
3248; 2606 317989 CONSTRAINT public film film_pkey postgres
;3267; 2606 317991 CONSTRAINT public inventory inventory_pkey postgres
3269; 2606 317993 CONSTRAINT public language language_pkey postgres
3293; 2606 317995 CONSTRAINT public rental rental_pkey postgres
;3295; 2606 317997 CONSTRAINT public staff staff_pkey postgres
;3298; 2606 317999 CONSTRAINT public store store_pkey postgres
3246; 1259 318000 INDEX public film_fulltext_idx postgres
3243; 1259 318001 INDEX public idx_actor_last_name postgres
;3238; 1259 318002 INDEX public idx_fk_address_id postgres
;3259; 1259 318003 INDEX public idx_fk_city_id postgres
;3262; 1259 318004 INDEX public idx_fk_country_id postgres
;3270; 1259 318005 INDEX public idx_fk_customer_id postgres
3254; 1259 318006 INDEX public idx_fk_film_id postgres
3290; 1259 318007 INDEX public idx_fk_inventory_id postgres
3249; 1259 318008 INDEX public idx_fk_language_id postgres
3250; 1259 318009 INDEX public idx_fk_original_language_id postgres
;3272; 1259 318010 INDEX public idx_fk_payment_p2020_01_customer_id postgres
;3271; 1259 318011 INDEX public idx_fk_staff_id postgres
;3273; 1259 318012 INDEX public idx_fk_payment_p2020_01_staff_id postgres
;3275; 1259 318013 INDEX public idx_fk_payment_p2020_02_customer_id postgres
;3276; 1259 318014 INDEX public idx_fk_payment_p2020_02_staff_id postgres
;3278; 1259 318015 INDEX public idx_fk_payment_p2020_03_customer_id postgres
;3279; 1259 318016 INDEX public idx_fk_payment_p2020_03_staff_id postgres
;3281; 1259 318017 INDEX public idx_fk_payment_p2020_04_customer_id postgres
;3282; 1259 318018 INDEX public idx_fk_payment_p2020_04_staff_id postgres
;3284; 1259 318019 INDEX public idx_fk_payment_p2020_05_customer_id postgres
;3285; 1259 318020 INDEX public idx_fk_payment_p2020_05_staff_id postgres
;3287; 1259 318021 INDEX public idx_fk_payment_p2020_06_customer_id postgres
;3288; 1259 318022 INDEX public idx_fk_payment_p2020_06_staff_id postgres
;3239; 1259 318023 INDEX public idx_fk_store_id postgres
;3240; 1259 318024 INDEX public idx_last_name postgres
;3265; 1259 318025 INDEX public idx_store_id_film_id postgres
3251; 1259 318026 INDEX public idx_title postgres
;3296; 1259 318027 INDEX public idx_unq_manager_staff_id postgres
3291; 1259 318028 INDEX public idx_unq_rental_rental_date_inventory_id_customer_id postgres
;3274; 1259 318029 INDEX public payment_p2020_01_customer_id_idx postgres
;3277; 1259 318030 INDEX public payment_p2020_02_customer_id_idx postgres
;3280; 1259 318031 INDEX public payment_p2020_03_customer_id_idx postgres
;3283; 1259 318032 INDEX public payment_p2020_04_customer_id_idx postgres
;3286; 1259 318033 INDEX public payment_p2020_05_customer_id_idx postgres
;3289; 1259 318034 INDEX public payment_p2020_06_customer_id_idx postgres
;3299; 0 0 INDEX ATTACH public idx_fk_payment_p2020_01_staff_id postgres
;3301; 0 0 INDEX ATTACH public idx_fk_payment_p2020_02_staff_id postgres
;3303; 0 0 INDEX ATTACH public idx_fk_payment_p2020_03_staff_id postgres
;3305; 0 0 INDEX ATTACH public idx_fk_payment_p2020_04_staff_id postgres
;3307; 0 0 INDEX ATTACH public idx_fk_payment_p2020_05_staff_id postgres
;3309; 0 0 INDEX ATTACH public idx_fk_payment_p2020_06_staff_id postgres
;3300; 0 0 INDEX ATTACH public payment_p2020_01_customer_id_idx postgres
;3302; 0 0 INDEX ATTACH public payment_p2020_02_customer_id_idx postgres
;3304; 0 0 INDEX ATTACH public payment_p2020_03_customer_id_idx postgres
;3306; 0 0 INDEX ATTACH public payment_p2020_04_customer_id_idx postgres
;3308; 0 0 INDEX ATTACH public payment_p2020_05_customer_id_idx postgres
;3310; 0 0 INDEX ATTACH public payment_p2020_06_customer_id_idx postgres
3350; 2620 318035 TRIGGER public film film_fulltext_trigger postgres
3348; 2620 318036 TRIGGER public actor last_updated postgres
;3354; 2620 318037 TRIGGER public address last_updated postgres
3349; 2620 318038 TRIGGER public category last_updated postgres
;3355; 2620 318039 TRIGGER public city last_updated postgres
;3356; 2620 318040 TRIGGER public country last_updated postgres
;3347; 2620 318041 TRIGGER public customer last_updated postgres
3351; 2620 318042 TRIGGER public film last_updated postgres
3352; 2620 318043 TRIGGER public film_actor last_updated postgres
3353; 2620 318044 TRIGGER public film_category last_updated postgres
;3357; 2620 318045 TRIGGER public inventory last_updated postgres
3358; 2620 318046 TRIGGER public language last_updated postgres
3359; 2620 318047 TRIGGER public rental last_updated postgres
;3360; 2620 318048 TRIGGER public staff last_updated postgres
;3361; 2620 318049 TRIGGER public store last_updated postgres
;3319; 2606 318050 FK CONSTRAINT public address address_city_id_fkey postgres
;3320; 2606 318055 FK CONSTRAINT public city city_country_id_fkey postgres
;3311; 2606 318060 FK CONSTRAINT public customer customer_address_id_fkey postgres
;3312; 2606 318065 FK CONSTRAINT public customer customer_store_id_fkey postgres
3315; 2606 318070 FK CONSTRAINT public film_actor film_actor_actor_id_fkey postgres
3316; 2606 318075 FK CONSTRAINT public film_actor film_actor_film_id_fkey postgres
3317; 2606 318080 FK CONSTRAINT public film_category film_category_category_id_fkey postgres
3318; 2606 318085 FK CONSTRAINT public film_category film_category_film_id_fkey postgres
3313; 2606 318090 FK CONSTRAINT public film film_language_id_fkey postgres
3314; 2606 318095 FK CONSTRAINT public film film_original_language_id_fkey postgres
;3321; 2606 318100 FK CONSTRAINT public inventory inventory_film_id_fkey postgres
;3322; 2606 318105 FK CONSTRAINT public inventory inventory_store_id_fkey postgres
;3323; 2606 318110 FK CONSTRAINT public payment_p2020_01 payment_p2020_01_customer_id_fkey postgres
;3324; 2606 318115 FK CONSTRAINT public payment_p2020_01 payment_p2020_01_rental_id_fkey postgres
;3325; 2606 318120 FK CONSTRAINT public payment_p2020_01 payment_p2020_01_staff_id_fkey postgres
;3326; 2606 318125 FK CONSTRAINT public payment_p2020_02 payment_p2020_02_customer_id_fkey postgres
;3327; 2606 318130 FK CONSTRAINT public payment_p2020_02 payment_p2020_02_rental_id_fkey postgres
;3328; 2606 318135 FK CONSTRAINT public payment_p2020_02 payment_p2020_02_staff_id_fkey postgres
;3329; 2606 318140 FK CONSTRAINT public payment_p2020_03 payment_p2020_03_customer_id_fkey postgres
;3330; 2606 318145 FK CONSTRAINT public payment_p2020_03 payment_p2020_03_rental_id_fkey postgres
;3331; 2606 318150 FK CONSTRAINT public payment_p2020_03 payment_p2020_03_staff_id_fkey postgres
;3332; 2606 318155 FK CONSTRAINT public payment_p2020_04 payment_p2020_04_customer_id_fkey postgres
;3333; 2606 318160 FK CONSTRAINT public payment_p2020_04 payment_p2020_04_rental_id_fkey postgres
;3334; 2606 318165 FK CONSTRAINT public payment_p2020_04 payment_p2020_04_staff_id_fkey postgres
;3335; 2606 318170 FK CONSTRAINT public payment_p2020_05 payment_p2020_05_customer_id_fkey postgres
;3336; 2606 318175 FK CONSTRAINT public payment_p2020_05 payment_p2020_05_rental_id_fkey postgres
;3337; 2606 318180 FK CONSTRAINT public payment_p2020_05 payment_p2020_05_staff_id_fkey postgres
;3338; 2606 318185 FK CONSTRAINT public payment_p2020_06 payment_p2020_06_customer_id_fkey postgres
;3339; 2606 318190 FK CONSTRAINT public payment_p2020_06 payment_p2020_06_rental_id_fkey postgres
;3340; 2606 318195 FK CONSTRAINT public payment_p2020_06 payment_p2020_06_staff_id_fkey postgres
;3341; 2606 318200 FK CONSTRAINT public rental rental_customer_id_fkey postgres
;3342; 2606 318205 FK CONSTRAINT public rental rental_inventory_id_fkey postgres
;3343; 2606 318210 FK CONSTRAINT public rental rental_staff_id_fkey postgres
;3344; 2606 318215 FK CONSTRAINT public staff staff_address_id_fkey postgres
;3345; 2606 318220 FK CONSTRAINT public staff staff_store_id_fkey postgres
;3346; 2606 318225 FK CONSTRAINT public store store_address_id_fkey postgres

like, every constraint, every index, every INDEX ATTACH, every TRIGGER, every FK CONSTRAINT β€” all of it lined up and accounted for. no cap, it ate πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

This whole thing was written by Dimitri Fontaine. iconic behavior fr fr πŸ’–

2022-2024, Dimitri Fontaine β€” periodt 🫢


and that's a wrap on the whole page, bestie!! this was version 0.18, dated Jun 28, 2026, straight out of the source PGCOPYDB RESTORE(1). go restore something gorgeous πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from