BackendQuestion 3 of 52
Advisory Locks
Problem
You want to write a distributed lock in PostgreSQL to ensure only one worker runs a clean-up cron job, without locking any table rows. Write a query that outputs concept with the value: "Advisory locks are application-defined database locks that do not lock actual table rows, useful for distributed application locking."
Database Schema
This problem acts as a scratchpad. You will write your own DDL/DML or conceptual queries, so there is no predefined schema.
Try It
Loading playground environment...