Page MenuHomePhabricator

Run populate_admin in transaction
Closed, DeclinedPublic

Description

14:47 < pnorman> gehel: populate_admin doesn't start a transaction, so you'd have to wrap it in one
14:47 < gehel> We should do that for the Cron as well ?

Yes.

The easiest way to do this is by passing psql the right option, -1 or --single-transaction.

Add -1Xq to the cron command of /usr/bin/psql -d ${title} -c 'SELECT populate_admin(); >> ${log_dir}/populate_admin.log 2>&1

This will disable .psqlrc, run it in a single transaction, and turn on quiet mode.

Event Timeline

Pnorman created this task.Apr 12 2018, 9:54 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 12 2018, 9:54 PM
Gehel closed this task as Declined.Apr 13 2018, 12:48 PM
Gehel added subscribers: kaldari, gerritbot.

This is managed in T190605 (and the attached CR).