doc: Avoid too prominent use of "backup" on pg_dump man page
Some users inadvertently rely on pg_dump as their primary backup tool,
when better solutions exist. The pg_dump man page is arguably
misleading in that it starts with
"pg_dump is a utility for backing up a PostgreSQL database."
This t
Make building with LTO work on macOS
When building with -flto, the backend binary must keep many otherwise
unused symbols to make them available to dynamically loaded modules /
extensions. This has been done via -Wl,--export-dynamic on many
platforms for years. This flag is not supported by the
Fix random failure in 021_twophase.
After disabling the subscription, the failed test was changing the
two_phase option for the subscription. We can't change the two_phase
option for a subscription till the corresponding apply worker is active.
The check to ensure that the replication apply worker
Relax check for return value from second call of pg_strnxfrm().
strxfrm() is not guaranteed to return the exact number of bytes needed
to store the result; it may return a higher value.
Discussion:
https://postgr.es/m/32f85d88d1f64395abfe5a10dd97a62a4d3474ce.ca...@j-davis.com
Reviewed-by: Heikki
Relax check for return value from second call of pg_strnxfrm().
strxfrm() is not guaranteed to return the exact number of bytes needed
to store the result; it may return a higher value.
Discussion:
https://postgr.es/m/32f85d88d1f64395abfe5a10dd97a62a4d3474ce.ca...@j-davis.com
Reviewed-by: Heikki
Relax check for return value from second call of pg_strnxfrm().
strxfrm() is not guaranteed to return the exact number of bytes needed
to store the result; it may return a higher value.
Discussion:
https://postgr.es/m/32f85d88d1f64395abfe5a10dd97a62a4d3474ce.ca...@j-davis.com
Reviewed-by: Heikki
Refactor getWeights to write to caller-supplied buffer
This gets rid of the static result buffer.
Reviewed-by: Robert Haas
Discussion:
https://www.postgresql.org/message-id/7f86e06a-98c5-4ce3-8ec9-3885c8de0...@iki.fi
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff
Replace static buf with palloc in str_time()
The function is used only once in the startup process, so the leak
into current memory context is harmless.
This is a tiny step in making the server thread-safe.
Reviewed-by: Robert Haas
Discussion:
https://www.postgresql.org/message-id/7f86e06a-98c5
Replace static buf with a stack-allocated one in ReadControlFile
It's only used very locally within the function.
Reviewed-by: Robert Haas
Discussion:
https://www.postgresql.org/message-id/7f86e06a-98c5-4ce3-8ec9-3885c8de0...@iki.fi
Branch
--
master
Details
---
https://git.postgresql.o
Replace static bufs with a StringInfo in cash_words()
For clarity. The code was correct, and the buffer was large enough,
but string manipulation with no bounds checking is scary.
This incurs an extra palloc+pfree to every call, but in quick
performance testing, it doesn't seem to be significant.
Replace static buf with a stack-allocated one in 'seg' extension
The buffer is used only locally within the function. Also, the
initialization to '0' characters was unnecessary, the initial content
were always overwritten with sprintf(). I don't understand why it was
done that way, but it's been l
Remove leftover function declaration
Commit 9d9b9d46f3 removed the function (or rather, moved it to a
different source file and renamed it to SendCancelRequest), but forgot
the declaration in the header file.
Branch
--
master
Details
---
https://git.postgresql.org/pg/commitdiff/47c98035c
Preserve tz when converting to jsonb timestamptz
This removes an inconsistency in the treatment of different datatypes by
the jsonpath timestamp_tz() function. Conversions from data types that
are not timestamp-aware, such as date and timestamp, are now treated
consistently with conversion from th
Preserve tz when converting to jsonb timestamptz
This removes an inconsistency in the treatment of different datatypes by
the jsonpath timestamp_tz() function. Conversions from data types that
are not timestamp-aware, such as date and timestamp, are now treated
consistently with conversion from th
Remove spinlocks and atomics from meson_options.txt.
Commits e2562667 and 81385261 removed the configure equivalents, but
forgot to remove these options from meson_options.txt.
Revealed by the fact that build farm animals rorqual and francolin
didn't fail, despite being configured to set those op
On Tue, Jul 30, 2024 at 11:09 PM Heikki Linnakangas wrote:
> The SpinLockSemaArray field should be completely completely, nut just
> the #ifndef guard around it.
Looks like I had that right in the first version, but got confused
while rebasing over a conflict. Fixed, thanks!
Remove useless member of BackendParameters.
Oversight in e2562667, which stopped using SpinlockSemaArray but forgot
to remove it from the array.
Reported-by: Heikki Linnakangas
Discussion: https://postgr.es/m/310f4005-91d7-42b2-ac70-92624260dd28%40iki.fi
Branch
--
master
Details
---
ht
On 30/07/2024 14:03, Thomas Munro wrote:
Remove --disable-spinlocks.
Sorry, spotted this only now:
--- a/src/backend/postmaster/launch_backend.c
+++ b/src/backend/postmaster/launch_backend.c
@@ -108,9 +108,7 @@ typedef struct
#ifdef USE_INJECTION_POINTS
struct InjectionPointsCtl *ActiveI
Remove --disable-spinlocks.
A later change will require atomic support, so it wouldn't make sense
for a hypothetical new system not to be able to implement spinlocks.
Reviewed-by: Heikki Linnakangas
Reviewed-by: Tom Lane (concept, not the patch)
Reviewed-by: Andres Freund (concept, not the pat
Require compiler barrier support.
Previously we had a fallback implementation of pg_compiler_barrier()
that called an empty function across a translation unit boundary so the
compiler couldn't see what it did. That shouldn't be needed on any
current systems, and might not even work with a link ti
Remove --disable-atomics, require 32 bit atomics.
Modern versions of all relevant architectures and tool chains have
atomics support. Since edadeb07, there is no remaining reason to carry
code that simulates atomic flags and uint32 imperfectly with spinlocks.
64 bit atomics are still emulated wit
Require memory barrier support.
Previously we had a fallback implementation that made a harmless system
call, based on the assumption that system calls must contain a memory
barrier. That shouldn't be reached on any current system, and it seems
highly likely that we can easily find out how to req
pg_createsubscriber: Remove obsolete comment
This comment should have been removed by commit b9639138262. There is
no replication slot check on the primary anymore.
Author: Euler Taveira
Discussion:
https://www.postgresql.org/message-id/697d692f-f9d3-41f6-9f0e-29a4fb18e...@app.fastmail.com
Br
pg_createsubscriber: Remove obsolete comment
This comment should have been removed by commit b9639138262. There is
no replication slot check on the primary anymore.
Author: Euler Taveira
Discussion:
https://www.postgresql.org/message-id/697d692f-f9d3-41f6-9f0e-29a4fb18e...@app.fastmail.com
Br
Stabilize xid_wraparound tests
The tests had a race condition if autovacuum was set to off. Instead we
create all the tables we are interested in with autovacuum disabled, so
they are only ever touched when in danger of wraparound.
Discussion:
https://postgr.es/m/3e2cbd24-f45e-4b2b-ba83-8149214f
Stabilize xid_wraparound tests
The tests had a race condition if autovacuum was set to off. Instead we
create all the tables we are interested in with autovacuum disabled, so
they are only ever touched when in danger of wraparound.
Discussion:
https://postgr.es/m/3e2cbd24-f45e-4b2b-ba83-8149214f
pg_createsubscriber: Fix an unpredictable recovery wait time.
The problem is that the tool is using the LSN returned by
pg_create_logical_replication_slot() as recovery_target_lsn. This LSN is
ahead of the current WAL position and the recovery waits until the
publisher writes a WAL record to reach
pg_createsubscriber: Fix an unpredictable recovery wait time.
The problem is that the tool is using the LSN returned by
pg_create_logical_replication_slot() as recovery_target_lsn. This LSN is
ahead of the current WAL position and the recovery waits until the
publisher writes a WAL record to reach
Disallow setting MAX_PARTITION_BUFFERS to less than 2
Add some comments to mention that this value must be at least 2 and also
add a StaticAssertDecl to cause compilation failure if anyone tries to
build with an invalid value.
The multiInsertBuffers list must have at least two elements due to how
Make collation not depend on setlocale().
Now that the result of pg_newlocale_from_collation() is always
non-NULL, then we can move the collate_is_c and ctype_is_c flags into
pg_locale_t. That simplifies the logic in lc_collate_is_c() and
lc_ctype_is_c(), removing the dependence on setlocale().
T
30 matches
Mail list logo