tzdata issue on cross-compiled postgresql

From: "Tim Yardley" <lst(at)openwrt(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: tzdata issue on cross-compiled postgresql
Date: 2008-01-09 19:20:18
Message-ID: 98933b170801091120l109c0c37r68edbdacec28fa25@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers;

I've noticed a strangeness on our cross-compiled uclibc linked
postgresql package that I was hoping to elicit some help with.

This is probably best described by showing some queries with
commentary, so on with that.

postgres=# select count(*) from pg_timezone_names where utc_offset != '00:00';
count
-------
0
postgres=# select count(*) from pg_timezone_names where utc_offset != '00:00';
count
-------
504
postgres=# select count(*) from pg_timezone_names where utc_offset != '00:00';
count
-------
0
postgres=# select *from pg_timezone_names where utc_offset != '00:00' limit 5;
name | abbrev | utc_offset | is_dst
------+--------+------------+--------
(0 rows)

postgres=# select *from pg_timezone_names where utc_offset != '00:00' limit 5;
name | abbrev | utc_offset | is_dst
-------------------+--------+------------+--------
Africa/Algiers | CET | 01:00:00 | f
Africa/Luanda | WAT | 01:00:00 | f
Africa/Porto-Novo | WAT | 01:00:00 | f
Africa/Gaborone | CAT | 02:00:00 | f
Africa/Bujumbura | CAT | 02:00:00 | f
(5 rows)

As seen, the output is erratic, but when it is giving results, they
seem to be correct.

# pg_config
BINDIR = /usr/bin
DOCDIR = /usr/doc/postgresql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql
LOCALEDIR =
MANDIR = /usr/share/man
SHAREDIR = /usr/share/postgresql
SYSCONFDIR = /etc/postgresql
PGXS = /usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--target=i386-linux' '--host=i386-linux'
'--build=i486-linux-gnu' '--program-prefix=' '--program-suffix='
'--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--datadir=/usr/share' '--includedir=/usr/include'
'--infodir=/usr/share/info' '--libdir=/usr/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var'
'--mandir=/usr/share/man' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--disable-nls' '--enable-shared' '--enable-static' '--disable-rpath'
'--without-java' '--without-krb4' '--without-krb5' '--without-openssl'
'--without-pam' '--without-perl' '--without-python'
'--without-rendezvous' '--without-tcl' '--without-tk'
'--with-zlib=yes' '--enable-depend' 'CC=i386-linux-uclibc-gcc'
'CFLAGS=-O2 -pipe -march=i486 -funit-at-a-time' 'CPPFLAGS=
-I/mnt/build/kamikaze/staging_dir_i386/usr/include
-I/mnt/build/kamikaze/staging_dir_i386/include'
'LDFLAGS=-L/mnt/build/kamikaze/staging_dir_i386/usr/lib
-L/mnt/build/kamikaze/staging_dir_i386/lib'
'build_alias=i486-linux-gnu' 'host_alias=i386-linux'
'target_alias=i386-linux'
CC = i386-linux-uclibc-gcc
CPPFLAGS = -I/mnt/build/kamikaze/staging_dir_i386/usr/include
-I/mnt/build/kamikaze/staging_dir_i386/include -D_GNU_SOURCE
CFLAGS = -O2 -pipe -march=i486 -funit-at-a-time -Wall
-Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
CFLAGS_SL = -fpic
LDFLAGS = -L/mnt/build/kamikaze/staging_dir_i386/usr/lib
-L/mnt/build/kamikaze/staging_dir_i386/lib
LDFLAGS_SL =
LIBS = -lpgport -lz -lreadline -lncurses -lcrypt -ldl -lm -lnotimpl
VERSION = PostgreSQL 8.2.5

uclibc version is 0.9.28-10 from our tree (-10 is our versioning).

You can see the current public cross-compilation Makefile for
postgresql at https://dev.openwrt.org/browser/packages/libs/postgresql/Makefile

Note, that in the current version of the Makefile that is uncommitted,
I have the following changes:
* I've removed --disable-integer-datetimes (per the suggestion of
someone in #postgresql on freenode)
* I've added a sed replacement (posix zone from the tzdata file
doesn't seem to exist anymore?)
* $(SED) 's(at)US/Eastern(at)America/New_York@'
$(PKG_BUILD_DIR)/src/timezone/Makefile

None of those have affected it at this point. I'd appreciate any help
on this matter that you guys can provide. If you need any more
information, please don't hesitate to ask.

/tmy

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Browne 2008-01-09 19:38:21 Re: Dynamic Partitioning using Segment Visibility Maps
Previous Message Tom Lane 2008-01-09 19:13:22 Re: Problem with CVS HEAD's handling of mergejoins