Re: Race condition while creating a new partition - Mailing list pgsql-general

From Michael Lewis
Subject Re: Race condition while creating a new partition
Date
Msg-id CAHOFxGorW7ERZOg8ajUFLNWMsZ=dGXGg1CwSJ1Dnn-umQiKOCA@mail.gmail.com
Whole thread Raw
In response to Re: Race condition while creating a new partition  (Justin <zzzzz.graf@gmail.com>)
Responses Re: Race condition while creating a new partition
List pgsql-general
It looks like you are creating a partition for each minute of the day (when logs get inserted for a given minute at least). Would it be at all reasonable to have an hourly or daily job which creates the partitions ahead of when they are actually needed? If partitions went unused in the recent past, you could also drop those if appropriate to your workflow. I just wonder about doing the work just-in-time via 2+ connections vs doing it from a single process to avoid the chance of deadlock completely.

pgsql-general by date:

Previous
From: Sar
Date:
Subject: Experiencing error during restore - found unexpected block ID (0)
Next
From: Andrei Zhidenkov
Date:
Subject: Re: Race condition while creating a new partition