Re: Where to find the Makefile.global?

2023-04-21 Thread Tom Lane
Wen Yi writes: > When I read the makefile,I can't find the '/src/Makefile.global' > Can someone provide a suggestion? Makefile.global is made from Makefile.global.in by the configure script. regards, tom lane

Where to find the Makefile.global?

2023-04-21 Thread Wen Yi
Hi team, I'm a newbie to the postgres and I want to learn the principle of libpq. When I read the makefile,I can't find the '/src/Makefile.global' Can someone provide a suggestion? Yours, WenYI.

Re: vacuum TOAST tables

2023-04-21 Thread senor
Thank you Laurenz. Current settings: name | setting | unit | source -+---+--+ autovacuum | on| | default autovacuum_analyze_scale_factor | 0.1

Re: Why does the planner reduce the planned rows when filtering single values in an array

2023-04-21 Thread Tom Lane
Isaiah Langford writes: > Why is the planner expecting the number of rows to be reduced by the join > filter? Is there any way I can correct the planner here? I think you're running into a couple of issues here: * ANALYZE fails to record any useful stats for a single-row table. It can't form a

Re: HOT update: why must ALL indexes should be update?

2023-04-21 Thread Tom Lane
Daniel Wu writes: > We have many indexes on a table. The chance is that any column could be > some part of an index. I understand that when an index has a column that is > updated, we can't use HOT, because the index entry could point to a totally > different row. But if I have 10 indexes, if only

HOT update: why must ALL indexes should be update?

2023-04-21 Thread Daniel Wu
We have many indexes on a table. The chance is that any column could be some part of an index. I understand that when an index has a column that is updated, we can't use HOT, because the index entry could point to a totally different row. But if I have 10 indexes, if only 1 index will be updated, w

Why does the planner reduce the planned rows when filtering single values in an array

2023-04-21 Thread Isaiah Langford
When I run the following, on PostgreSQL 13.5: SELECT single_value INTO pg_temp.single_value_table FROM generate_series(1, 1) AS single_value; SELECT series_value, ARRAY[1] AS single_value_array INTO pg_temp.series_with_arrays FROM generate_series(1, 10) AS series_value; ANALYZE pg_temp.singl

Re: missing something about json syntax

2023-04-21 Thread Marc Millas
Ok, thanks. Le jeu. 20 avr. 2023 à 22:42, Tom Lane a écrit : > Marc Millas writes: > > but it doesnt explain how postgres is able to put a scalar in a json or > > jsonb column without pb: > > I don't understand how this ('"{\"t\"}"') can be considered a valid > enough > > json to be inserted i

Unexpectedly huge memory usage (over 180x of work_mem) during hash join... confirmed by TopMemoryContext results (postgresql 13.10)

2023-04-21 Thread Maxim Boguk
Hi, During investigation of the OOM server crash (with more than 30GB available memory) I found it was triggered by a single query. related settings: work_mem=32MB hash_mem_multiplier=1 max_parallel_workers_per_gather=3 Now the result of the investigation performed on an idle server with no othe