aboutsummaryrefslogtreecommitdiff
path: root/contrib/basebackup_to_shell/basebackup_to_shell.c
Commit message (Collapse)AuthorAge
* basebackup_to_shell: Add missing MarkGUCPrefixReserved()Michael Paquier2022-05-02
| | | | | | | | | Oversight in c6306db24, as per a requirement from 88103567. All the other modules in the tree, be they in contrib/ or src/test/modules/, already do that. Author: Bharath Rupireddy Discussion: https://postgr.es/m/CALj2ACUy7q_KwSMda+2SHPSWep32tNUM8cXGRS3=-Vfodo9OUg@mail.gmail.com
* Use has_privs_for_roles for predefined role checks: round 2Joe Conway2022-04-02
| | | | | | | | | Similar to commit 6198420ad, replace is_member_of_role with has_privs_for_role for predefined role access checks in recently committed basebackup code. In passing fix a double-word error in a nearby comment. Discussion: https://postgr.es/m/flat/CAGB+Vh4Zv_TvKt2tv3QNS6tUM_F_9icmuj0zjywwcgVi4PAhFA@mail.gmail.com
* Add 'basebackup_to_shell' contrib module.Robert Haas2022-03-15
As a demonstration of the sort of thing that can be done by adding a custom backup target, this defines a 'shell' target which executes a command defined by the system administrator. The command is executed once for each tar archive generate by the backup and once for the backup manifest, if any. Each time the command is executed, it receives the contents of th file for which it is executed via standard input. The configured command can use %f to refer to the name of the archive (e.g. base.tar, $TABLESPACE_OID.tar, backup_manifest) and %d to refer to the target detail (pg_basebackup --target shell:DETAIL). A target detail is required if %d appears in the configured command and forbidden if it does not. Patch by me, reviewed by Abhijit Menon-Sen. Discussion: http://postgr.es/m/CA+TgmoaqvdT-u3nt+_kkZ7bgDAyqDB0i-+XOMmr5JN2Rd37hxw@mail.gmail.com