pgsql: Report stats when replaying XLOG_RUNNING_XACTS

2023-06-12 Thread Andres Freund
Report stats when replaying XLOG_RUNNING_XACTS Previously stats in the startup process would only get reported during shutdown of the startup process. It has been that way for a long time, but became a lot more noticeable with the new pg_stat_io view, which separates out IO done by different backe

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-06-12 Thread David G. Johnston
On Monday, June 12, 2023, David G. Johnston wrote: > On Mon, Jun 12, 2023 at 5:40 PM Jeff Davis wrote: > >> On Mon, 2023-06-12 at 13:05 -0400, Noah Misch wrote: >> > The timing was not great, but this is fixing a purported defect in an >> > older >> > v16 feature. If the MAINTAIN privilege is a

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-06-12 Thread David G. Johnston
On Mon, Jun 12, 2023 at 5:40 PM Jeff Davis wrote: > On Mon, 2023-06-12 at 13:05 -0400, Noah Misch wrote: > > The timing was not great, but this is fixing a purported defect in an > > older > > v16 feature. If the MAINTAIN privilege is actually fine, we're all > > set for > > v16. If MAINTAIN do

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-06-12 Thread Jeff Davis
On Mon, 2023-06-12 at 13:05 -0400, Noah Misch wrote: > The timing was not great, but this is fixing a purported defect in an > older > v16 feature.  If the MAINTAIN privilege is actually fine, we're all > set for > v16.  If MAINTAIN does have a material problem that $SUBJECT had > fixed, we > shoul

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-06-12 Thread Jeff Davis
On Mon, 2023-06-12 at 13:33 -0400, Robert Haas wrote: > I wonder why this commit used pg_catalog, pg_temp rather than just > the > empty string, as AutoVacWorkerMain does. I followed the rules here for "Writing SECURITY DEFINER Functions Safely": https://www.postgresql.org/docs/16/sql-createfunct

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-06-12 Thread Robert Haas
On Mon, Jun 12, 2023 at 1:05 PM Noah Misch wrote: > > I concur with the upthread objection that it is way too late in > > the release cycle to be introducing a breaking change like this. > > I request that you revert it. > > The timing was not great, but this is fixing a purported defect in an old

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-06-12 Thread Noah Misch
On Sat, Jun 10, 2023 at 01:33:31AM -0400, Tom Lane wrote: > Jeff Davis writes: > > Attached a patch to mark those functions as PARALLEL UNSAFE, which > > fixes the problem. > > > Alternatively, I could just take out that line, as those SQL functions > > are not controlled by the MAINTAIN privileg

pgsql: Accept fractional seconds in jsonpath's datetime() method.

2023-06-12 Thread Tom Lane
Accept fractional seconds in jsonpath's datetime() method. Commit 927d9abb6 purported to make datetime() accept any string that could be output for a datetime value by to_jsonb(). But it overlooked the possibility of fractional seconds being present, so that cases as simple as to_jsonb(now()) wou

pgsql: Accept fractional seconds in jsonpath's datetime() method.

2023-06-12 Thread Tom Lane
Accept fractional seconds in jsonpath's datetime() method. Commit 927d9abb6 purported to make datetime() accept any string that could be output for a datetime value by to_jsonb(). But it overlooked the possibility of fractional seconds being present, so that cases as simple as to_jsonb(now()) wou

pgsql: Accept fractional seconds in jsonpath's datetime() method.

2023-06-12 Thread Tom Lane
Accept fractional seconds in jsonpath's datetime() method. Commit 927d9abb6 purported to make datetime() accept any string that could be output for a datetime value by to_jsonb(). But it overlooked the possibility of fractional seconds being present, so that cases as simple as to_jsonb(now()) wou

pgsql: Accept fractional seconds in jsonpath's datetime() method.

2023-06-12 Thread Tom Lane
Accept fractional seconds in jsonpath's datetime() method. Commit 927d9abb6 purported to make datetime() accept any string that could be output for a datetime value by to_jsonb(). But it overlooked the possibility of fractional seconds being present, so that cases as simple as to_jsonb(now()) wou

pgsql: Give postgres.exe the icon of other executables.

2023-06-12 Thread Noah Misch
Give postgres.exe the icon of other executables. We had left it icon-free since users won't achieve much by opening it from Windows Explorer. Subsequent to that decision, Task Manager started to show the icon. That shifts the balance in favor of attaching the icon, so do so. No back-patch, but

pgsql: Add win32ver data to meson-built postgres.exe.

2023-06-12 Thread Noah Misch
Add win32ver data to meson-built postgres.exe. As in the older build systems, the resources object is not an input to postgres.def. Reviewed by Andres Freund. Discussion: https://postgr.es/m/20230607231407.gc1334...@rfd.leadboat.com Branch -- master Details --- https://git.postgresql.o

pgsql: src/tools/msvc: Move all.sym temporary file back to Debug/postgr

2023-06-12 Thread Noah Misch
src/tools/msvc: Move all.sym temporary file back to Debug/postgres. Commit 70df2df1cc89e69e31b31b6aa0d65fd72935af38 moved it to the top_srcdir, where it caused "git status" noise. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6e723f6d7b3642ef9457b8eddd27ebb616d7a7

pgsql: src/tools/msvc/clean.bat: Reconcile with PostgreSQL 16 work.

2023-06-12 Thread Noah Misch
src/tools/msvc/clean.bat: Reconcile with PostgreSQL 16 work. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0c524370203b85b49ca3b52c7a705b867d7c7167 Modified Files -- src/tools/msvc/clean.bat | 14 +- 1 file changed, 13 insertions(+), 1 delet

pgsql: Fix "wrong varnullingrels" for subquery nestloop parameters.

2023-06-12 Thread Tom Lane
Fix "wrong varnullingrels" for subquery nestloop parameters. If we apply outer join identity 3 when relation C is a subquery having lateral references to relation B, then the lateral references within C continue to bear the original syntactically-correct varnullingrels marks, but that won't match

pgsql: Remove a few unused global variables and declarations.

2023-06-12 Thread Heikki Linnakangas
Remove a few unused global variables and declarations. - Commit 3eb77eba5a, which moved the pending ops queue from md.c to sync.c, introduced a duplicate, unused 'pendingOpsCxt' variable. (I'm surprised none of the compilers or static analysis tools have complained about that.) - Commit c2f