pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15897: make failed postgres 11.4 at 32 bit build
4+ messages / 4 participants
[nested] [flat]
* BUG #15897: make failed postgres 11.4 at 32 bit build
@ 2019-07-05 11:10 PG Bug reporting form <noreply@postgresql.org>
2019-07-05 13:12 ` Re: BUG #15897: make failed postgres 11.4 at 32 bit build Robert Haas <robertmhaas@gmail.com>
2019-07-05 14:12 ` Re: BUG #15897: make failed postgres 11.4 at 32 bit build Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: PG Bug reporting form @ 2019-07-05 11:10 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: raphael.geng@bizerba.com
The following bug has been logged on the website:
Bug reference: 15897
Logged by: Raphael Geng
Email address: raphael.geng@bizerba.com
PostgreSQL version: 11.4
Operating system: sles 12.1
Description:
Hello,
i tryied to build postgres 11.4 on 32 bit sles 12.1.
---------------------------------------------------------------------------------------
../configure --with-libxml
+
make -j10 DESTDIR=/postgres/src/workdir/result install
error is:
-->
make[4]: Entering directory
`/postgres/src/workdir/postgresql-11.4/build_directory/src/timezone/tznames'
/bin/mkdir -p
'/postgres/src/workdir/result/usr/local/pgsql/share/timezonesets'
/usr/bin/install -c -m 644
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Africa.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/America.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Antarctica.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Asia.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Atlantic.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Australia.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Etc.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Europe.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Indian.txt
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Pacific.txt
'/postgres/src/workdir/result/usr/local/pgsql/share/timezonesets'
/usr/bin/install -c -m 644
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Default
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/Australia
/postgres/src/workdir/postgresql-11.4/build_directory/../src/timezone/tznames/India
'/postgres/src/workdir/result/usr/local/pgsql/share/timezonesets'
make[4]: Leaving directory
`/postgres/src/workdir/postgresql-11.4/build_directory/src/timezone/tznames'
make[3]: Leaving directory
`/postgres/src/workdir/postgresql-11.4/build_directory/src/timezone'
storage/lmgr/lwlock.o: In function `CreateLWLocks':
lwlock.c:(.text+0x62e): undefined reference to `MainLWLockNames'
collect2: error: ld returned 1 exit status
<--
---------------------------------------------------------------------------------------
gcc: 4.8.1
make: 3.82
src: postgresql-11.4
---------------------------------------------------------------------------------------
additional components:
zypper --no-gpg-checks --non-interactive install tar
zypper --no-gpg-checks --non-interactive install libreadline6
zypper --no-gpg-checks --non-interactive install readline-devel
zypper --no-gpg-checks --non-interactive install zlib-devel
zypper --no-gpg-checks --non-interactive install libxml2-devel
zypper --no-gpg-checks --non-interactive install bison
zypper --no-gpg-checks --non-interactive install flex
zypper --no-gpg-checks --non-interactive install make
zypper --no-gpg-checks --non-interactive install gettext
zypper --no-gpg-checks --non-interactive install tcl
zypper --no-gpg-checks --non-interactive install perl
zypper --no-gpg-checks --non-interactive install libopenssl0_9_8
zypper --no-gpg-checks --non-interactive install openssl
zypper --no-gpg-checks --non-interactive install openssl-devel
zypper --no-gpg-checks --non-interactive install pam-devel
zypper --no-gpg-checks --non-interactive install pam
zypper --no-gpg-checks --non-interactive install timezone
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #15897: make failed postgres 11.4 at 32 bit build
2019-07-05 11:10 BUG #15897: make failed postgres 11.4 at 32 bit build PG Bug reporting form <noreply@postgresql.org>
@ 2019-07-05 13:12 ` Robert Haas <robertmhaas@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Robert Haas @ 2019-07-05 13:12 UTC (permalink / raw)
To: raphael.geng@bizerba.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
On Fri, Jul 5, 2019 at 7:11 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> storage/lmgr/lwlock.o: In function `CreateLWLocks':
> lwlock.c:(.text+0x62e): undefined reference to `MainLWLockNames'
> collect2: error: ld returned 1 exit status
MainLWLockNames is defined in a generated .c file - see
generate-lwlocknames.pl. This error seems to indicate that this file
either wasn't compiled or didn't have the right contents. I can't
guess why that happened based on the information provided, but if I
were you, I'd try again after making sure that you have a completely
clean source tree with no leftovers in it from previous build
attempts. If using 'git', try 'git clean -dfx'.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #15897: make failed postgres 11.4 at 32 bit build
2019-07-05 11:10 BUG #15897: make failed postgres 11.4 at 32 bit build PG Bug reporting form <noreply@postgresql.org>
@ 2019-07-05 14:12 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2019-07-05 14:12 UTC (permalink / raw)
To: raphael.geng@bizerba.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> i tryied to build postgres 11.4 on 32 bit sles 12.1.
> make -j10 DESTDIR=/postgres/src/workdir/result install
Not sure that anyone really tests going directly to "install" with
such a high -j factor. You might've found a parallelism weakness
in the makefiles. I tend to do "make -j8 all" and then "make install"
and have never seen a problem with that.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* [PATCH v3 1/3] Cope at DETACH time, for 12 - 16
@ 2024-07-02 17:06 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 4+ messages in thread
From: Alvaro Herrera @ 2024-07-02 17:06 UTC (permalink / raw)
---
src/backend/commands/tablecmds.c | 18 +++++++++---
src/test/regress/expected/constraints.out | 31 ++++++++++++++++++++
src/test/regress/sql/constraints.sql | 35 +++++++++++++++++++++++
3 files changed, 80 insertions(+), 4 deletions(-)
inline patch 1: src/backend/commands/tablecmds.c, src/test/regress/expected/constraints.out, src/test/regress/sql/constraints.sql (+80/-4 lines) download inline-1.patch
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index dbfe0d6b1c..37faa2a39a 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -19281,22 +19281,32 @@ DetachPartitionFinalize(Relation rel, Relation partRel, bool concurrent,
foreach(cell, indexes)
{
Oid idxid = lfirst_oid(cell);
+ Oid parentidx;
Relation idx;
Oid constrOid;
+ Oid parentConstrOid;
if (!has_superclass(idxid))
continue;
- Assert((IndexGetRelation(get_partition_parent(idxid, false), false) ==
- RelationGetRelid(rel)));
+ parentidx = get_partition_parent(idxid, false);
+ Assert((IndexGetRelation(parentidx, false) == RelationGetRelid(rel)));
idx = index_open(idxid, AccessExclusiveLock);
IndexSetParentIndex(idx, InvalidOid);
- /* If there's a constraint associated with the index, detach it too */
+ /*
+ * If there's a constraint associated with the index, detach it too.
+ * Careful: in releases prior to 17, it was possible for a constraint
+ * index in a partition to be the child of a non-constraint index, so
+ * we verify whether the parent index does actually have a constraint
+ * first.
+ */
constrOid = get_relation_idx_constraint_oid(RelationGetRelid(partRel),
idxid);
- if (OidIsValid(constrOid))
+ parentConstrOid = get_relation_idx_constraint_oid(RelationGetRelid(rel),
+ parentidx);
+ if (OidIsValid(parentConstrOid) && OidIsValid(constrOid))
ConstraintSetParentConstraint(constrOid, InvalidOid, InvalidOid);
index_close(idx, NoLock);
diff --git a/src/test/regress/expected/constraints.out b/src/test/regress/expected/constraints.out
index e6f6602d95..47aa754965 100644
--- a/src/test/regress/expected/constraints.out
+++ b/src/test/regress/expected/constraints.out
@@ -626,6 +626,37 @@ SELECT conname FROM pg_constraint WHERE conrelid = 'parted_fk_naming_1'::regclas
(1 row)
DROP TABLE parted_fk_naming;
+--
+-- Test various ways to create primary keys on partitions, linked to unique
+-- indexes on the partitioned table. These should all fail, but we don't dare
+-- change released behavior, so instead cope with it at DETACH time.
+CREATE TABLE t (a integer) PARTITION BY LIST (a);
+CREATE TABLE tp (a integer PRIMARY KEY);
+ALTER TABLE t ATTACH PARTITION tp FOR VALUES IN (1);
+CREATE UNIQUE INDEX t_a_idx ON t (a);
+ALTER INDEX t_a_idx ATTACH PARTITION tp_pkey;
+ALTER TABLE t DETACH PARTITION tp;
+DROP TABLE t, tp;
+CREATE TABLE t (a integer) PARTITION BY LIST (a);
+CREATE TABLE tp (a integer PRIMARY KEY);
+CREATE UNIQUE INDEX t_a_idx ON t (a);
+ALTER TABLE t ATTACH PARTITION tp FOR VALUES IN (1);
+ALTER TABLE t DETACH PARTITION tp;
+DROP TABLE t, tp;
+CREATE TABLE t (a integer) PARTITION BY LIST (a);
+CREATE TABLE tp (a integer PRIMARY KEY);
+CREATE UNIQUE INDEX t_a_idx ON ONLY t (a);
+ALTER TABLE t ATTACH PARTITION tp FOR VALUES IN (1);
+ALTER TABLE t DETACH PARTITION tp;
+DROP TABLE t, tp;
+CREATE TABLE regress_constr_partitioned (a integer) PARTITION BY LIST (a);
+CREATE TABLE regress_constr_partition1 PARTITION OF regress_constr_partitioned FOR VALUES IN (1);
+ALTER TABLE regress_constr_partition1 ADD PRIMARY KEY (a);
+CREATE UNIQUE INDEX ON regress_constr_partitioned (a);
+BEGIN;
+ALTER TABLE regress_constr_partitioned DETACH PARTITION regress_constr_partition1;
+ROLLBACK;
+-- Leave this one in funny state for pg_upgrade testing
-- test a HOT update that invalidates the conflicting tuple.
-- the trigger should still fire and catch the violation
BEGIN;
diff --git a/src/test/regress/sql/constraints.sql b/src/test/regress/sql/constraints.sql
index 5ffcd4ffc7..04fdf51a4a 100644
--- a/src/test/regress/sql/constraints.sql
+++ b/src/test/regress/sql/constraints.sql
@@ -449,6 +449,41 @@ ALTER TABLE parted_fk_naming ATTACH PARTITION parted_fk_naming_1 FOR VALUES IN (
SELECT conname FROM pg_constraint WHERE conrelid = 'parted_fk_naming_1'::regclass AND contype = 'f';
DROP TABLE parted_fk_naming;
+--
+-- Test various ways to create primary keys on partitions, linked to unique
+-- indexes on the partitioned table. These should all fail, but we don't dare
+-- change released behavior, so instead cope with it at DETACH time.
+CREATE TABLE t (a integer) PARTITION BY LIST (a);
+CREATE TABLE tp (a integer PRIMARY KEY);
+ALTER TABLE t ATTACH PARTITION tp FOR VALUES IN (1);
+CREATE UNIQUE INDEX t_a_idx ON t (a);
+ALTER INDEX t_a_idx ATTACH PARTITION tp_pkey;
+ALTER TABLE t DETACH PARTITION tp;
+DROP TABLE t, tp;
+
+CREATE TABLE t (a integer) PARTITION BY LIST (a);
+CREATE TABLE tp (a integer PRIMARY KEY);
+CREATE UNIQUE INDEX t_a_idx ON t (a);
+ALTER TABLE t ATTACH PARTITION tp FOR VALUES IN (1);
+ALTER TABLE t DETACH PARTITION tp;
+DROP TABLE t, tp;
+
+CREATE TABLE t (a integer) PARTITION BY LIST (a);
+CREATE TABLE tp (a integer PRIMARY KEY);
+CREATE UNIQUE INDEX t_a_idx ON ONLY t (a);
+ALTER TABLE t ATTACH PARTITION tp FOR VALUES IN (1);
+ALTER TABLE t DETACH PARTITION tp;
+DROP TABLE t, tp;
+
+CREATE TABLE regress_constr_partitioned (a integer) PARTITION BY LIST (a);
+CREATE TABLE regress_constr_partition1 PARTITION OF regress_constr_partitioned FOR VALUES IN (1);
+ALTER TABLE regress_constr_partition1 ADD PRIMARY KEY (a);
+CREATE UNIQUE INDEX ON regress_constr_partitioned (a);
+BEGIN;
+ALTER TABLE regress_constr_partitioned DETACH PARTITION regress_constr_partition1;
+ROLLBACK;
+-- Leave this one in funny state for pg_upgrade testing
+
-- test a HOT update that invalidates the conflicting tuple.
-- the trigger should still fire and catch the violation
--
2.39.2
--rpbmmm3azzci27ms
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="v3-0002-WIP-don-t-let-constraint-indexes-attach-to-raw-in.patch"
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-07-02 17:06 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05 11:10 BUG #15897: make failed postgres 11.4 at 32 bit build PG Bug reporting form <noreply@postgresql.org>
2019-07-05 13:12 ` Robert Haas <robertmhaas@gmail.com>
2019-07-05 14:12 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-07-02 17:06 [PATCH v3 1/3] Cope at DETACH time, for 12 - 16 Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox