pgsql: Make write of pgstats file durable at shutdown

2024-07-16 Thread Michael Paquier
Make write of pgstats file durable at shutdown This switches the pgstats write code to use durable_rename() rather than rename(). This ensures that the stats file's data is durable when the statistics are written, which is something only happening at shutdown now with the checkpointer doing the j

Re: pgsql: Adjust recently added test for pg_signal_autovacuum role

2024-07-16 Thread Michael Paquier
On Tue, Jul 16, 2024 at 02:08:55PM +, Andrew Dunstan wrote: > Adjust recently added test for pg_signal_autovacuum role > > This test was added by commit d2b74882ca, but fails if > log_error_verbosity is set to verbose. Adjust the regex that checks the > error message to allow for it containing

pgsql: When creating materialized views, use REFRESH to load data.

2024-07-16 Thread Jeff Davis
When creating materialized views, use REFRESH to load data. Previously, CREATE MATERIALIZED VIEW ... WITH DATA populated the MV the same way as CREATE TABLE ... AS. Instead, reuse the REFRESH logic, which locks down security-restricted operations and restricts the search_path. This reduces the ch

pgsql: When creating materialized views, use REFRESH to load data.

2024-07-16 Thread Jeff Davis
When creating materialized views, use REFRESH to load data. Previously, CREATE MATERIALIZED VIEW ... WITH DATA populated the MV the same way as CREATE TABLE ... AS. Instead, reuse the REFRESH logic, which locks down security-restricted operations and restricts the search_path. This reduces the ch

pgsql: Add a couple of recent commits to .git-blame-ignore-revs.

2024-07-16 Thread Nathan Bossart
Add a couple of recent commits to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0a8ca122e511884d98a640cb3302866b74638688 Modified Files -- .git-blame-ignore-revs | 6 ++ 1 file changed, 6 insertions(+)

pgsql: Adjust recently added test for pg_signal_autovacuum role

2024-07-16 Thread Andrew Dunstan
Adjust recently added test for pg_signal_autovacuum role This test was added by commit d2b74882ca, but fails if log_error_verbosity is set to verbose. Adjust the regex that checks the error message to allow for it containing an SQL status code. Branch -- master Details --- https://git.po