Locks on unlogged tables are locked?!

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Locks on unlogged tables are locked?!
Date: 2018-05-24 14:33:11
Message-ID: 1527172391.2837.41.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While looking at this:
https://stackoverflow.com/q/50413623/6464308
I realized that "LOCK TABLE <unlogged table>" puts a
Standby/LOCK into the WAL stream, which causes a log flush
at COMMIT time.

That hurts performance, and I doubt that it is necessary.
At any rate, DROP TABLE on an unlogged table logs nothing.

The attached patch would take care of it, but I'm not sure
if that's the right place to check.

Yours,
Laurenz Albe

Attachment Content-Type Size
0001-Don-t-log-locks-on-unlogged-tables.patch text/x-patch 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-24 14:41:38 Re: PG11 jit failing on ppc64el
Previous Message Tom Lane 2018-05-24 13:52:31 Re: Function Overloading