From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Subject: | Re: [PATCH] Slight improvement of worker_spi.c example |
Date: | 2023-06-13 09:34:09 |
Message-ID: | CAJ7c6TP_6Rw4nbadARiyWjgiQUsdKQu2o457+7PDdUodjFHfsg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
> On Sat, Jun 03, 2023 at 06:35:00PM -0400, Michael Paquier wrote:
> > It does not have to be complicated, but I definitely agree that we'd
> > better spend some efforts in improving it as a whole especially
> > knowing that this is mentioned on the docs as an example that one
> > could rely on.
>
> +1. I know I've used worker_spi as a reference for writing background
> workers before.
Thanks for the feedback.
> I agree that the current code
> could lead folks to think that PushActiveSnapshot must go after
> SPI_connect, but wouldn't the reverse ordering just give folks the opposite
> impression?
This is the exact reason why the original patch had an explicit
comment that the ordering is not important in this case. It was argued
however that the comment is redundant and thus it was removed.
--
Best regards,
Aleksander Alekseev
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2023-06-13 09:38:42 | Re: Views no longer in rangeTabls? |
Previous Message | Alvaro Herrera | 2023-06-13 09:33:40 | Re: Views no longer in rangeTabls? |