pgsql: Improve a few things in pg_walinspect

2023-03-26 Thread Michael Paquier
Improve a few things in pg_walinspect This improves a few things in pg_walinspect: - Return NULL rather than empty strings in pg_get_wal_records_info() for the block references and the record description if there is no information provided by the fallback. This point has been raised by Peter Geog

pgsql: Generate pg_stat_get_xact*() functions for relations using macro

2023-03-26 Thread Michael Paquier
Generate pg_stat_get_xact*() functions for relations using macros This change replaces seven functions definitions by macros. This is the same idea as 8018ffb or 83a1a1b, taking advantage of the variable rename done in 8089517 for relation entries. Author: Bertrand Drouvot Discussion: https://po

pgsql: Doc: clarify introduction to database roles.

2023-03-26 Thread Tom Lane
Doc: clarify introduction to database roles. Word-smith section 22.1 ("Database Roles") a little bit in hopes of removing confusion about how the bootstrap superuser's name is chosen. While here, I couldn't help noticing that the claim that the bootstrap superuser is the only initially-existing r

Re: pgsql: Fix netmask handling in inet_minmax_multi_ops

2023-03-26 Thread Tom Lane
Tomas Vondra writes: > On 3/20/23 10:28, Tomas Vondra wrote: >> Reported by Dmitry Dolgov, investigation and fix by me. >> Reported-by: Dmitry Dolgov > Correction - the issue was reported by Robins Tharakan, I got confused > while writing the commit message. I don't know if this issue is to be >

pgsql: Fix oversights in array manipulation.

2023-03-26 Thread Tom Lane
Fix oversights in array manipulation. The nested-arrays code path in ExecEvalArrayExpr() used palloc to allocate the result array, whereas every other array-creating function has used palloc0 since 18c0b4ecc. This mostly works, but unused bits past the end of the nulls bitmap may end up undefined

pgsql: Fix oversights in array manipulation.

2023-03-26 Thread Tom Lane
Fix oversights in array manipulation. The nested-arrays code path in ExecEvalArrayExpr() used palloc to allocate the result array, whereas every other array-creating function has used palloc0 since 18c0b4ecc. This mostly works, but unused bits past the end of the nulls bitmap may end up undefined

pgsql: Fix oversights in array manipulation.

2023-03-26 Thread Tom Lane
Fix oversights in array manipulation. The nested-arrays code path in ExecEvalArrayExpr() used palloc to allocate the result array, whereas every other array-creating function has used palloc0 since 18c0b4ecc. This mostly works, but unused bits past the end of the nulls bitmap may end up undefined

pgsql: Fix oversights in array manipulation.

2023-03-26 Thread Tom Lane
Fix oversights in array manipulation. The nested-arrays code path in ExecEvalArrayExpr() used palloc to allocate the result array, whereas every other array-creating function has used palloc0 since 18c0b4ecc. This mostly works, but unused bits past the end of the nulls bitmap may end up undefined

pgsql: Fix oversights in array manipulation.

2023-03-26 Thread Tom Lane
Fix oversights in array manipulation. The nested-arrays code path in ExecEvalArrayExpr() used palloc to allocate the result array, whereas every other array-creating function has used palloc0 since 18c0b4ecc. This mostly works, but unused bits past the end of the nulls bitmap may end up undefined

pgsql: Fix oversights in array manipulation.

2023-03-26 Thread Tom Lane
Fix oversights in array manipulation. The nested-arrays code path in ExecEvalArrayExpr() used palloc to allocate the result array, whereas every other array-creating function has used palloc0 since 18c0b4ecc. This mostly works, but unused bits past the end of the nulls bitmap may end up undefined

Re: pgsql: Fix netmask handling in inet_minmax_multi_ops

2023-03-26 Thread Tomas Vondra
On 3/20/23 10:28, Tomas Vondra wrote: > Fix netmask handling in inet_minmax_multi_ops > > When calculating distance in brin_minmax_multi_distance_inet(), the > netmask was applied incorrectly. This results in (seemingly) incorrect > ordering of values, triggering an assert. > > For builds without