public inbox for [email protected]
help / color / mirror / Atom feedRe: pg_repack and locks
3+ messages / 3 participants
[nested] [flat]
* Re: pg_repack and locks
@ 2025-01-13 15:41 hubert depesz lubaczewski <[email protected]>
2025-01-19 12:51 ` RE: pg_repack and locks [email protected]
0 siblings, 1 reply; 3+ messages in thread
From: hubert depesz lubaczewski @ 2025-01-13 15:41 UTC (permalink / raw)
To: nicolas <[email protected]>; +Cc: [email protected]
On Mon, Jan 13, 2025 at 12:40:06PM +0000, nicolas wrote:
> Hello everyone,
>
> We are using postgresql v12 and added the pg_repack package
>
> Since I cannot stop other process, I use the “--no-kill-backend” and Pg_repack will wait indefinitly until pg_repack get the lock
>
> I get sometimes a problem of lock:
>
> sometimes, I get indefinitly this message : “NOTICE: Waiting for 1 transactions to finish. First PID: xxxx”
>
> this is a real problem because the database is usd all the time.
> If I kill the process, a trigger on source table will still exist and temporary tables and type still exists in the repack schema. The tables are not empty if data has been modified in the source table during the repack.
>
> If I drop table repack tables, I will loose all data modifications done on source table
> how can I properly cleanup the database ?
Allow it to kill offending backends after some time? For example -T 7200?
Best regards,
depesz
^ permalink raw reply [nested|flat] 3+ messages in thread
* RE: pg_repack and locks
2025-01-13 15:41 Re: pg_repack and locks hubert depesz lubaczewski <[email protected]>
@ 2025-01-19 12:51 ` [email protected]
2025-01-19 13:50 ` Re: pg_repack and locks Boris Zentner <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: [email protected] @ 2025-01-19 12:51 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
Hi
Thanks for the help but this will not help, killing other process is not safe
The good way will be that pg_repack tools include a timeout so, that after expiration delay, he will stop waiting and discard the repack action
But thanks again for your proposition.
Regards,
Nicolas
-----Message d'origine-----
De : [email protected] <[email protected]>
Envoyé : lundi 13 janvier 2025 16:42
À : nicolas <[email protected]>
Cc : [email protected]
Objet : Re: pg_repack and locks
On Mon, Jan 13, 2025 at 12:40:06PM +0000, nicolas wrote:
> Hello everyone,
>
> We are using postgresql v12 and added the pg_repack package
>
> Since I cannot stop other process, I use the “--no-kill-backend” and
> Pg_repack will wait indefinitly until pg_repack get the lock
>
> I get sometimes a problem of lock:
>
> sometimes, I get indefinitly this message : “NOTICE: Waiting for 1 transactions to finish. First PID: xxxx”
>
> this is a real problem because the database is usd all the time.
> If I kill the process, a trigger on source table will still exist and temporary tables and type still exists in the repack schema. The tables are not empty if data has been modified in the source table during the repack.
>
> If I drop table repack tables, I will loose all data modifications
> done on source table how can I properly cleanup the database ?
Allow it to kill offending backends after some time? For example -T 7200?
Best regards,
depesz
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_repack and locks
2025-01-13 15:41 Re: pg_repack and locks hubert depesz lubaczewski <[email protected]>
2025-01-19 12:51 ` RE: pg_repack and locks [email protected]
@ 2025-01-19 13:50 ` Boris Zentner <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Boris Zentner @ 2025-01-19 13:50 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]; [email protected]
Hi there,
I think you can use -T 3600 -D If you don't want to kill the backends.
--
Boris
> Am 19.01.2025 um 13:52 schrieb [email protected]:
>
> Hi
>
> Thanks for the help but this will not help, killing other process is not safe
> The good way will be that pg_repack tools include a timeout so, that after expiration delay, he will stop waiting and discard the repack action
>
> But thanks again for your proposition.
> Regards,
> Nicolas
>
> -----Message d'origine-----
> De : [email protected] <[email protected]>
> Envoyé : lundi 13 janvier 2025 16:42
> À : nicolas <[email protected]>
> Cc : [email protected]
> Objet : Re: pg_repack and locks
>
>> On Mon, Jan 13, 2025 at 12:40:06PM +0000, nicolas wrote:
>> Hello everyone,
>>
>> We are using postgresql v12 and added the pg_repack package
>>
>> Since I cannot stop other process, I use the “--no-kill-backend” and
>> Pg_repack will wait indefinitly until pg_repack get the lock
>>
>> I get sometimes a problem of lock:
>>
>> sometimes, I get indefinitly this message : “NOTICE: Waiting for 1 transactions to finish. First PID: xxxx”
>>
>> this is a real problem because the database is usd all the time.
>> If I kill the process, a trigger on source table will still exist and temporary tables and type still exists in the repack schema. The tables are not empty if data has been modified in the source table during the repack.
>>
>> If I drop table repack tables, I will loose all data modifications
>> done on source table how can I properly cleanup the database ?
>
> Allow it to kill offending backends after some time? For example -T 7200?
>
> Best regards,
>
> depesz
>
>
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-01-19 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-01-13 15:41 Re: pg_repack and locks hubert depesz lubaczewski <[email protected]>
2025-01-19 12:51 ` [email protected]
2025-01-19 13:50 ` Boris Zentner <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox