From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Slight improvement of worker_spi.c example |
Date: | 2023-06-03 11:09:26 |
Message-ID: | CAJ7c6TOaX8wf60DVozm=cLLLFoLX1O7rM8fiHdURq1+FV1NDWw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
> The patch changes the order to:
>
> StartTransactionCommand();
> PushActiveSnapshot(...);
> SPI_connect();
>
> ...
>
> SPI_finish();
> PopActiveSnapshot();
> CommitTransactionCommand();
>
> ... and also clarifies that the order of PushActiveSnapshot(...) and
> SPI_connect() is not important.
Additionally I noticed that the check:
```
if (!process_shared_preload_libraries_in_progress)
return;
```
... was misplaced in _PG_init(). Here is the patch v2 which fixes this too.
--
Best regards,
Aleksander Alekseev
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Slight-improvement-of-worker_spi.c-example.patch | application/x-patch | 3.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Rouhaud | 2023-06-03 11:15:47 | Re: [PATCH] Slight improvement of worker_spi.c example |
Previous Message | Ranier Vilela | 2023-06-03 10:14:57 | Avoid unused value (src/fe_utils/print.c) |