Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Peter Eisentraut
On 19.04.24 05:50, Anton A. Melnikov wrote: There is a macro XLOG_CONTROL_FILE for control file name defined in access/xlog_internal.h And there are some places in code where this macro is used like here

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Anton A. Melnikov
On 24.04.2024 12:02, Peter Eisentraut wrote: On 19.04.24 05:50, Anton A. Melnikov wrote: May be better use this macro everywhere in C code? I don't know.  I don't find XLOG_CONTROL_FILE to be a very intuitive proxy for "pg_control". Then maybe replace XLOG_CONTROL_FILE with

Short-circuit sort_inner_and_outer if there are no mergejoin clauses

2024-04-24 Thread Richard Guo
In sort_inner_and_outer, we create mergejoin join paths by explicitly sorting both relations on each possible ordering of the available mergejoin clauses. However, if there are no available mergejoin clauses, we can skip this process entirely. It seems that this is a relatively common scenario.

Re: Fix parallel vacuum buffer usage reporting

2024-04-24 Thread Anthonin Bonnefoy
Thanks for the review! > I think that if the anayze command doesn't have the same issue, we > don't need to change it. Good point, I've wrongly assumed that analyze was also impacted but there's no parallel analyze so the block count is correct. > (a) make lazy vacuum use BufferUsage instead

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Daniel Gustafsson
> On 24 Apr 2024, at 11:13, Anton A. Melnikov wrote: > > On 24.04.2024 12:02, Peter Eisentraut wrote: >> On 19.04.24 05:50, Anton A. Melnikov wrote: >>> >>> May be better use this macro everywhere in C code? >> I don't know. I don't find XLOG_CONTROL_FILE to be a very intuitive proxy >> for

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-04-24 Thread Anton A. Melnikov
On 24.04.2024 12:19, Daniel Gustafsson wrote: On 24 Apr 2024, at 11:13, Anton A. Melnikov wrote: On 24.04.2024 12:02, Peter Eisentraut wrote: On 19.04.24 05:50, Anton A. Melnikov wrote: May be better use this macro everywhere in C code? I don't know. I don't find XLOG_CONTROL_FILE to be a

Small filx on the documentation of ALTER DEFAULT PRIVILEGES

2024-04-24 Thread Yugo NAGATA
Hi, Hi, We can specify more than one privilege type in "ALTER DEFAULT PRIVILEGES GRANT/REVOKE ON SCHEMAS", for example, ALTER DEFAULT PRIVILEGES GRANT USAGE,CREATE ON SCHEMAS TO PUBLIC; However, the syntax described in the documentation looks to be allowing only one, GRANT { USAGE |

minor error message inconsistency in make_pathkey_from_sortinfo

2024-04-24 Thread jian he
hi. in make_pathkey_from_sortinfo equality_op = get_opfamily_member(opfamily, opcintype, opcintype, BTEqualStrategyNumber); if (!OidIsValid(equality_op)) /* shouldn't happen */ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u", BTEqualStrategyNumber, opcintype, opcintype, opfamily);

Re: Cleanup: remove unused fields from nodes

2024-04-24 Thread Michael Paquier
On Tue, Apr 23, 2024 at 11:03:40PM -0400, Tom Lane wrote: > Hah. Seems like the comment for isall needs to explain that it > exists for this purpose, so we don't make this mistake again. How about something like the attached? -- Michael diff --git a/src/include/nodes/parsenodes.h

Re: Feature request: schema diff tool

2024-04-24 Thread Heikki Linnakangas
On 24/04/2024 09:44, Neszt Tibor wrote: Hello, A diff tool that would generate create, drop, alter, etc. commands from the differences between 2 specified schemes would be very useful. The diff could even manage data, so there would be insert, delete update command outputs, although I think

Re: GUC-ify walsender MAX_SEND_SIZE constant

2024-04-24 Thread Jakub Wartak
Hi, > My understanding of Majid's use-case for tuning MAX_SEND_SIZE is that the > bottleneck is storage, not network. The reason MAX_SEND_SIZE affects that is > that it determines the max size passed to WALRead(), which in turn determines > how much we read from the OS at once. If the storage

Partitioned tables and [un]loggedness

2024-04-24 Thread Michael Paquier
Hi all, As a recent poke on a thread of 2019 has reminded me, the current situation of partitioned tables with unlogged is kind of weird: https://www.postgresql.org/message-id/15954-b61523bed4b110c4%40postgresql.org To sum up the situation: - ALTER TABLE .. SET LOGGED/UNLOGGED does not affect

Rename libpq trace internal functions

2024-04-24 Thread Peter Eisentraut
libpq's pqTraceOutputMessage() used to look like this: case 'Z': /* Ready For Query */ pqTraceOutputZ(conn->Pfdebug, message, ); break; Commit f4b54e1ed98 introduced macros for protocol characters, so now it looks like this: case PqMsg_ReadyForQuery:

Re: Is it acceptable making COPY format extendable?

2024-04-24 Thread Peter Eisentraut
On 23.04.24 07:14, Sutou Kouhei wrote: Hi, I'm proposing a patch that making COPY format extendable: https://www.postgresql.org/message-id/20231204.153548.2126325458835528809.kou%40clear-code.com https://commitfest.postgresql.org/48/4681/ It's based on the discussion at:

<    1   2