Re: pg_dump fails when a table is in ACCESS SHARE MODE - Mailing list pgsql-sql

From Tom Lane
Subject Re: pg_dump fails when a table is in ACCESS SHARE MODE
Date
Msg-id 17875.1588342688@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump fails when a table is in ACCESS SHARE MODE  (Viral Shah <viralshah009@gmail.com>)
Responses Re: pg_dump fails when a table is in ACCESS SHARE MODE
List pgsql-sql
Viral Shah <viralshah009@gmail.com> writes:
> Per the postgres documentation,
> *max_locks_per_transaction * (max_connections + max_prepared_transactions)*
> this formula determines the max no of allowed objects that can be locked on
> the database. Currently my database has the following values:
> *max_locks_per_transaction = 64 (default)*
> *max_connections = 100*
> *max_prepared_transactions = 0*
> Using this value in the above formula tells that our database or rather
> postgres server can/should handle *6400* locked objects at a time.

Right.

> What is surprising is why Postgres complains of insufficient locks per
> transaction if only 10 processes (parallel jobs in pg_dump) are running on
> the database while taking the dump.

They're taking more than 6400 locks, evidently.   How many tables are
in your database?  Have you tried looking into pg_locks while the dump
is running?

            regards, tom lane



pgsql-sql by date:

Previous
From: Viral Shah
Date:
Subject: Re: pg_dump fails when a table is in ACCESS SHARE MODE
Next
From: Viral Shah
Date:
Subject: Re: pg_dump fails when a table is in ACCESS SHARE MODE