agora inbox for [email protected]
help / color / mirror / Atom feed[PATCH v17 06/10] pg_ls_*dir to show directories and "isdir" column..
5+ messages / 4 participants
[nested] [flat]
* [PATCH v17 06/10] pg_ls_*dir to show directories and "isdir" column..
@ 2020-03-09 06:00 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Justin Pryzby @ 2020-03-09 06:00 UTC (permalink / raw)
pg_ls_logdir, pg_ls_waldir, pg_ls_archive_statusdir
Need catversion bump
---
doc/src/sgml/func.sgml | 38 +++++++++++---------
src/backend/utils/adt/genfile.c | 11 +++---
src/include/catalog/pg_proc.dat | 12 +++----
src/test/regress/expected/misc_functions.out | 4 +--
4 files changed, 37 insertions(+), 28 deletions(-)
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index c9d1857182..8e0de7c02d 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -25700,12 +25700,14 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
<returnvalue>setof record</returnvalue>
( <parameter>name</parameter> <type>text</type>,
<parameter>size</parameter> <type>bigint</type>,
- <parameter>modification</parameter> <type>timestamp with time zone</type> )
+ <parameter>modification</parameter> <type>timestamp with time zone</type>,
+ <parameter>isdir</parameter> <type>boolean</type> )
</para>
<para>
- Returns the name, size, and last modification time (mtime) of each
- ordinary file in the server's log directory. Filenames beginning with
- a dot, directories, and other special files are excluded.
+ For each file in the server's log directory,
+ return the file's name, size, last modification time (mtime), and a boolean
+ indicating if the file is a directory.
+ Filenames beginning with a dot and special file types are excluded.
</para>
<para>
This function is restricted to superusers and members of
@@ -25725,7 +25727,8 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
<returnvalue>setof record</returnvalue>
( <parameter>name</parameter> <type>text</type>,
<parameter>size</parameter> <type>bigint</type>,
- <parameter>modification</parameter> <type>timestamp with time zone</type> )
+ <parameter>modification</parameter> <type>timestamp with time zone</type>,
+ <parameter>isdir</parameter> <type>boolean</type> )
</para>
<para>
For each file in the specified directory, list the file and its
@@ -25744,13 +25747,14 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
<returnvalue>setof record</returnvalue>
( <parameter>name</parameter> <type>text</type>,
<parameter>size</parameter> <type>bigint</type>,
- <parameter>modification</parameter> <type>timestamp with time zone</type> )
+ <parameter>modification</parameter> <type>timestamp with time zone</type>,
+ <parameter>isdir</parameter> <type>boolean</type> )
</para>
<para>
- Returns the name, size, and last modification time (mtime) of each
- ordinary file in the server's write-ahead log (WAL) directory.
- Filenames beginning with a dot, directories, and other special files
- are excluded.
+ For each file in the server's write-ahead log (WAL) directory, list the
+ file's name, size, last modification time (mtime), and a boolean
+ indicating if the file is a directory.
+ Filenames beginning with a dot and special files types are excluded.
</para>
<para>
This function is restricted to superusers and members of
@@ -25768,13 +25772,15 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
<returnvalue>setof record</returnvalue>
( <parameter>name</parameter> <type>text</type>,
<parameter>size</parameter> <type>bigint</type>,
- <parameter>modification</parameter> <type>timestamp with time zone</type> )
+ <parameter>modification</parameter> <type>timestamp with time zone</type>,
+ <parameter>isdir</parameter> <type>boolean</type> )
</para>
<para>
- Returns the name, size, and last modification time (mtime) of each
- ordinary file in the server's WAL archive status directory
- (<filename>pg_wal/archive_status</filename>). Filenames beginning
- with a dot, directories, and other special files are excluded.
+ For each file in the server's WAL archive status directory
+ (<filename>pg_wal/archive_status</filename>), list the file's
+ name, size, last modification time (mtime), and a boolean indicating if
+ the file is a directory.
+ Filenames beginning with a dot and special file types are excluded.
</para>
<para>
This function is restricted to superusers and members of
@@ -25798,7 +25804,7 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
</para>
<para>
For each file in the temporary directory within the given
- <parameter>tablespace</parameter>, return each file's name, size, last
+ <parameter>tablespace</parameter>, list the file's name, size, last
modification time (mtime) and a boolean indicating if the file is a directory.
Directories are used for temporary files shared by parallel processes.
If <parameter>tablespace</parameter> is not provided, the
diff --git a/src/backend/utils/adt/genfile.c b/src/backend/utils/adt/genfile.c
index 023f1ad605..fba63568b6 100644
--- a/src/backend/utils/adt/genfile.c
+++ b/src/backend/utils/adt/genfile.c
@@ -52,6 +52,9 @@ static Datum pg_ls_dir_files(FunctionCallInfo fcinfo, const char *dir, int flags
*/
#define LS_DIR_HISTORIC (LS_DIR_SKIP_DIRS|LS_DIR_SKIP_HIDDEN|LS_DIR_SKIP_SPECIAL|LS_DIR_METADATA)
+/* Shortcut for common behavior */
+#define LS_DIR_COMMON (LS_DIR_SKIP_HIDDEN|LS_DIR_SKIP_SPECIAL|LS_DIR_METADATA)
+
/*
* Convert a "text" filename argument to C string, and check it's allowable.
*
@@ -644,14 +647,14 @@ pg_ls_dir_files(FunctionCallInfo fcinfo, const char *dir, int flags)
Datum
pg_ls_logdir(PG_FUNCTION_ARGS)
{
- return pg_ls_dir_files(fcinfo, Log_directory, LS_DIR_HISTORIC);
+ return pg_ls_dir_files(fcinfo, Log_directory, LS_DIR_COMMON);
}
/* Function to return the list of files in the WAL directory */
Datum
pg_ls_waldir(PG_FUNCTION_ARGS)
{
- return pg_ls_dir_files(fcinfo, XLOGDIR, LS_DIR_HISTORIC);
+ return pg_ls_dir_files(fcinfo, XLOGDIR, LS_DIR_COMMON);
}
/*
@@ -670,7 +673,7 @@ pg_ls_tmpdir(FunctionCallInfo fcinfo, Oid tblspc)
TempTablespacePath(path, tblspc);
return pg_ls_dir_files(fcinfo, path,
- LS_DIR_SKIP_HIDDEN | LS_DIR_SKIP_SPECIAL | LS_DIR_ISDIR | LS_DIR_METADATA | LS_DIR_MISSING_OK);
+ LS_DIR_COMMON | LS_DIR_MISSING_OK);
}
/*
@@ -700,7 +703,7 @@ Datum
pg_ls_archive_statusdir(PG_FUNCTION_ARGS)
{
return pg_ls_dir_files(fcinfo, XLOGDIR "/archive_status",
- LS_DIR_HISTORIC | LS_DIR_MISSING_OK);
+ LS_DIR_COMMON | LS_DIR_MISSING_OK);
}
/*
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index dc3b497587..adfce45d1a 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -10880,18 +10880,18 @@
{ oid => '3353', descr => 'list files in the log directory',
proname => 'pg_ls_logdir', procost => '10', prorows => '20', proretset => 't',
provolatile => 'v', prorettype => 'record', proargtypes => '',
- proallargtypes => '{text,int8,timestamptz}', proargmodes => '{o,o,o}',
- proargnames => '{name,size,modification}', prosrc => 'pg_ls_logdir' },
+ proallargtypes => '{text,int8,timestamptz,bool}', proargmodes => '{o,o,o,o}',
+ proargnames => '{name,size,modification,isdir}', prosrc => 'pg_ls_logdir' },
{ oid => '3354', descr => 'list of files in the WAL directory',
proname => 'pg_ls_waldir', procost => '10', prorows => '20', proretset => 't',
provolatile => 'v', prorettype => 'record', proargtypes => '',
- proallargtypes => '{text,int8,timestamptz}', proargmodes => '{o,o,o}',
- proargnames => '{name,size,modification}', prosrc => 'pg_ls_waldir' },
+ proallargtypes => '{text,int8,timestamptz,bool}', proargmodes => '{o,o,o,o}',
+ proargnames => '{name,size,modification,isdir}', prosrc => 'pg_ls_waldir' },
{ oid => '5031', descr => 'list of files in the archive_status directory',
proname => 'pg_ls_archive_statusdir', procost => '10', prorows => '20',
proretset => 't', provolatile => 'v', prorettype => 'record',
- proargtypes => '', proallargtypes => '{text,int8,timestamptz}',
- proargmodes => '{o,o,o}', proargnames => '{name,size,modification}',
+ proargtypes => '', proallargtypes => '{text,int8,timestamptz,bool}',
+ proargmodes => '{o,o,o,o}', proargnames => '{name,size,modification,isdir}',
prosrc => 'pg_ls_archive_statusdir' },
{ oid => '5029', descr => 'list files in the pgsql_tmp directory',
proname => 'pg_ls_tmpdir', procost => '10', prorows => '20', proretset => 't',
diff --git a/src/test/regress/expected/misc_functions.out b/src/test/regress/expected/misc_functions.out
index 38493de732..64b1417fb8 100644
--- a/src/test/regress/expected/misc_functions.out
+++ b/src/test/regress/expected/misc_functions.out
@@ -157,8 +157,8 @@ select count(*) > 0 as ok from (select pg_ls_waldir()) ss;
-- Test not-run-to-completion cases.
select * from pg_ls_waldir() limit 0;
- name | size | modification
-------+------+--------------
+ name | size | modification | isdir
+------+------+--------------+-------
(0 rows)
select count(*) > 0 as ok from (select * from pg_ls_waldir() limit 1) ss;
--
2.17.0
--4LFBTxd4L5NLO6ly
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v17-0007-Add-pg_ls_dir_recurse-to-show-dir-recursively.patch"
^ permalink raw reply [nested|flat] 5+ messages in thread
* 2022-08-11 release announcement draft
@ 2022-08-08 15:50 Jonathan S. Katz <[email protected]>
2022-08-08 16:44 ` Re: 2022-08-11 release announcement draft Justin Pryzby <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan S. Katz @ 2022-08-08 15:50 UTC (permalink / raw)
To: PostgreSQL Hackers <[email protected]>
Hi,
Please see attached draft of the 2022-08-11 release announcement.
Please provide feedback on {technical accuracy, omissions, any other
errors} no later than 2022-08-11 0:00 AoE[1].
Thanks,
Jonathan
[1] https://en.wikipedia.org/wiki/Anywhere_on_Earth
The PostgreSQL Global Development Group has released an update to all supported
versions of PostgreSQL, including 14.5, 13.8, 12.12, 11.17, and 10.22, as well
as the third beta release of PostgreSQL 15. This release fixes over 40 bugs
reported over the last three months.
For the full list of changes, please review the
[release notes](https://www.postgresql.org/docs/release/).
PostgreSQL 10 EOL Upcoming
--------------------------
PostgreSQL 10 will stop receiving fixes on November 10, 2022. If you are
running PostgreSQL 10 in a production environment, we strongly advise that you
make plans to upgrade to a newer, supported version of PostgreSQL so you can
continue to receive bug and security fixes. Please see our
[versioning policy](https://www.postgresql.org/support/versioning/) for more
information.
A Note on the PostgreSQL 15 Beta
--------------------------------
This release marks the third beta release of PostgreSQL 15 and puts the
community one step closer to general availability tentatively around the end of
the third quarter.
In the spirit of the open source PostgreSQL community, we strongly encourage you
to test the new features of PostgreSQL 15 on your systems to help us eliminate
bugs or other issues that may exist. While we do not advise you to run
PostgreSQL 15 Beta 3 in production environments, we encourage you to find ways
to run your typical application workloads against this beta release.
Your testing and feedback will help the community ensure that PostgreSQL 15
upholds our standards of delivering a stable, reliable release of the world's
most advanced open source relational database. Please read more about our
[beta testing process](https://www.postgresql.org/developer/beta/) and how you
can contribute:
[https://www.postgresql.org/developer/beta/](https://www.postgresql.org/developer/beta/)
You can find information about all of the PostgreSQL 15 features and changes in
the [release notes](https://www.postgresql.org/docs/15/release-15.html):
[https://www.postgresql.org/docs/15/release-15.html](https://www.postgresql.org/docs/15/release-15.html)
Bug Fixes and Improvements
--------------------------
This update fixes over 40 bugs that were reported in the last several months.
The issues listed below affect PostgreSQL 14. Some of these issues may also
affect other supported versions of PostgreSQL.
Included in this release:
* Fix replay of [`CREATE DATABASE`](https://www.postgresql.org/docs/current/sql-createdatabase.html)
write-ahead log (WAL) records on standby servers when encountering a missing
[tablespace](https://www.postgresql.org/docs/current/manage-ag-tablespaces.html)
directory.
* Add support for [tablespaces](https://www.postgresql.org/docs/current/manage-ag-tablespaces.html)
that are plain directories instead of symbolic links to other directories.
* Fix permission checks in [`CREATE INDEX`](https://www.postgresql.org/docs/current/sql-createindex.html)
to use the user's permissions. This fixes broken dump/restore scenarios that
relied on the behavior prior to the fix for
[CVE-2022-1552](https://www.postgresql.org/support/security/CVE-2022-1552/).
* In the extended query protocol, force an immediate commit after
[`CREATE DATABASE`](https://www.postgresql.org/docs/current/sql-createdatabase.html)
and other commands that can't run in a transaction block.
* Fix a race condition around checking transaction visibility that was more
likely to happen when using synchronous replication.
* Fix incorrect permission-checking code for
[extended statistics](https://www.postgresql.org/docs/current/planner-stats.html#PLANNER-STATS-EXTENDED).
* Fix extended statistics machinery to handle
[most common value](https://www.postgresql.org/docs/current/planner-stats.html#id-1.5.13.5.4.13)
([MCV](https://www.postgresql.org/docs/current/planner-stats.html#id-1.5.13.5.4.13))-type
statistics on boolean-valued expressions.
* Avoid planner core dump with constant
[`= ANY(array)`](https://www.postgresql.org/docs/current/functions-subquery.html#FUNCTIONS-SUBQUERY-ANY-SOME)
clauses when there are
[MCV-type extended statistics](https://www.postgresql.org/docs/current/planner-stats.html#id-1.5.13.5.4.13)
on the `array` variable.
* Allow cancellation of [`ANALYZE`](https://www.postgresql.org/docs/current/sql-analyze.html)
while it is computing extended statistics.
* Fix [`ALTER TABLE ... ENABLE/DISABLE TRIGGER`](https://www.postgresql.org/docs/current/sql-altertable.html)
to handle recursion for triggers on partitioned tables.
* Reject `ROW()` expressions and functions in `FROM` that have more than 1600
columns.
* Fix memory leak in logical replication subscribers.
* Fix checks in logical replication of replica identity when the target table is
partitioned.
* Arrange to clean up after commit-time errors within
[`SPI_commit()`](https://www.postgresql.org/docs/current/spi-spi-commit.html),
rather than expecting callers to do that. This includes a fix for the same
scenario in [PL/Python](https://www.postgresql.org/docs/current/plpython.html),
which had reported crashes on Python 3.11 and memory leaks on older versions of
Python 3.
* Improve handling in `libpq` of idle states in
[pipeline mode](https://www.postgresql.org/docs/current/libpq-pipeline-mode.html).
* In the [`psql`](https://www.postgresql.org/docs/current/app-psql.html)
`\watch` command, echo a newline after cancellation with control-C.
* Fix [`pg_upgrade`](https://www.postgresql.org/docs/current/pgupgrade.html) to
detect non-upgradable usages of functions accepting `anyarray` parameters.
* Several [`postgres_fdw`](https://www.postgresql.org/docs/current/postgres-fdw.html)
fixes, including prevention of batch insertions when there are
`WITH CHECK OPTION` constraints present.
For the full list of changes available, please review the
[release notes](https://www.postgresql.org/docs/release/).
Updating
--------
All PostgreSQL update releases are cumulative. As with other minor releases,
users are not required to dump and reload their database or use `pg_upgrade` in
order to apply this update release; you may simply shutdown PostgreSQL and
update its binaries.
Users who have skipped one or more update releases may need to run additional,
post-update steps; please see the release notes for earlier versions for
details.
For more details, please see the
[release notes](https://www.postgresql.org/docs/release/).
Updating to PostgreSQL 15 Beta 3
--------------------------------
To upgrade to PostgreSQL 15 Beta 3 from Beta 2, Beta 1, or an earlier version of
PostgreSQL, you will need to use a strategy similar to upgrading between
major versions of PostgreSQL (e.g. `pg_upgrade` or `pg_dump` / `pg_restore`).
For more information, please visit the documentation section on
[upgrading](https://www.postgresql.org/docs/15/static/upgrading.html).
Testing for Bugs & Compatibility
--------------------------------
The stability of each PostgreSQL release greatly depends on you, the community,
to test the upcoming version with your workloads and testing tools to find bugs
and regressions before the general availability of PostgreSQL 15. As
this is a beta release , changes to database behaviors, feature details,
APIs are still possible. Your feedback and testing will help determine the final
tweaks on the new features, so please test in the near future. The quality of
user testing helps determine when we can make a final release.
A list of [open issues](https://wiki.postgresql.org/wiki/PostgreSQL_15_Open_Items)
is publicly available in the PostgreSQL wiki. You can
[report bugs](https://www.postgresql.org/account/submitbug/) using this form on
the PostgreSQL website:
[https://www.postgresql.org/account/submitbug/](https://www.postgresql.org/account/submitbug/)
Links
-----
* [Download](https://www.postgresql.org/download/)
* [Release Notes](https://www.postgresql.org/docs/release/)
* [Security](https://www.postgresql.org/support/security/)
* [Versioning Policy](https://www.postgresql.org/support/versioning/)
* [Beta Testing Information](https://www.postgresql.org/developer/beta/)
* [PostgreSQL 15 Beta Release Notes](https://www.postgresql.org/docs/15/release-15.html)
* [PostgreSQL 15 Open Issues](https://wiki.postgresql.org/wiki/PostgreSQL_15_Open_Items)
* [Follow @postgresql on Twitter](https://twitter.com/postgresql)
Attachments:
[text/plain] 20220811updaterelease.md (8.1K, ../../[email protected]/2-20220811updaterelease.md)
download | inline:
The PostgreSQL Global Development Group has released an update to all supported
versions of PostgreSQL, including 14.5, 13.8, 12.12, 11.17, and 10.22, as well
as the third beta release of PostgreSQL 15. This release fixes over 40 bugs
reported over the last three months.
For the full list of changes, please review the
[release notes](https://www.postgresql.org/docs/release/).
PostgreSQL 10 EOL Upcoming
--------------------------
PostgreSQL 10 will stop receiving fixes on November 10, 2022. If you are
running PostgreSQL 10 in a production environment, we strongly advise that you
make plans to upgrade to a newer, supported version of PostgreSQL so you can
continue to receive bug and security fixes. Please see our
[versioning policy](https://www.postgresql.org/support/versioning/) for more
information.
A Note on the PostgreSQL 15 Beta
--------------------------------
This release marks the third beta release of PostgreSQL 15 and puts the
community one step closer to general availability tentatively around the end of
the third quarter.
In the spirit of the open source PostgreSQL community, we strongly encourage you
to test the new features of PostgreSQL 15 on your systems to help us eliminate
bugs or other issues that may exist. While we do not advise you to run
PostgreSQL 15 Beta 3 in production environments, we encourage you to find ways
to run your typical application workloads against this beta release.
Your testing and feedback will help the community ensure that PostgreSQL 15
upholds our standards of delivering a stable, reliable release of the world's
most advanced open source relational database. Please read more about our
[beta testing process](https://www.postgresql.org/developer/beta/) and how you
can contribute:
[https://www.postgresql.org/developer/beta/](https://www.postgresql.org/developer/beta/)
You can find information about all of the PostgreSQL 15 features and changes in
the [release notes](https://www.postgresql.org/docs/15/release-15.html):
[https://www.postgresql.org/docs/15/release-15.html](https://www.postgresql.org/docs/15/release-15.html)
Bug Fixes and Improvements
--------------------------
This update fixes over 40 bugs that were reported in the last several months.
The issues listed below affect PostgreSQL 14. Some of these issues may also
affect other supported versions of PostgreSQL.
Included in this release:
* Fix replay of [`CREATE DATABASE`](https://www.postgresql.org/docs/current/sql-createdatabase.html)
write-ahead log (WAL) records on standby servers when encountering a missing
[tablespace](https://www.postgresql.org/docs/current/manage-ag-tablespaces.html)
directory.
* Add support for [tablespaces](https://www.postgresql.org/docs/current/manage-ag-tablespaces.html)
that are plain directories instead of symbolic links to other directories.
* Fix permission checks in [`CREATE INDEX`](https://www.postgresql.org/docs/current/sql-createindex.html)
to use the user's permissions. This fixes broken dump/restore scenarios that
relied on the behavior prior to the fix for
[CVE-2022-1552](https://www.postgresql.org/support/security/CVE-2022-1552/).
* In the extended query protocol, force an immediate commit after
[`CREATE DATABASE`](https://www.postgresql.org/docs/current/sql-createdatabase.html)
and other commands that can't run in a transaction block.
* Fix a race condition around checking transaction visibility that was more
likely to happen when using synchronous replication.
* Fix incorrect permission-checking code for
[extended statistics](https://www.postgresql.org/docs/current/planner-stats.html#PLANNER-STATS-EXTENDED).
* Fix extended statistics machinery to handle
[most common value](https://www.postgresql.org/docs/current/planner-stats.html#id-1.5.13.5.4.13)
([MCV](https://www.postgresql.org/docs/current/planner-stats.html#id-1.5.13.5.4.13))-type
statistics on boolean-valued expressions.
* Avoid planner core dump with constant
[`= ANY(array)`](https://www.postgresql.org/docs/current/functions-subquery.html#FUNCTIONS-SUBQUERY-ANY-SOME)
clauses when there are
[MCV-type extended statistics](https://www.postgresql.org/docs/current/planner-stats.html#id-1.5.13.5.4.13)
on the `array` variable.
* Allow cancellation of [`ANALYZE`](https://www.postgresql.org/docs/current/sql-analyze.html)
while it is computing extended statistics.
* Fix [`ALTER TABLE ... ENABLE/DISABLE TRIGGER`](https://www.postgresql.org/docs/current/sql-altertable.html)
to handle recursion for triggers on partitioned tables.
* Reject `ROW()` expressions and functions in `FROM` that have more than 1600
columns.
* Fix memory leak in logical replication subscribers.
* Fix checks in logical replication of replica identity when the target table is
partitioned.
* Arrange to clean up after commit-time errors within
[`SPI_commit()`](https://www.postgresql.org/docs/current/spi-spi-commit.html),
rather than expecting callers to do that. This includes a fix for the same
scenario in [PL/Python](https://www.postgresql.org/docs/current/plpython.html),
which had reported crashes on Python 3.11 and memory leaks on older versions of
Python 3.
* Improve handling in `libpq` of idle states in
[pipeline mode](https://www.postgresql.org/docs/current/libpq-pipeline-mode.html).
* In the [`psql`](https://www.postgresql.org/docs/current/app-psql.html)
`\watch` command, echo a newline after cancellation with control-C.
* Fix [`pg_upgrade`](https://www.postgresql.org/docs/current/pgupgrade.html) to
detect non-upgradable usages of functions accepting `anyarray` parameters.
* Several [`postgres_fdw`](https://www.postgresql.org/docs/current/postgres-fdw.html)
fixes, including prevention of batch insertions when there are
`WITH CHECK OPTION` constraints present.
For the full list of changes available, please review the
[release notes](https://www.postgresql.org/docs/release/).
Updating
--------
All PostgreSQL update releases are cumulative. As with other minor releases,
users are not required to dump and reload their database or use `pg_upgrade` in
order to apply this update release; you may simply shutdown PostgreSQL and
update its binaries.
Users who have skipped one or more update releases may need to run additional,
post-update steps; please see the release notes for earlier versions for
details.
For more details, please see the
[release notes](https://www.postgresql.org/docs/release/).
Updating to PostgreSQL 15 Beta 3
--------------------------------
To upgrade to PostgreSQL 15 Beta 3 from Beta 2, Beta 1, or an earlier version of
PostgreSQL, you will need to use a strategy similar to upgrading between
major versions of PostgreSQL (e.g. `pg_upgrade` or `pg_dump` / `pg_restore`).
For more information, please visit the documentation section on
[upgrading](https://www.postgresql.org/docs/15/static/upgrading.html).
Testing for Bugs & Compatibility
--------------------------------
The stability of each PostgreSQL release greatly depends on you, the community,
to test the upcoming version with your workloads and testing tools to find bugs
and regressions before the general availability of PostgreSQL 15. As
this is a beta release , changes to database behaviors, feature details,
APIs are still possible. Your feedback and testing will help determine the final
tweaks on the new features, so please test in the near future. The quality of
user testing helps determine when we can make a final release.
A list of [open issues](https://wiki.postgresql.org/wiki/PostgreSQL_15_Open_Items)
is publicly available in the PostgreSQL wiki. You can
[report bugs](https://www.postgresql.org/account/submitbug/) using this form on
the PostgreSQL website:
[https://www.postgresql.org/account/submitbug/](https://www.postgresql.org/account/submitbug/)
Links
-----
* [Download](https://www.postgresql.org/download/)
* [Release Notes](https://www.postgresql.org/docs/release/)
* [Security](https://www.postgresql.org/support/security/)
* [Versioning Policy](https://www.postgresql.org/support/versioning/)
* [Beta Testing Information](https://www.postgresql.org/developer/beta/)
* [PostgreSQL 15 Beta Release Notes](https://www.postgresql.org/docs/15/release-15.html)
* [PostgreSQL 15 Open Issues](https://wiki.postgresql.org/wiki/PostgreSQL_15_Open_Items)
* [Follow @postgresql on Twitter](https://twitter.com/postgresql)
[application/pgp-signature] OpenPGP_signature (840B, ../../[email protected]/3-OpenPGP_signature)
download
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: 2022-08-11 release announcement draft
2022-08-08 15:50 2022-08-11 release announcement draft Jonathan S. Katz <[email protected]>
@ 2022-08-08 16:44 ` Justin Pryzby <[email protected]>
2022-08-08 18:35 ` Re: 2022-08-11 release announcement draft Jonathan S. Katz <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Justin Pryzby @ 2022-08-08 16:44 UTC (permalink / raw)
To: Jonathan S. Katz <[email protected]>; +Cc: [email protected]
On Mon, Aug 08, 2022 at 11:50:16AM -0400, Jonathan S. Katz wrote:
> * Fix [`pg_upgrade`](https://www.postgresql.org/docs/current/pgupgrade.html) to
> detect non-upgradable usages of functions accepting `anyarray` parameters.
use or usage
> and regressions before the general availability of PostgreSQL 15. As
> this is a beta release , changes to database behaviors, feature details,
Extraneous space before comma
> APIs are still possible. Your feedback and testing will help determine the final
and APIs
> tweaks on the new features, so please test in the near future. The quality of
remove "new" before features ?
--
Justin
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: 2022-08-11 release announcement draft
2022-08-08 15:50 2022-08-11 release announcement draft Jonathan S. Katz <[email protected]>
2022-08-08 16:44 ` Re: 2022-08-11 release announcement draft Justin Pryzby <[email protected]>
@ 2022-08-08 18:35 ` Jonathan S. Katz <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan S. Katz @ 2022-08-08 18:35 UTC (permalink / raw)
To: Justin Pryzby <[email protected]>; +Cc: [email protected]
On 8/8/22 12:44 PM, Justin Pryzby wrote:
> On Mon, Aug 08, 2022 at 11:50:16AM -0400, Jonathan S. Katz wrote:
>> * Fix [`pg_upgrade`](https://www.postgresql.org/docs/current/pgupgrade.html) to
>> detect non-upgradable usages of functions accepting `anyarray` parameters.
>
> use or usage
This line comes directly from the release notes and appears to be
correct as is.
>> and regressions before the general availability of PostgreSQL 15. As
>> this is a beta release , changes to database behaviors, feature details,
>
> Extraneous space before comma
Fixed.
>> APIs are still possible. Your feedback and testing will help determine the final
>
> and APIs
Fixed.
>> tweaks on the new features, so please test in the near future. The quality of
>
> remove "new" before features ?
I believe this is personal preference. I would like to leave in "new" as
we are releasing new features in PostgreSQL 15.
Thanks,
Jonathan
Attachments:
[application/pgp-signature] OpenPGP_signature (840B, ../../[email protected]/2-OpenPGP_signature)
download
^ permalink raw reply [nested|flat] 5+ messages in thread
* [PATCH v3 2/3] Remove HAS_TEST_AND_SET.
@ 2026-05-04 21:24 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Nathan Bossart @ 2026-05-04 21:24 UTC (permalink / raw)
This is only set when TAS is defined, so we can just check whether
TAS is defined directly instead.
---
src/include/storage/s_lock.h | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index dcfec8ce2af..fb872edd2f0 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -124,7 +124,6 @@
#ifdef __i386__ /* 32-bit i386 */
-#define HAS_TEST_AND_SET
typedef unsigned char slock_t;
@@ -194,7 +193,6 @@ spin_delay(void)
#ifdef __x86_64__ /* AMD Opteron, Intel EM64T */
-#define HAS_TEST_AND_SET
typedef unsigned char slock_t;
@@ -249,7 +247,6 @@ spin_delay(void)
*/
#if defined(__arm__) || defined(__arm) || defined(__aarch64__)
#ifdef HAVE_GCC__SYNC_INT32_TAS
-#define HAS_TEST_AND_SET
#define TAS(lock) tas(lock)
@@ -292,7 +289,6 @@ spin_delay(void)
/* S/390 and S/390x Linux (32- and 64-bit zSeries) */
#if defined(__s390__) || defined(__s390x__)
-#define HAS_TEST_AND_SET
typedef unsigned int slock_t;
@@ -321,7 +317,6 @@ tas(volatile slock_t *lock)
* acquire/release semantics. The CPU will treat superfluous members as
* NOPs, so it's just code space.
*/
-#define HAS_TEST_AND_SET
typedef unsigned char slock_t;
@@ -392,7 +387,6 @@ do \
/* PowerPC */
#if defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) || defined(__powerpc64__)
-#define HAS_TEST_AND_SET
typedef unsigned int slock_t;
@@ -453,7 +447,6 @@ do \
#if defined(__mips__) && !defined(__sgi) /* non-SGI MIPS */
-#define HAS_TEST_AND_SET
typedef unsigned int slock_t;
@@ -531,10 +524,9 @@ do \
* grounds that that's known to be more likely to work in the ARM ecosystem.
* (But we dealt with ARM above.)
*/
-#if !defined(HAS_TEST_AND_SET)
+#if !defined(TAS)
#if defined(HAVE_GCC__SYNC_INT32_TAS)
-#define HAS_TEST_AND_SET
#define TAS(lock) tas(lock)
@@ -549,7 +541,6 @@ tas(volatile slock_t *lock)
#define S_UNLOCK(lock) __sync_lock_release(lock)
#elif defined(HAVE_GCC__SYNC_CHAR_TAS)
-#define HAS_TEST_AND_SET
#define TAS(lock) tas(lock)
@@ -565,7 +556,7 @@ tas(volatile slock_t *lock)
#endif /* HAVE_GCC__SYNC_INT32_TAS */
-#endif /* !defined(HAS_TEST_AND_SET) */
+#endif /* !defined(TAS) */
/*
@@ -592,12 +583,11 @@ tas(volatile slock_t *lock)
* ---------------------------------------------------------------------
*/
-#if !defined(HAS_TEST_AND_SET) /* We didn't trigger above, let's try here */
+#if !defined(TAS) /* We didn't trigger above, let's try here */
#ifdef _MSC_VER
typedef LONG slock_t;
-#define HAS_TEST_AND_SET
#define TAS(lock) (InterlockedCompareExchange(lock, 1, 0))
#define SPIN_DELAY() spin_delay()
@@ -649,11 +639,11 @@ spin_delay(void)
#endif
-#endif /* !defined(HAS_TEST_AND_SET) */
+#endif /* !defined(TAS) */
/* Blow up if we didn't have any way to do spinlocks */
-#ifndef HAS_TEST_AND_SET
+#ifndef TAS
#error PostgreSQL does not have spinlock support on this platform. Please report this to [email protected].
#endif
--
2.50.1 (Apple Git-155)
--IHFkEDr8CkxIje3R
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
filename=v3-0003-Better-express-platform-requirements-in-s_lock.h.patch
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2026-05-04 21:24 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 06:00 [PATCH v17 06/10] pg_ls_*dir to show directories and "isdir" column.. Justin Pryzby <[email protected]>
2022-08-08 15:50 2022-08-11 release announcement draft Jonathan S. Katz <[email protected]>
2022-08-08 16:44 ` Re: 2022-08-11 release announcement draft Justin Pryzby <[email protected]>
2022-08-08 18:35 ` Re: 2022-08-11 release announcement draft Jonathan S. Katz <[email protected]>
2026-05-04 21:24 [PATCH v3 2/3] Remove HAS_TEST_AND_SET. Nathan Bossart <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox