https://github.com/postgres/postgres
- HEAD
- refs/heads/REL2_0B
- refs/heads/REL6_4
- refs/heads/REL6_5_PATCHES
- refs/heads/REL7_0_PATCHES
- refs/heads/REL7_1_STABLE
- refs/heads/REL7_2_STABLE
- refs/heads/REL7_3_STABLE
- refs/heads/REL7_4_STABLE
- refs/heads/REL8_0_STABLE
- refs/heads/REL8_1_STABLE
- refs/heads/REL8_2_STABLE
- refs/heads/REL8_3_STABLE
- refs/heads/REL8_4_STABLE
- refs/heads/REL8_5_ALPHA1_BRANCH
- refs/heads/REL8_5_ALPHA2_BRANCH
- refs/heads/REL8_5_ALPHA3_BRANCH
- refs/heads/REL9_0_ALPHA4_BRANCH
- refs/heads/REL9_0_ALPHA5_BRANCH
- refs/heads/REL9_0_STABLE
- refs/heads/REL9_1_STABLE
- refs/heads/REL9_2_STABLE
- refs/heads/REL9_3_STABLE
- refs/heads/REL9_4_STABLE
- refs/heads/REL9_5_STABLE
- refs/heads/REL9_6_STABLE
- refs/heads/REL_10_STABLE
- refs/heads/REL_11_STABLE
- refs/heads/REL_12_STABLE
- refs/heads/REL_13_STABLE
- refs/heads/REL_14_STABLE
- refs/heads/REL_15_STABLE
- refs/heads/REL_16_STABLE
- refs/heads/Release_1_0_3
- refs/heads/WIN32_DEV
- refs/heads/ecpg_big_bison
- refs/heads/master
- refs/tags/PG95-1_01
- refs/tags/PG95-1_08
- refs/tags/PG95-1_09
- refs/tags/REL2_0
- refs/tags/REL6_1
- refs/tags/REL6_1_1
- refs/tags/REL6_2
- refs/tags/REL6_2_1
- refs/tags/REL6_3
- refs/tags/REL6_3_2
- refs/tags/REL6_4_2
- refs/tags/REL6_5
- refs/tags/REL6_5_1
- refs/tags/REL6_5_2
- refs/tags/REL6_5_3
- refs/tags/REL7_0
- refs/tags/REL7_0_2
- refs/tags/REL7_0_3
- refs/tags/REL7_1
- refs/tags/REL7_1_1
- refs/tags/REL7_1_2
- refs/tags/REL7_1_3
- refs/tags/REL7_1_BETA
- refs/tags/REL7_1_BETA2
- refs/tags/REL7_1_BETA3
- refs/tags/REL7_2
- refs/tags/REL7_2_1
- refs/tags/REL7_2_2
- refs/tags/REL7_2_3
- refs/tags/REL7_2_4
- refs/tags/REL7_2_5
- refs/tags/REL7_2_6
- refs/tags/REL7_2_7
- refs/tags/REL7_2_8
- refs/tags/REL7_2_BETA1
- refs/tags/REL7_2_BETA2
- refs/tags/REL7_2_BETA3
- refs/tags/REL7_2_BETA4
- refs/tags/REL7_2_BETA5
- refs/tags/REL7_2_RC1
- refs/tags/REL7_2_RC2
- refs/tags/REL7_3
- refs/tags/REL7_3_1
- refs/tags/REL7_3_10
- refs/tags/REL7_3_11
- refs/tags/REL7_3_12
- refs/tags/REL7_3_13
- refs/tags/REL7_3_14
- refs/tags/REL7_3_15
- refs/tags/REL7_3_16
- refs/tags/REL7_3_17
- refs/tags/REL7_3_18
- refs/tags/REL7_3_19
- refs/tags/REL7_3_2
- refs/tags/REL7_3_20
- refs/tags/REL7_3_21
- refs/tags/REL7_3_3
- refs/tags/REL7_3_4
- refs/tags/REL7_3_5
- refs/tags/REL7_3_6
- refs/tags/REL7_3_7
- refs/tags/REL7_3_8
- refs/tags/REL7_3_9
- refs/tags/REL7_4
- refs/tags/REL7_4_1
- refs/tags/REL7_4_10
- refs/tags/REL7_4_11
- refs/tags/REL7_4_12
- refs/tags/REL7_4_13
- refs/tags/REL7_4_14
- refs/tags/REL7_4_15
- refs/tags/REL7_4_16
- refs/tags/REL7_4_17
- refs/tags/REL7_4_18
- refs/tags/REL7_4_19
- refs/tags/REL7_4_2
- refs/tags/REL7_4_20
- refs/tags/REL7_4_21
- refs/tags/REL7_4_22
- refs/tags/REL7_4_23
- refs/tags/REL7_4_24
- refs/tags/REL7_4_25
- refs/tags/REL7_4_26
- refs/tags/REL7_4_27
- refs/tags/REL7_4_28
- refs/tags/REL7_4_29
- refs/tags/REL7_4_3
- refs/tags/REL7_4_30
- refs/tags/REL7_4_4
- refs/tags/REL7_4_5
- refs/tags/REL7_4_6
- refs/tags/REL7_4_7
- refs/tags/REL7_4_8
- refs/tags/REL7_4_9
- refs/tags/REL7_4_BETA1
- refs/tags/REL7_4_BETA2
- refs/tags/REL7_4_BETA3
- refs/tags/REL7_4_BETA4
- refs/tags/REL7_4_BETA5
- refs/tags/REL7_4_RC1
- refs/tags/REL7_4_RC2
- refs/tags/REL8_0_0
- refs/tags/REL8_0_0BETA1
- refs/tags/REL8_0_0BETA2
- refs/tags/REL8_0_0BETA3
- refs/tags/REL8_0_0BETA4
- refs/tags/REL8_0_0BETA5
- refs/tags/REL8_0_0RC1
- refs/tags/REL8_0_0RC2
- refs/tags/REL8_0_0RC3
- refs/tags/REL8_0_0RC4
- refs/tags/REL8_0_0RC5
- refs/tags/REL8_0_1
- refs/tags/REL8_0_10
- refs/tags/REL8_0_11
- refs/tags/REL8_0_12
- refs/tags/REL8_0_13
- refs/tags/REL8_0_14
- refs/tags/REL8_0_15
- refs/tags/REL8_0_16
- refs/tags/REL8_0_17
- refs/tags/REL8_0_18
- refs/tags/REL8_0_19
- refs/tags/REL8_0_2
- refs/tags/REL8_0_20
- refs/tags/REL8_0_21
- refs/tags/REL8_0_22
- refs/tags/REL8_0_23
- refs/tags/REL8_0_24
- refs/tags/REL8_0_25
- refs/tags/REL8_0_26
- refs/tags/REL8_0_3
- refs/tags/REL8_0_4
- refs/tags/REL8_0_5
- refs/tags/REL8_0_6
- refs/tags/REL8_0_7
- refs/tags/REL8_0_8
- refs/tags/REL8_0_9
- refs/tags/REL8_1_0
- refs/tags/REL8_1_0BETA1
- refs/tags/REL8_1_0BETA2
- refs/tags/REL8_1_0BETA3
- refs/tags/REL8_1_0BETA4
- refs/tags/REL8_1_0RC1
- refs/tags/REL8_1_1
- refs/tags/REL8_1_10
- refs/tags/REL8_1_11
- refs/tags/REL8_1_12
- refs/tags/REL8_1_13
- refs/tags/REL8_1_14
- refs/tags/REL8_1_15
- refs/tags/REL8_1_16
- refs/tags/REL8_1_17
- refs/tags/REL8_1_18
- refs/tags/REL8_1_19
- refs/tags/REL8_1_2
- refs/tags/REL8_1_20
- refs/tags/REL8_1_21
- refs/tags/REL8_1_22
- refs/tags/REL8_1_23
- refs/tags/REL8_1_3
- refs/tags/REL8_1_4
- refs/tags/REL8_1_5
- refs/tags/REL8_1_6
- refs/tags/REL8_1_7
- refs/tags/REL8_1_8
- refs/tags/REL8_1_9
- refs/tags/REL8_2_0
- refs/tags/REL8_2_1
- refs/tags/REL8_2_10
- refs/tags/REL8_2_11
- refs/tags/REL8_2_12
- refs/tags/REL8_2_13
- refs/tags/REL8_2_14
- refs/tags/REL8_2_15
- refs/tags/REL8_2_16
- refs/tags/REL8_2_17
- refs/tags/REL8_2_18
- refs/tags/REL8_2_19
- refs/tags/REL8_2_2
- refs/tags/REL8_2_20
- refs/tags/REL8_2_21
- refs/tags/REL8_2_22
- refs/tags/REL8_2_23
- refs/tags/REL8_2_3
- refs/tags/REL8_2_4
- refs/tags/REL8_2_5
- refs/tags/REL8_2_6
- refs/tags/REL8_2_7
- refs/tags/REL8_2_8
- refs/tags/REL8_2_9
- refs/tags/REL8_2_BETA1
- refs/tags/REL8_2_BETA2
- refs/tags/REL8_2_BETA3
- refs/tags/REL8_2_RC1
- refs/tags/REL8_3_0
- refs/tags/REL8_3_1
- refs/tags/REL8_3_10
- refs/tags/REL8_3_11
- refs/tags/REL8_3_12
- refs/tags/REL8_3_13
- refs/tags/REL8_3_14
- refs/tags/REL8_3_15
- refs/tags/REL8_3_16
- refs/tags/REL8_3_17
- refs/tags/REL8_3_18
- refs/tags/REL8_3_19
- refs/tags/REL8_3_2
- refs/tags/REL8_3_20
- refs/tags/REL8_3_21
- refs/tags/REL8_3_22
- refs/tags/REL8_3_23
- refs/tags/REL8_3_3
- refs/tags/REL8_3_4
- refs/tags/REL8_3_5
- refs/tags/REL8_3_6
- refs/tags/REL8_3_7
- refs/tags/REL8_3_8
- refs/tags/REL8_3_9
- refs/tags/REL8_3_BETA1
- refs/tags/REL8_3_BETA2
- refs/tags/REL8_3_BETA3
- refs/tags/REL8_3_BETA4
- refs/tags/REL8_3_RC1
- refs/tags/REL8_3_RC2
- refs/tags/REL8_4_0
- refs/tags/REL8_4_1
- refs/tags/REL8_4_10
- refs/tags/REL8_4_11
- refs/tags/REL8_4_12
- refs/tags/REL8_4_13
- refs/tags/REL8_4_14
- refs/tags/REL8_4_15
- refs/tags/REL8_4_16
- refs/tags/REL8_4_17
- refs/tags/REL8_4_18
- refs/tags/REL8_4_19
- refs/tags/REL8_4_2
- refs/tags/REL8_4_20
- refs/tags/REL8_4_21
- refs/tags/REL8_4_22
- refs/tags/REL8_4_3
- refs/tags/REL8_4_4
- refs/tags/REL8_4_5
- refs/tags/REL8_4_6
- refs/tags/REL8_4_7
- refs/tags/REL8_4_8
- refs/tags/REL8_4_9
- refs/tags/REL8_4_BETA1
- refs/tags/REL8_4_BETA2
- refs/tags/REL8_4_RC1
- refs/tags/REL8_4_RC2
- refs/tags/REL8_5_ALPHA1
- refs/tags/REL8_5_ALPHA2
- refs/tags/REL8_5_ALPHA3
- refs/tags/REL9_0_0
- refs/tags/REL9_0_1
- refs/tags/REL9_0_10
- refs/tags/REL9_0_11
- refs/tags/REL9_0_12
- refs/tags/REL9_0_13
- refs/tags/REL9_0_14
- refs/tags/REL9_0_15
- refs/tags/REL9_0_16
- refs/tags/REL9_0_17
- refs/tags/REL9_0_18
- refs/tags/REL9_0_19
- refs/tags/REL9_0_2
- refs/tags/REL9_0_20
- refs/tags/REL9_0_21
- refs/tags/REL9_0_22
- refs/tags/REL9_0_23
- refs/tags/REL9_0_3
- refs/tags/REL9_0_4
- refs/tags/REL9_0_5
- refs/tags/REL9_0_6
- refs/tags/REL9_0_7
- refs/tags/REL9_0_8
- refs/tags/REL9_0_9
- refs/tags/REL9_0_ALPHA4
- refs/tags/REL9_0_ALPHA5
- refs/tags/REL9_0_BETA1
- refs/tags/REL9_0_BETA2
- refs/tags/REL9_0_BETA3
- refs/tags/REL9_0_BETA4
- refs/tags/REL9_0_RC1
- refs/tags/REL9_1_0
- refs/tags/REL9_1_1
- refs/tags/REL9_1_10
- refs/tags/REL9_1_11
- refs/tags/REL9_1_12
- refs/tags/REL9_1_13
- refs/tags/REL9_1_14
- refs/tags/REL9_1_15
- refs/tags/REL9_1_16
- refs/tags/REL9_1_17
- refs/tags/REL9_1_18
- refs/tags/REL9_1_19
- refs/tags/REL9_1_2
- refs/tags/REL9_1_20
- refs/tags/REL9_1_21
- refs/tags/REL9_1_22
- refs/tags/REL9_1_23
- refs/tags/REL9_1_24
- refs/tags/REL9_1_3
- refs/tags/REL9_1_4
- refs/tags/REL9_1_5
- refs/tags/REL9_1_6
- refs/tags/REL9_1_7
- refs/tags/REL9_1_8
- refs/tags/REL9_1_9
- refs/tags/REL9_1_ALPHA1
- refs/tags/REL9_1_ALPHA2
- refs/tags/REL9_1_ALPHA3
- refs/tags/REL9_1_ALPHA4
- refs/tags/REL9_1_ALPHA5
- refs/tags/REL9_1_BETA1
- refs/tags/REL9_1_BETA2
- refs/tags/REL9_1_BETA3
- refs/tags/REL9_1_RC1
- refs/tags/REL9_2_0
- refs/tags/REL9_2_1
- refs/tags/REL9_2_10
- refs/tags/REL9_2_11
- refs/tags/REL9_2_12
- refs/tags/REL9_2_13
- refs/tags/REL9_2_14
- refs/tags/REL9_2_15
- refs/tags/REL9_2_16
- refs/tags/REL9_2_17
- refs/tags/REL9_2_18
- refs/tags/REL9_2_19
- refs/tags/REL9_2_2
- refs/tags/REL9_2_20
- refs/tags/REL9_2_21
- refs/tags/REL9_2_22
- refs/tags/REL9_2_23
- refs/tags/REL9_2_24
- refs/tags/REL9_2_3
- refs/tags/REL9_2_4
- refs/tags/REL9_2_5
- refs/tags/REL9_2_6
- refs/tags/REL9_2_7
- refs/tags/REL9_2_8
- refs/tags/REL9_2_9
- refs/tags/REL9_2_BETA1
- refs/tags/REL9_2_BETA2
- refs/tags/REL9_2_BETA3
- refs/tags/REL9_2_BETA4
- refs/tags/REL9_2_RC1
- refs/tags/REL9_3_0
- refs/tags/REL9_3_1
- refs/tags/REL9_3_10
- refs/tags/REL9_3_11
- refs/tags/REL9_3_12
- refs/tags/REL9_3_13
- refs/tags/REL9_3_14
- refs/tags/REL9_3_15
- refs/tags/REL9_3_16
- refs/tags/REL9_3_17
- refs/tags/REL9_3_18
- refs/tags/REL9_3_19
- refs/tags/REL9_3_2
- refs/tags/REL9_3_20
- refs/tags/REL9_3_21
- refs/tags/REL9_3_22
- refs/tags/REL9_3_23
- refs/tags/REL9_3_24
- refs/tags/REL9_3_25
- refs/tags/REL9_3_3
- refs/tags/REL9_3_4
- refs/tags/REL9_3_5
- refs/tags/REL9_3_6
- refs/tags/REL9_3_7
- refs/tags/REL9_3_8
- refs/tags/REL9_3_9
- refs/tags/REL9_3_BETA1
- refs/tags/REL9_3_BETA2
- refs/tags/REL9_3_RC1
- refs/tags/REL9_4_0
- refs/tags/REL9_4_1
- refs/tags/REL9_4_10
- refs/tags/REL9_4_11
- refs/tags/REL9_4_12
- refs/tags/REL9_4_13
- refs/tags/REL9_4_14
- refs/tags/REL9_4_15
- refs/tags/REL9_4_16
- refs/tags/REL9_4_17
- refs/tags/REL9_4_18
- refs/tags/REL9_4_19
- refs/tags/REL9_4_2
- refs/tags/REL9_4_20
- refs/tags/REL9_4_21
- refs/tags/REL9_4_22
- refs/tags/REL9_4_23
- refs/tags/REL9_4_24
- refs/tags/REL9_4_25
- refs/tags/REL9_4_26
- refs/tags/REL9_4_3
- refs/tags/REL9_4_4
- refs/tags/REL9_4_5
- refs/tags/REL9_4_6
- refs/tags/REL9_4_7
- refs/tags/REL9_4_8
- refs/tags/REL9_4_9
- refs/tags/REL9_4_BETA1
- refs/tags/REL9_4_BETA2
- refs/tags/REL9_4_BETA3
- refs/tags/REL9_4_RC1
- refs/tags/REL9_5_0
- refs/tags/REL9_5_1
- refs/tags/REL9_5_10
- refs/tags/REL9_5_11
- refs/tags/REL9_5_12
- refs/tags/REL9_5_13
- refs/tags/REL9_5_14
- refs/tags/REL9_5_15
- refs/tags/REL9_5_16
- refs/tags/REL9_5_17
- refs/tags/REL9_5_18
- refs/tags/REL9_5_19
- refs/tags/REL9_5_2
- refs/tags/REL9_5_20
- refs/tags/REL9_5_21
- refs/tags/REL9_5_22
- refs/tags/REL9_5_23
- refs/tags/REL9_5_24
- refs/tags/REL9_5_25
- refs/tags/REL9_5_3
- refs/tags/REL9_5_4
- refs/tags/REL9_5_5
- refs/tags/REL9_5_6
- refs/tags/REL9_5_7
- refs/tags/REL9_5_8
- refs/tags/REL9_5_9
- refs/tags/REL9_5_ALPHA1
- refs/tags/REL9_5_ALPHA2
- refs/tags/REL9_5_BETA1
- refs/tags/REL9_5_BETA2
- refs/tags/REL9_5_RC1
- refs/tags/REL9_6_0
- refs/tags/REL9_6_1
- refs/tags/REL9_6_10
- refs/tags/REL9_6_11
- refs/tags/REL9_6_12
- refs/tags/REL9_6_13
- refs/tags/REL9_6_14
- refs/tags/REL9_6_15
- refs/tags/REL9_6_16
- refs/tags/REL9_6_17
- refs/tags/REL9_6_18
- refs/tags/REL9_6_19
- refs/tags/REL9_6_2
- refs/tags/REL9_6_20
- refs/tags/REL9_6_21
- refs/tags/REL9_6_22
- refs/tags/REL9_6_23
- refs/tags/REL9_6_24
- refs/tags/REL9_6_3
- refs/tags/REL9_6_4
- refs/tags/REL9_6_5
- refs/tags/REL9_6_6
- refs/tags/REL9_6_7
- refs/tags/REL9_6_8
- refs/tags/REL9_6_9
- refs/tags/REL9_6_BETA1
- refs/tags/REL9_6_BETA2
- refs/tags/REL9_6_BETA3
- refs/tags/REL9_6_BETA4
- refs/tags/REL9_6_RC1
- refs/tags/REL_10_0
- refs/tags/REL_10_1
- refs/tags/REL_10_10
- refs/tags/REL_10_11
- refs/tags/REL_10_12
- refs/tags/REL_10_13
- refs/tags/REL_10_14
- refs/tags/REL_10_15
- refs/tags/REL_10_16
- refs/tags/REL_10_17
- refs/tags/REL_10_18
- refs/tags/REL_10_19
- refs/tags/REL_10_2
- refs/tags/REL_10_20
- refs/tags/REL_10_21
- refs/tags/REL_10_22
- refs/tags/REL_10_23
- refs/tags/REL_10_3
- refs/tags/REL_10_4
- refs/tags/REL_10_5
- refs/tags/REL_10_6
- refs/tags/REL_10_7
- refs/tags/REL_10_8
- refs/tags/REL_10_9
- refs/tags/REL_10_BETA1
- refs/tags/REL_10_BETA2
- refs/tags/REL_10_BETA3
- refs/tags/REL_10_BETA4
- refs/tags/REL_10_RC1
- refs/tags/REL_11_0
- refs/tags/REL_11_1
- refs/tags/REL_11_10
- refs/tags/REL_11_11
- refs/tags/REL_11_12
- refs/tags/REL_11_13
- refs/tags/REL_11_14
- refs/tags/REL_11_15
- refs/tags/REL_11_16
- refs/tags/REL_11_17
- refs/tags/REL_11_18
- refs/tags/REL_11_19
- refs/tags/REL_11_2
- refs/tags/REL_11_20
- refs/tags/REL_11_21
- refs/tags/REL_11_22
- refs/tags/REL_11_3
- refs/tags/REL_11_4
- refs/tags/REL_11_5
- refs/tags/REL_11_6
- refs/tags/REL_11_7
- refs/tags/REL_11_8
- refs/tags/REL_11_9
- refs/tags/REL_11_BETA1
- refs/tags/REL_11_BETA2
- refs/tags/REL_11_BETA3
- refs/tags/REL_11_BETA4
- refs/tags/REL_11_RC1
- refs/tags/REL_12_0
- refs/tags/REL_12_1
- refs/tags/REL_12_10
- refs/tags/REL_12_11
- refs/tags/REL_12_12
- refs/tags/REL_12_13
- refs/tags/REL_12_14
- refs/tags/REL_12_15
- refs/tags/REL_12_16
- refs/tags/REL_12_17
- refs/tags/REL_12_18
- refs/tags/REL_12_2
- refs/tags/REL_12_3
- refs/tags/REL_12_4
- refs/tags/REL_12_5
- refs/tags/REL_12_6
- refs/tags/REL_12_7
- refs/tags/REL_12_8
- refs/tags/REL_12_9
- refs/tags/REL_12_BETA1
- refs/tags/REL_12_BETA2
- refs/tags/REL_12_BETA3
- refs/tags/REL_12_BETA4
- refs/tags/REL_12_RC1
- refs/tags/REL_13_0
- refs/tags/REL_13_1
- refs/tags/REL_13_10
- refs/tags/REL_13_11
- refs/tags/REL_13_12
- refs/tags/REL_13_13
- refs/tags/REL_13_14
- refs/tags/REL_13_2
- refs/tags/REL_13_3
- refs/tags/REL_13_4
- refs/tags/REL_13_5
- refs/tags/REL_13_6
- refs/tags/REL_13_7
- refs/tags/REL_13_8
- refs/tags/REL_13_9
- refs/tags/REL_13_BETA1
- refs/tags/REL_13_BETA2
- refs/tags/REL_13_BETA3
- refs/tags/REL_13_RC1
- refs/tags/REL_14_0
- refs/tags/REL_14_1
- refs/tags/REL_14_10
- refs/tags/REL_14_11
- refs/tags/REL_14_2
- refs/tags/REL_14_3
- refs/tags/REL_14_4
- refs/tags/REL_14_5
- refs/tags/REL_14_6
- refs/tags/REL_14_7
- refs/tags/REL_14_8
- refs/tags/REL_14_9
- refs/tags/REL_14_BETA1
- refs/tags/REL_14_BETA2
- refs/tags/REL_14_BETA3
- refs/tags/REL_14_RC1
- refs/tags/REL_15_0
- refs/tags/REL_15_1
- refs/tags/REL_15_2
- refs/tags/REL_15_3
- refs/tags/REL_15_4
- refs/tags/REL_15_5
- refs/tags/REL_15_6
- refs/tags/REL_15_BETA1
- refs/tags/REL_15_BETA2
- refs/tags/REL_15_BETA3
- refs/tags/REL_15_BETA4
- refs/tags/REL_15_RC1
- refs/tags/REL_15_RC2
- refs/tags/REL_16_0
- refs/tags/REL_16_1
- refs/tags/REL_16_2
- refs/tags/REL_16_BETA1
- refs/tags/REL_16_BETA2
- refs/tags/REL_16_BETA3
- refs/tags/REL_16_RC1
- refs/tags/Release_1_0_2
- refs/tags/Release_2_0
- refs/tags/Release_2_0_0
- refs/tags/release-6-3
No releases to show
Take a new snapshot of a software origin
If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.
Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.![swh spinner](/static/img/swh-spinner.gif)
Processing "take a new snapshot" request ...
Permalinks
To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.
Revision | Author | Date | Message | Commit Date |
---|---|---|---|---|
ddb0843 | Tom Lane | 09 May 2016, 20:57:25 UTC | Stamp 9.1.22. | 09 May 2016, 20:57:25 UTC |
e712933 | Peter Eisentraut | 09 May 2016, 14:10:35 UTC | Translation updates Source-Git-URL: git://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: c44f5f528f60ae8cbd849a0dda9ea3c4359f02aa | 09 May 2016, 14:10:35 UTC |
be13ee5 | Tom Lane | 07 May 2016, 21:26:24 UTC | Release notes for 9.5.3, 9.4.8, 9.3.13, 9.2.17, 9.1.22. | 07 May 2016, 21:26:24 UTC |
9b676fd | Peter Eisentraut | 08 April 2016, 17:48:14 UTC | Distrust external OpenSSL clients; clear err queue OpenSSL has an unfortunate tendency to mix per-session state error handling with per-thread error handling. This can cause problems when programs that link to libpq with OpenSSL enabled have some other use of OpenSSL; without care, one caller of OpenSSL may cause problems for the other caller. Backend code might similarly be affected, for example when a third party extension independently uses OpenSSL without taking the appropriate precautions. To fix, don't trust other users of OpenSSL to clear the per-thread error queue. Instead, clear the entire per-thread queue ahead of certain I/O operations when it appears that there might be trouble (these I/O operations mostly need to call SSL_get_error() to check for success, which relies on the queue being empty). This is slightly aggressive, but it's pretty clear that the other callers have a very dubious claim to ownership of the per-thread queue. Do this is both frontend and backend code. Finally, be more careful about clearing our own error queue, so as to not cause these problems ourself. It's possibly that control previously did not always reach SSLerrmessage(), where ERR_get_error() was supposed to be called to clear the queue's earliest code. Make sure ERR_get_error() is always called, so as to spare other users of OpenSSL the possibility of similar problems caused by libpq (as opposed to problems caused by a third party OpenSSL library like PHP's OpenSSL extension). Again, do this is both frontend and backend code. See bug #12799 and https://bugs.php.net/bug.php?id=68276 Based on patches by Dave Vitek and Peter Eisentraut. From: Peter Geoghegan <pg@bowt.ie> | 07 May 2016, 04:09:37 UTC |
7bad282 | Tom Lane | 06 May 2016, 16:09:20 UTC | Fix possible read past end of string in to_timestamp(). to_timestamp() handles the TH/th format codes by advancing over two input characters, whatever those are. It failed to notice whether there were two characters available to be skipped, making it possible to advance the pointer past the end of the input string and keep on parsing. A similar risk existed in the handling of "Y,YYY" format: it would advance over three characters after the "," whether or not three characters were available. In principle this might be exploitable to disclose contents of server memory. But the security team concluded that it would be very hard to use that way, because the parsing loop would stop upon hitting any zero byte, and TH/th format codes can't be consecutive --- they have to follow some other format code, which would have to match whatever data is there. So it seems impractical to examine memory very much beyond the end of the input string via this bug; and the input string will always be in local memory not in disk buffers, making it unlikely that anything very interesting is close to it in a predictable way. So this doesn't quite rise to the level of needing a CVE. Thanks to Wolf Roediger for reporting this bug. | 06 May 2016, 16:09:20 UTC |
bfc39da | Tom Lane | 06 May 2016, 00:08:58 UTC | Update time zone data files to tzdata release 2016d. DST law changes in Russia (Magadan, Tomsk regions) and Venezuela. Historical corrections for Russia. There are new zone names Europe/Kirov and Asia/Tomsk reflecting the fact that these regions now have different time zone histories from adjacent regions. | 06 May 2016, 00:09:32 UTC |
b94906f | Peter Eisentraut | 04 May 2016, 18:07:00 UTC | doc: Fix more typos From: Alexander Law <exclusion@gmail.com> | 04 May 2016, 18:08:49 UTC |
acf9134 | Peter Eisentraut | 04 May 2016, 01:06:25 UTC | doc: Fix typos From: Alexander Law <exclusion@gmail.com> | 04 May 2016, 01:08:00 UTC |
6e3702e | Tom Lane | 02 May 2016, 15:18:11 UTC | Fix configure's incorrect version tests for flex and perl. awk's equality-comparison operator is "==" not "=". We got this right in many places, but not in configure's checks for supported version numbers of flex and perl. It hadn't been noticed because unsupported versions are so old as to be basically extinct in the wild, and because the only consequence is whether or not a WARNING flies by during configure. Daniel Gustafsson noted the problem with respect to the test for flex, I found the other by reviewing other awk calls. | 02 May 2016, 15:18:11 UTC |
c2c19af | Heikki Linnakangas | 02 May 2016, 07:07:49 UTC | Remove unused macros. CHECK_PAGE_OFFSET_RANGE() has been unused forever. CHECK_RELATION_BLOCK_RANGE() has been unused in pgstatindex.c ever since bt_page_stats() and bt_page_items() functions were moved from pgstattuple to pageinspect module. It still exists in pageinspect/btreefuncs.c. Daniel Gustafsson | 02 May 2016, 07:09:08 UTC |
a6c6789 | Tom Lane | 28 April 2016, 15:50:58 UTC | Adjust DatumGetBool macro, this time for sure. Commit 23a41573c attempted to fix the DatumGetBool macro to ignore bits in a Datum that are to the left of the actual bool value. But it did that by casting the Datum to bool; and on compilers that use C99 semantics for bool, that ends up being a whole-word test, not a 1-byte test. This seems to be the true explanation for contrib/seg failing in VS2015. To fix, use GET_1_BYTE() explicitly. I think in the previous patch, I'd had some idea of not having to commit to bool being exactly 1 byte wide, but regardless of what the compiler's bool is, boolean columns and Datums are certainly 1 byte wide. The previous fix was (eventually) back-patched into all active versions, so do likewise with this one. | 28 April 2016, 15:51:26 UTC |
cbff4b7 | Tom Lane | 23 April 2016, 20:53:15 UTC | Rename strtoi() to strtoint(). NetBSD has seen fit to invent a libc function named strtoi(), which conflicts with the long-established static functions of the same name in datetime.c and ecpg's interval.c. While muttering darkly about intrusions on application namespace, we'll rename our functions to avoid the conflict. Back-patch to all supported branches, since this would affect attempts to build any of them on recent NetBSD. Thomas Munro | 23 April 2016, 20:53:15 UTC |
6882dbd | Tom Lane | 22 April 2016, 00:05:58 UTC | Fix planner failure with full join in RHS of left join. Given a left join containing a full join in its righthand side, with the left join's joinclause referencing only one side of the full join (in a non-strict fashion, so that the full join doesn't get simplified), the planner could fail with "failed to build any N-way joins" or related errors. This happened because the full join was seen as overlapping the left join's RHS, and then recent changes within join_is_legal() caused that function to conclude that the full join couldn't validly be formed. Rather than try to rejigger join_is_legal() yet more to allow this, I think it's better to fix initsplan.c so that the required join order is explicit in the SpecialJoinInfo data structure. The previous coding there essentially ignored full joins, relying on the fact that we don't flatten them in the joinlist data structure to preserve their ordering. That's sufficient to prevent a wrong plan from being formed, but as this example shows, it's not sufficient to ensure that the right plan will be formed. We need to work a bit harder to ensure that the right plan looks sane according to the SpecialJoinInfos. Per bug #14105 from Vojtech Rylko. This was apparently induced by commit 8703059c6 (though now that I've seen it, I wonder whether there are related cases that could have failed before that); so back-patch to all active branches. Unfortunately, that patch also went into 9.0, so this bug is a regression that won't be fixed in that branch. | 22 April 2016, 00:05:58 UTC |
9028f40 | Tom Lane | 21 April 2016, 20:58:47 UTC | Improve TranslateSocketError() to handle more Windows error codes. The coverage was rather lean for cases that bind() or listen() might return. Add entries for everything that there's a direct equivalent for in the set of Unix errnos that elog.c has heard of. | 21 April 2016, 20:59:17 UTC |
5b13ad9 | Tom Lane | 21 April 2016, 20:16:19 UTC | Remove dead code in win32.h. There's no longer a need for the MSVC-version-specific code stanza that forcibly redefines errno code symbols, because since commit 73838b52 we're unconditionally redefining them in the stanza before this one anyway. Now it's merely confusing and ugly, so get rid of it; and improve the comment that explains what's going on here. Although this is just cosmetic, back-patch anyway since I'm intending to back-patch some less-cosmetic changes in this same hunk of code. | 21 April 2016, 20:16:19 UTC |
b2bb59b | Tom Lane | 21 April 2016, 19:44:18 UTC | Provide errno-translation wrappers around bind() and listen() on Windows. Fix Windows builds to report something useful rather than "could not bind IPv4 socket: No error" when bind() fails. Back-patch of commits d1b7d4877b9a71f4 and 22989a8e34168f57. Discussion: <4065.1452450340@sss.pgh.pa.us> | 21 April 2016, 19:44:18 UTC |
663624e | Tom Lane | 21 April 2016, 18:20:18 UTC | Fix ruleutils.c's dumping of ScalarArrayOpExpr containing an EXPR_SUBLINK. When we shoehorned "x op ANY (array)" into the SQL syntax, we created a fundamental ambiguity as to the proper treatment of a sub-SELECT on the righthand side: perhaps what's meant is to compare x against each row of the sub-SELECT's result, or perhaps the sub-SELECT is meant as a scalar sub-SELECT that delivers a single array value whose members should be compared against x. The grammar resolves it as the former case whenever the RHS is a select_with_parens, making the latter case hard to reach --- but you can get at it, with tricks such as attaching a no-op cast to the sub-SELECT. Parse analysis would throw away the no-op cast, leaving a parsetree with an EXPR_SUBLINK SubLink directly under a ScalarArrayOpExpr. ruleutils.c was not clued in on this fine point, and would naively emit "x op ANY ((SELECT ...))", which would be parsed as the first alternative, typically leading to errors like "operator does not exist: text = text[]" during dump/reload of a view or rule containing such a construct. To fix, emit a no-op cast when dumping such a parsetree. This might well be exactly what the user wrote to get the construct accepted in the first place; and even if she got there with some other dodge, it is a valid representation of the parsetree. Per report from Karl Czajkowski. He mentioned only a case involving RLS policies, but actually the problem is very old, so back-patch to all supported branches. Report: <20160421001832.GB7976@moraine.isi.edu> | 21 April 2016, 18:20:18 UTC |
4c1c9f8 | Tom Lane | 21 April 2016, 03:48:13 UTC | Honor PGCTLTIMEOUT environment variable for pg_regress' startup wait. In commit 2ffa86962077c588 we made pg_ctl recognize an environment variable PGCTLTIMEOUT to set the default timeout for starting and stopping the postmaster. However, pg_regress uses pg_ctl only for the "stop" end of that; it has bespoke code for starting the postmaster, and that code has historically had a hard-wired 60-second timeout. Further buildfarm experience says it'd be a good idea if that timeout were also controlled by PGCTLTIMEOUT, so let's make it so. Like the previous patch, back-patch to all active branches. Discussion: <13969.1461191936@sss.pgh.pa.us> | 21 April 2016, 03:48:13 UTC |
f719cd9 | Peter Eisentraut | 16 April 2016, 00:44:10 UTC | doc: Add missing parentheses From: Alexander Law <exclusion@gmail.com> | 16 April 2016, 00:54:12 UTC |
ccf893c | Andres Freund | 15 April 2016, 01:54:06 UTC | Remove trailing commas in enums. These aren't valid C89. Found thanks to gcc's -Wc90-c99-compat. These exist in differing places in most supported branches. | 15 April 2016, 02:25:17 UTC |
3ef1f3a | Tom Lane | 13 April 2016, 22:57:52 UTC | Fix pg_dump so pg_upgrade'ing an extension with simple opfamilies works. As reported by Michael Feld, pg_upgrade'ing an installation having extensions with operator families that contain just a single operator class failed to reproduce the extension membership of those operator families. This caused no immediate ill effects, but would create problems when later trying to do a plain dump and restore, because the seemingly-not-part-of- the-extension operator families would appear separately in the pg_dump output, and then would conflict with the families created by loading the extension. This has been broken ever since extensions were introduced, and many of the standard contrib extensions are affected, so it's a bit astonishing nobody complained before. The cause of the problem is a perhaps-ill-considered decision to omit such operator families from pg_dump's output on the grounds that the CREATE OPERATOR CLASS commands could recreate them, and having explicit CREATE OPERATOR FAMILY commands would impede loading the dump script into pre-8.3 servers. Whatever the merits of that decision when 8.3 was being written, it looks like a poor tradeoff now. We can fix the pg_upgrade problem simply by removing that code, so that the operator families are dumped explicitly (and then will be properly made to be part of their extensions). Although this fixes the behavior of future pg_upgrade runs, it does nothing to clean up existing installations that may have improperly-linked operator families. Given the small number of complaints to date, maybe we don't need to worry about providing an automated solution for that; anyone who needs to clean it up can do so with manual "ALTER EXTENSION ADD OPERATOR FAMILY" commands, or even just ignore the duplicate-opfamily errors they get during a pg_restore. In any case we need this fix. Back-patch to all supported branches. Discussion: <20228.1460575691@sss.pgh.pa.us> | 13 April 2016, 22:57:52 UTC |
94cda4f | Teodor Sigaev | 08 April 2016, 18:26:25 UTC | Fix possible use of uninitialised value in ts_headline() Found during investigation of failure of skink buildfarm member and its valgrind report. Backpatch to all supported branches | 08 April 2016, 18:26:25 UTC |
d2189a8 | Andrew Dunstan | 08 April 2016, 16:25:10 UTC | Turn down MSVC compiler verbosity Most of what is produced by the detailed verbosity level is of no interest at all, so switch to the normal level for more usable output. Christian Ullrich Backpatch to all live branches | 08 April 2016, 16:33:29 UTC |
b1b6aa8 | Tom Lane | 04 April 2016, 15:13:17 UTC | Fix latent portability issue in pgwin32_dispatch_queued_signals(). The first iteration of the signal-checking loop would compute sigmask(0) which expands to 1<<(-1) which is undefined behavior according to the C standard. The lack of field reports of trouble suggest that it evaluates to 0 on all existing Windows compilers, but that's hardly something to rely on. Since signal 0 isn't a queueable signal anyway, we can just make the loop iterate from 1 instead, and save a few cycles as well as avoiding the undefined behavior. In passing, avoid evaluating the volatile expression UNBLOCKED_SIGNAL_QUEUE twice in a row; there's no reason to waste cycles like that. Noted by Aleksander Alekseev, though this isn't his proposed fix. Back-patch to all supported branches. | 04 April 2016, 15:13:43 UTC |
6cd3029 | Tom Lane | 29 March 2016, 15:54:58 UTC | Avoid possibly-unsafe use of Windows' FormatMessage() function. Whenever this function is used with the FORMAT_MESSAGE_FROM_SYSTEM flag, it's good practice to include FORMAT_MESSAGE_IGNORE_INSERTS as well. Otherwise, if the message contains any %n insertion markers, the function will try to fetch argument strings to substitute --- which we are not passing, possibly leading to a crash. This is exactly analogous to the rule about not giving printf() a format string you're not in control of. Noted and patched by Christian Ullrich. Back-patch to all supported branches. | 29 March 2016, 15:54:58 UTC |
158a0fb | Tom Lane | 28 March 2016, 20:16:20 UTC | Stamp 9.1.21. | 28 March 2016, 20:16:20 UTC |
83b228a | Peter Eisentraut | 28 March 2016, 06:52:41 UTC | Translation updates Source-Git-URL: git://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: dbf5cd90475f35d96a3df107a00e7fea082c6b89 | 28 March 2016, 06:52:41 UTC |
bb4b4d1 | Tom Lane | 27 March 2016, 23:26:26 UTC | Release notes for 9.5.2, 9.4.7, 9.3.12, 9.2.16, 9.1.21. | 27 March 2016, 23:26:26 UTC |
598e2c5 | Andres Freund | 27 March 2016, 15:47:46 UTC | Change various Gin*Is* macros to return 0/1. Returning the direct result of bit arithmetic, in a macro intended to be used in a boolean manner, can be problematic if the return value is stored in a variable of type 'bool'. If bool is implemented using C99's _Bool, that can lead to comparison failures if the variable is then compared again with the expression (see ginStepRight() for an example that fails), as _Bool forces the result to be 0/1. That happens in some configurations of newer MSVC compilers. It's also problematic when storing the result of such an expression in a narrower type. Several gin macros have been declared in that style since gin's initial commit in 8a3631f8d86. There's a lot more macros like this, but this is the only one causing regression test failures; and I don't want to commit and backpatch a larger patch with lots of conflicts just before the next set of minor releases. Discussion: 20150811154237.GD17575@awork2.anarazel.de Backpatch: All supported branches | 27 March 2016, 15:47:46 UTC |
528f112 | Tom Lane | 26 March 2016, 19:58:44 UTC | Modernize zic's test for valid timezone abbreviations. We really need to sync all of our IANA-derived timezone code with upstream, but that's going to be a large patch and I certainly don't care to shove such a thing into stable branches immediately before a release. As a stopgap, copy just the tzcode2016c logic that checks validity of timezone abbreviations. This prevents getting multiple "time zone abbreviation differs from POSIX standard" bleats with tzdata 2014b and later. | 26 March 2016, 19:59:37 UTC |
e5fd35c | Tom Lane | 25 March 2016, 23:03:08 UTC | Update time zone data files to tzdata release 2016c. DST law changes in Azerbaijan, Chile, Haiti, Palestine, and Russia (Altai, Astrakhan, Kirov, Sakhalin, Ulyanovsk regions). Historical corrections for Lithuania, Moldova, Russia (Kaliningrad, Samara, Volgograd). As of 2015b, the keepers of the IANA timezone database started to use numeric time zone abbreviations (e.g., "+04") instead of inventing abbreviations not found in the wild like "ASTT". This causes our rather old copy of zic to whine "warning: time zone abbreviation differs from POSIX standard" several times during "make install". This warning is harmless according to the IANA folk, and I don't see any problems with these abbreviations in some simple tests; but it seems like now would be a good time to update our copy of the tzcode stuff. I'll look into that soon. | 25 March 2016, 23:03:54 UTC |
2aa9fd9 | Andrew Dunstan | 19 March 2016, 22:59:41 UTC | Remove dependency on psed for MSVC builds. Modern Perl has removed psed from its core distribution, so it might not be readily available on some build platforms. We therefore replace its use with a Perl script generated by s2p, which is equivalent to the sed script. The latter is retained for non-MSVC builds to avoid creating a new hard dependency on Perl for non-Windows tarball builds. Backpatch to all live branches. Michael Paquier and me. | 19 March 2016, 22:59:41 UTC |
1965a8c | Tom Lane | 17 March 2016, 03:18:08 UTC | Fix "pg_bench -C -M prepared". This didn't work because when we dropped and re-established a database connection, we did not bother to reset session-specific state such as the statements-are-prepared flags. The st->prepared[] array certainly needs to be flushed, and I cleared a couple of other fields as well that couldn't possibly retain meaningful state for a new connection. In passing, fix some bogus comments and strange field order choices. Per report from Robins Tharakan. | 17 March 2016, 03:18:08 UTC |
0c94970 | Tom Lane | 15 March 2016, 17:19:58 UTC | Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>. Previously, we included <xlocale.h> only if necessary to get the definition of type locale_t. According to notes in PGAC_TYPE_LOCALE_T, this is important because on some versions of glibc that file supplies an incompatible declaration of locale_t. (This info may be obsolete, because on my RHEL6 box that seems to be the *only* definition of locale_t; but there may still be glibc's in the wild for which it's a live concern.) It turns out though that on FreeBSD and maybe other BSDen, you can get locale_t from stdlib.h or locale.h but mbstowcs_l() and friends only from <xlocale.h>. This was leaving us compiling calls to mbstowcs_l() and friends with no visible prototype, which causes a warning and could possibly cause actual trouble, since it's not declared to return int. Hence, adjust the configure checks so that we'll include <xlocale.h> either if it's necessary to get type locale_t or if it's necessary to get a declaration of mbstowcs_l(). Report and patch by Aleksander Alekseev, somewhat whacked around by me. Back-patch to all supported branches, since we have been using mbstowcs_l() since 9.1. | 15 March 2016, 17:19:58 UTC |
2d61d88 | Tom Lane | 14 March 2016, 15:31:22 UTC | Add missing NULL terminator to list_SECURITY_LABEL_preposition[]. On the machines I tried this on, pressing TAB after SECURITY LABEL led to being offered ON and FOR as intended, plus random other keywords (varying across machines). But if you were a bit more unlucky you'd get a crash, as reported by nummervet@mail.ru in bug #14019. Seems to have been an aboriginal error in the SECURITY LABEL patch, commit 4d355a8336e0f226. Hence, back-patch to all supported versions. There's no bug in HEAD, though, thanks to our recent tab-completion rewrite. | 14 March 2016, 15:31:49 UTC |
3e6385e | Magnus Hagander | 10 March 2016, 12:48:58 UTC | Avoid crash on old Windows with AVX2-capable CPU for VS2013 builds The Visual Studio 2013 CRT generates invalid code when it makes a 64-bit build that is later used on a CPU that supports AVX2 instructions using a version of Windows before 7SP1/2008R2SP1. Detect this combination, and in those cases turn off the generation of FMA3, per recommendation from the Visual Studio team. The bug is actually in the CRT shipping with Visual Studio 2013, but Microsoft have stated they're only fixing it in newer major versions. The fix is therefor conditioned specifically on being built with this version of Visual Studio, and not previous or later versions. Author: Christian Ullrich | 10 March 2016, 13:11:01 UTC |
a62714f | Andres Freund | 10 March 2016, 02:53:54 UTC | Avoid unlikely data-loss scenarios due to rename() without fsync. Renaming a file using rename(2) is not guaranteed to be durable in face of crashes. Use the previously added durable_rename()/durable_link_or_rename() in various places where we previously just renamed files. Most of the changed call sites are arguably not critical, but it seems better to err on the side of too much durability. The most prominent known case where the previously missing fsyncs could cause data loss is crashes at the end of a checkpoint. After the actual checkpoint has been performed, old WAL files are recycled. When they're filled, their contents are fdatasynced, but we did not fsync the containing directory. An OS/hardware crash in an unfortunate moment could then end up leaving that file with its old name, but new content; WAL replay would thus not replay it. Reported-By: Tomas Vondra Author: Michael Paquier, Tomas Vondra, Andres Freund Discussion: 56583BDD.9060302@2ndquadrant.com Backpatch: All supported branches | 10 March 2016, 02:53:54 UTC |
d0e47bc | Andres Freund | 10 March 2016, 02:53:54 UTC | Introduce durable_rename() and durable_link_or_rename(). Renaming a file using rename(2) is not guaranteed to be durable in face of crashes; especially on filesystems like xfs and ext4 when mounted with data=writeback. To be certain that a rename() atomically replaces the previous file contents in the face of crashes and different filesystems, one has to fsync the old filename, rename the file, fsync the new filename, fsync the containing directory. This sequence is not generally adhered to currently; which exposes us to data loss risks. To avoid having to repeat this arduous sequence, introduce durable_rename(), which wraps all that. Also add durable_link_or_rename(). Several places use link() (with a fallback to rename()) to rename a file, trying to avoid replacing the target file out of paranoia. Some of those rename sequences need to be durable as well. There seems little reason extend several copies of the same logic, so centralize the link() callers. This commit does not yet make use of the new functions; they're used in a followup commit. Author: Michael Paquier, Andres Freund Discussion: 56583BDD.9060302@2ndquadrant.com Backpatch: All supported branches | 10 March 2016, 02:53:54 UTC |
d485d95 | Tom Lane | 09 March 2016, 19:51:02 UTC | Fix incorrect handling of NULL index entries in indexed ROW() comparisons. An index search using a row comparison such as ROW(a, b) > ROW('x', 'y') would stop upon reaching a NULL entry in the "b" column, ignoring the fact that there might be non-NULL "b" values associated with later values of "a". This happens because _bt_mark_scankey_required() marks the subsidiary scankey for "b" as required, which is just wrong: it's for a column after the one with the first inequality key (namely "a"), and thus can't be considered a required match. This bit of brain fade dates back to the very beginnings of our support for indexed ROW() comparisons, in 2006. Kind of astonishing that no one came across it before Glen Takahashi, in bug #14010. Back-patch to all supported versions. Note: the given test case doesn't actually fail in unpatched 9.1, evidently because the fix for bug #6278 (i.e., stopping at nulls in either scan direction) is required to make it fail. I'm sure I could devise a case that fails in 9.1 as well, perhaps with something involving making a cursor back up; but it doesn't seem worth the trouble. | 09 March 2016, 19:51:02 UTC |
8145704 | Andres Freund | 08 March 2016, 22:59:29 UTC | ltree: Zero padding bytes when allocating memory for externally visible data. ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment, requiring some padding bytes. So far we left these uninitialized. Zero those by using palloc0. Author: Andres Freund Reported-By: Andres Freund / valgrind / buildarm animal skink Backpatch: 9.1- | 08 March 2016, 22:59:29 UTC |
c5f1fbb | Andres Freund | 08 March 2016, 21:33:24 UTC | plperl: Correctly handle empty arrays in plperl_ref_from_pg_array. plperl_ref_from_pg_array() didn't consider the case that postgrs arrays can have 0 dimensions (when they're empty) and accessed the first dimension without a check. Fix that by special casing the empty array case. Author: Alex Hunsaker Reported-By: Andres Freund / valgrind / buildfarm animal skink Discussion: 20160308063240.usnzg6bsbjrne667@alap3.anarazel.de Backpatch: 9.1- | 08 March 2016, 21:42:58 UTC |
5a39c73 | Tom Lane | 07 March 2016, 15:40:44 UTC | Fix backwards test for Windows service-ness in pg_ctl. A thinko in a96761391 caused pg_ctl to get it exactly backwards when deciding whether to report problems to the Windows eventlog or to stderr. Per bug #14001 from Manuel Mathar, who also identified the fix. Like the previous patch, back-patch to all supported branches. | 07 March 2016, 15:41:11 UTC |
fe747b7 | Tom Lane | 07 March 2016, 00:21:03 UTC | Fix not-terribly-safe coding in NIImportOOAffixes() and NIImportAffixes(). There were two places in spell.c that supposed that they could search for a location in a string produced by lowerstr() and then transpose the offset into the original string. But this fails completely if lowerstr() transforms any characters into characters of different byte length, as can happen in Turkish UTF8 for instance. We'd added some comments about this coding in commit 51e78ab4ff328296, but failed to realize that it was not merely confusing but wrong. Coverity complained about this code years ago, but in such an opaque fashion that nobody understood what it was on about. I'm not entirely sure that this issue *is* what it's on about, actually, but perhaps this patch will shut it up -- and in any case the problem is clear. Back-patch to all supported branches. | 07 March 2016, 00:21:03 UTC |
58c1af4 | Robert Haas | 04 March 2016, 17:11:30 UTC | Fix compile breakage due to 0315dfa8f4afa8390383119330ca0bf241be4ad4. I wasn't careful enough when back-patching. | 04 March 2016, 17:23:41 UTC |
b4895bf | Robert Haas | 04 March 2016, 16:53:20 UTC | Fix query-based tab completion for multibyte characters. The existing code confuses the byte length of the string (which is relevant when passing it to pg_strncasecmp) with the character length of the string (which is relevant when it is used with the SQL substring function). Separate those two concepts. Report and patch by Kyotaro Horiguchi, reviewed by Thomas Munro and reviewed and further revised by me. | 04 March 2016, 16:57:40 UTC |
f32b8bc | Tom Lane | 01 March 2016, 00:11:38 UTC | Improve error message for rejecting RETURNING clauses with dropped columns. This error message was written with only ON SELECT rules in mind, but since then we also made RETURNING-clause targetlists go through the same logic. This means that you got a rather off-topic error message if you tried to add a rule with RETURNING to a table having dropped columns. Ideally we'd just support that, but some preliminary investigation says that it might be a significant amount of work. Seeing that Nicklas Avén's complaint is the first one we've gotten about this in the ten years or so that the code's been like that, I'm unwilling to put much time into it. Instead, improve the error report by issuing a different message for RETURNING cases, and revise the associated comment based on this investigation. Discussion: 1456176604.17219.9.camel@jordogskog.no | 01 March 2016, 00:12:03 UTC |
0a3070b | Alvaro Herrera | 29 February 2016, 21:11:58 UTC | Fix typos Author: Amit Langote | 29 February 2016, 21:11:58 UTC |
397d247 | Alvaro Herrera | 29 February 2016, 20:53:55 UTC | doc: document MANPATH as /usr/local/pgsql/share/man The docs were advising to use /usr/local/pgsql/man instead, but that's wrong. Reported-By: Slawomir Sudnik Backpatch-To: 9.1 Bug: #13894 | 29 February 2016, 20:53:55 UTC |
7d6c58a | Tom Lane | 29 February 2016, 04:39:20 UTC | Avoid multiple free_struct_lconv() calls on same data. A failure partway through PGLC_localeconv() led to a situation where the next call would call free_struct_lconv() a second time, leading to free() on already-freed strings, typically leading to a core dump. Add a flag to remember whether we need to do that. Per report from Thom Brown. His example case only provokes the failure as far back as 9.4, but nonetheless this code is obviously broken, so back-patch to all supported branches. | 29 February 2016, 04:40:35 UTC |
5d312ef | Tatsuo Ishii | 21 February 2016, 00:04:59 UTC | Fix wording in the Tutorial document. With suggentions from Tom Lane. | 21 February 2016, 00:10:48 UTC |
ca32f12 | Simon Riggs | 19 February 2016, 08:35:02 UTC | Correct StartupSUBTRANS for page wraparound StartupSUBTRANS() incorrectly handled cases near the max pageid in the subtrans data structure, which in some cases could lead to errors in startup for Hot Standby. This patch wraps the pageids correctly, avoiding any such errors. Identified by exhaustive crash testing by Jeff Janes. Jeff Janes | 19 February 2016, 08:35:02 UTC |
0f359c7 | Tom Lane | 18 February 2016, 20:40:36 UTC | Fix multiple bugs in contrib/pgstattuple's pgstatindex() function. Dead or half-dead index leaf pages were incorrectly reported as live, as a consequence of a code rearrangement I made (during a moment of severe brain fade, evidently) in commit d287818eb514d431. The index metapage was not counted in index_size, causing that result to not agree with the actual index size on-disk. Index root pages were not counted in internal_pages, which is inconsistent compared to the case of a root that's also a leaf (one-page index), where the root would be counted in leaf_pages. Aside from that inconsistency, this could lead to additional transient discrepancies between the reported page counts and index_size, since it's possible for pgstatindex's scan to see zero or multiple pages marked as BTP_ROOT, if the root moves due to a split during the scan. With these fixes, index_size will always be exactly one page more than the sum of the displayed page counts. Also, the index_size result was incorrectly documented as being measured in pages; it's always been measured in bytes. (While fixing that, I couldn't resist doing some small additional wordsmithing on the pgstattuple docs.) Including the metapage causes the reported index_size to not be zero for an empty index. To preserve the desired property that the pgstattuple regression test results are platform-independent (ie, BLCKSZ configuration independent), scale the index_size result in the regression tests. The documentation issue was reported by Otsuka Kenji, and the inconsistent root page counting by Peter Geoghegan; the other problems noted by me. Back-patch to all supported branches, because this has been broken for a long time. | 18 February 2016, 20:40:36 UTC |
875973f | Tom Lane | 17 February 2016, 02:08:15 UTC | Make plpython cope with funny characters in function names. A function name that's double-quoted in SQL can contain almost any characters, but we were using that name directly as part of the name generated for the Python-level function, and Python doesn't like anything that isn't pretty much a standard identifier. To fix, replace anything that isn't an ASCII letter or digit with an underscore in the generated name. This doesn't create any risk of duplicate Python function names because we were already appending the function OID to the generated name to ensure uniqueness. Per bug #13960 from Jim Nasby. Patch by Jim Nasby, modified a bit by me. Back-patch to all supported branches. | 17 February 2016, 02:08:15 UTC |
56f5e77 | Tom Lane | 16 February 2016, 18:43:03 UTC | Improve documentation about CREATE INDEX CONCURRENTLY. Clarify the description of which transactions will block a CREATE INDEX CONCURRENTLY command from proceeding, and mention that the index might still not be usable after CREATE INDEX completes. (This happens if the index build detected broken HOT chains, so that pg_index.indcheckxmin gets set, and there are open old transactions preventing the xmin horizon from advancing past the index's initial creation. I didn't want to explain what broken HOT chains are, though, so I omitted an explanation of exactly when old transactions prevent the index from being used.) Per discussion with Chris Travers. Back-patch to all supported branches, since the same text appears in all of them. | 16 February 2016, 18:43:03 UTC |
38e617d | Tatsuo Ishii | 16 February 2016, 06:36:52 UTC | Improve wording in the planner doc Change "In this case" to "In the example above" to clarify what it actually refers to. | 16 February 2016, 06:43:15 UTC |
0b2aefe | Alvaro Herrera | 15 February 2016, 23:33:43 UTC | pgbench: avoid FD_ISSET on an invalid file descriptor The original code wasn't careful to test the file descriptor returned by PQsocket() for an invalid socket. If an invalid socket did turn up, that would amount to calling FD_ISSET with fd = -1, whereby undefined behavior can be invoked. To fix, test file descriptor for validity and stop further processing if that fails. Problem noticed by Coverity. There is an existing FD_ISSET callsite that does check for invalid sockets beforehand, but the error message reported by it was strerror(errno); in testing the aforementioned change, that turns out to result in "bad socket: Success" which isn't terribly helpful. Instead use PQerrorMessage() in both places which is more likely to contain an useful error message. Backpatch-through: 9.1. | 15 February 2016, 23:33:43 UTC |
1f52d23 | Tom Lane | 15 February 2016, 22:11:52 UTC | Suppress compiler warnings about useless comparison of unsigned to zero. Reportedly, some compilers warn about tests like "c < 0" if c is unsigned, and hence complain about the character range checks I added in commit 3bb3f42f3749d40b8d4de65871e8d828b18d4a45. This is a bit of a pain since the regex library doesn't really want to assume that chr is unsigned. However, since any such reconfiguration would involve manual edits of regcustom.h anyway, we can put it on the shoulders of whoever wants to do that to adjust this new range-checking macro correctly. Per gripes from Coverity and Andres. | 15 February 2016, 22:11:52 UTC |
f97664c | Noah Misch | 11 February 2016, 01:34:02 UTC | Accept pg_ctl timeout from the PGCTLTIMEOUT environment variable. Many automated test suites call pg_ctl. Buildfarm members axolotl, hornet, mandrill, shearwater, sungazer and tern have failed when server shutdown took longer than the pg_ctl default 60s timeout. This addition permits slow hosts to easily raise the timeout without us editing a --timeout argument into every test suite pg_ctl call. Back-patch to 9.1 (all supported versions) for the sake of automated testing. Reviewed by Tom Lane. | 11 February 2016, 01:34:48 UTC |
e56acbe | Tom Lane | 11 February 2016, 00:30:12 UTC | Avoid use of sscanf() to parse ispell dictionary files. It turns out that on FreeBSD-derived platforms (including OS X), the *scanf() family of functions is pretty much brain-dead about multibyte characters. In particular it will apply isspace() to individual bytes of input even when those bytes are part of a multibyte character, thus allowing false recognition of a field-terminating space. We appear to have little alternative other than instituting a coding rule that *scanf() is not to be used if the input string might contain multibyte characters. (There was some discussion of relying on "%ls", but that probably just moves the portability problem somewhere else, and besides it doesn't fully prevent BSD *scanf() from using isspace().) This patch is a down payment on that: it gets rid of use of sscanf() to parse ispell dictionary files, which are certainly at great risk of having a problem. The code is cleaner this way anyway, though a bit longer. In passing, improve a few comments. Report and patch by Artur Zakirov, reviewed and somewhat tweaked by me. Back-patch to all supported branches. | 11 February 2016, 00:30:12 UTC |
3dca6f3 | Tom Lane | 08 February 2016, 21:21:40 UTC | Stamp 9.1.20. | 08 February 2016, 21:21:40 UTC |
862b4a4 | Peter Eisentraut | 08 February 2016, 19:50:20 UTC | Translation updates Source-Git-URL: git://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: bbedbfae7586389e1f43b8116d76af3ac528c211 | 08 February 2016, 19:50:20 UTC |
730c89b | Tom Lane | 08 February 2016, 15:49:38 UTC | Last-minute updates for release notes. Security: CVE-2016-0773 | 08 February 2016, 15:49:38 UTC |
98d6b73 | Tom Lane | 08 February 2016, 15:25:40 UTC | Fix some regex issues with out-of-range characters and large char ranges. Previously, our regex code defined CHR_MAX as 0xfffffffe, which is a bad choice because it is outside the range of type "celt" (int32). Characters approaching that limit could lead to infinite loops in logic such as "for (c = a; c <= b; c++)" where c is of type celt but the range bounds are chr. Such loops will work safely only if CHR_MAX+1 is representable in celt, since c must advance to beyond b before the loop will exit. Fortunately, there seems no reason not to restrict CHR_MAX to 0x7ffffffe. It's highly unlikely that Unicode will ever assign codes that high, and none of our other backend encodings need characters beyond that either. In addition to modifying the macro, we have to explicitly enforce character range restrictions on the values of \u, \U, and \x escape sequences, else the limit is trivially bypassed. Also, the code for expanding case-independent character ranges in bracket expressions had a potential integer overflow in its calculation of the number of characters it could generate, which could lead to allocating too small a character vector and then overwriting memory. An attacker with the ability to supply arbitrary regex patterns could easily cause transient DOS via server crashes, and the possibility for privilege escalation has not been ruled out. Quite aside from the integer-overflow problem, the range expansion code was unnecessarily inefficient in that it always produced a result consisting of individual characters, abandoning the knowledge that we had a range to start with. If the input range is large, this requires excessive memory. Change it so that the original range is reported as-is, and then we add on any case-equivalent characters that are outside that range. With this approach, we can bound the number of individual characters allowed without sacrificing much. This patch allows at most 100000 individual characters, which I believe to be more than the number of case pairs existing in Unicode, so that the restriction will never be hit in practice. It's still possible for range() to take awhile given a large character code range, so also add statement-cancel detection to its loop. The downstream function dovec() also lacked cancel detection, and could take a long time given a large output from range(). Per fuzz testing by Greg Stark. Back-patch to all supported branches. Security: CVE-2016-0773 | 08 February 2016, 15:25:40 UTC |
f6c7bfb | Tom Lane | 07 February 2016, 21:02:44 UTC | Improve documentation about PRIMARY KEY constraints. Get rid of the false implication that PRIMARY KEY is exactly equivalent to UNIQUE + NOT NULL. That was more-or-less true at one time in our implementation, but the standard doesn't say that, and we've grown various features (many of them required by spec) that treat a pkey differently from less-formal constraints. Per recent discussion on pgsql-general. I failed to resist the temptation to do some other wordsmithing in the same area. | 07 February 2016, 21:02:44 UTC |
2d59325 | Tom Lane | 07 February 2016, 19:16:32 UTC | Release notes for 9.5.1, 9.4.6, 9.3.11, 9.2.15, 9.1.20. | 07 February 2016, 19:16:32 UTC |
b1f591c | Noah Misch | 06 February 2016, 01:22:51 UTC | Force certain "pljava" custom GUCs to be PGC_SUSET. Future PL/Java versions will close CVE-2016-0766 by making these GUCs PGC_SUSET. This PostgreSQL change independently mitigates that PL/Java vulnerability, helping sites that update PostgreSQL more frequently than PL/Java. Back-patch to 9.1 (all supported versions). | 06 February 2016, 01:23:19 UTC |
6887d72 | Tom Lane | 05 February 2016, 15:59:09 UTC | Update time zone data files to tzdata release 2016a. DST law changes in Cayman Islands, Metlakatla, Trans-Baikal Territory (Zabaykalsky Krai). Historical corrections for Pakistan. | 05 February 2016, 15:59:39 UTC |
9c70463 | Tom Lane | 04 February 2016, 05:26:10 UTC | In pg_dump, ensure that view triggers are processed after view rules. If a view is split into CREATE TABLE + CREATE RULE to break a circular dependency, then any triggers on the view must be dumped/reloaded after the CREATE RULE; else the backend may reject the CREATE TRIGGER because it's the wrong type of trigger for a plain table. This works all right in plain dump/restore because of pg_dump's sorting heuristic that places triggers after rules. However, when using parallel restore, the ordering must be enforced by a dependency --- and we didn't have one. Fixing this is a mere matter of adding an addObjectDependency() call, except that we need to be able to find all the triggers belonging to the view relation, and there was no easy way to do that. Add fields to pg_dump's TableInfo struct to remember where the associated TriggerInfo struct(s) are. Per bug report from Dennis Kögel. The failure can be exhibited at least as far back as 9.1, so back-patch to all supported branches. | 04 February 2016, 05:26:10 UTC |
4c8b07d | Robert Haas | 03 February 2016, 14:15:29 UTC | pgbench: Install guard against overflow when dividing by -1. Commit 64f5edca2401f6c2f23564da9dd52e92d08b3a20 fixed the same hazard on master; this is a backport, but the modulo operator does not exist in older releases. Michael Paquier | 03 February 2016, 14:25:34 UTC |
79782b4 | Michael Meskes | 01 February 2016, 12:10:40 UTC | Make sure ecpg header files do not have a comment lasting several lines, one of which is a preprocessor directive. This leads ecpg to incorrectly parse the comment as nested. | 01 February 2016, 12:19:43 UTC |
d9c76aa | Andrew Dunstan | 31 January 2016, 00:28:44 UTC | Fix error in documentated use of mingw-w64 compilers Error reported by Igal Sapir. | 31 January 2016, 00:32:19 UTC |
ed5f572 | Tom Lane | 29 January 2016, 09:28:03 UTC | Fix incorrect pattern-match processing in psql's \det command. listForeignTables' invocation of processSQLNamePattern did not match up with the other ones that handle potentially-schema-qualified names; it failed to make use of pg_table_is_visible() and also passed the name arguments in the wrong order. Bug seems to have been aboriginal in commit 0d692a0dc9f0e532. It accidentally sort of worked as long as you didn't inquire too closely into the behavior, although the silliness was later exposed by inconsistencies in the test queries added by 59efda3e50ca4de6 (which I probably should have questioned at the time, but didn't). Per bug #13899 from Reece Hart. Patch by Reece Hart and Tom Lane. Back-patch to all affected branches. | 29 January 2016, 09:28:03 UTC |
b043df0 | Tom Lane | 26 January 2016, 20:38:33 UTC | Fix startup so that log prefix %h works for the log_connections message. We entirely randomly chose to initialize port->remote_host just after printing the log_connections message, when we could perfectly well do it just before, allowing %h and %r to work for that message. Per gripe from Artem Tomyuk. | 26 January 2016, 20:38:33 UTC |
b1bc381 | Bruce Momjian | 20 January 2016, 04:30:28 UTC | Properly install dynloader.h on MSVC builds This will enable PL/Java to be cleanly compiled, as dynloader.h is a requirement. Report by Chapman Flack Patch by Michael Paquier Backpatch through 9.1 | 20 January 2016, 04:30:28 UTC |
161a767 | Robert Haas | 15 January 2016, 04:12:05 UTC | Fix spelling mistake. Same patch submitted independently by David Rowley and Peter Geoghegan. | 15 January 2016, 04:16:35 UTC |
b1c0f92 | Magnus Hagander | 14 January 2016, 12:06:03 UTC | Properly close token in sspi authentication We can never leak more than one token, but we shouldn't do that. We don't bother closing it in the error paths since the process will exit shortly anyway. Christian Ullrich | 14 January 2016, 12:08:10 UTC |
5108013 | Tom Lane | 13 January 2016, 23:55:27 UTC | Handle extension members when first setting object dump flags in pg_dump. pg_dump's original approach to handling extension member objects was to run around and clear (or set) their dump flags rather late in its data collection process. Unfortunately, quite a lot of code expects those flags to be valid before that; which was an entirely reasonable expectation before we added extensions. In particular, this explains Karsten Hilbert's recent report of pg_upgrade failing on a database in which an extension has been installed into the pg_catalog schema. Its objects are initially marked as not-to-be-dumped on the strength of their schema, and later we change them to must-dump because we're doing a binary upgrade of their extension; but we've already skipped essential tasks like making associated DO_SHELL_TYPE objects. To fix, collect extension membership data first, and incorporate it in the initial setting of the dump flags, so that those are once again correct from the get-go. This has the undesirable side effect of slightly lengthening the time taken before pg_dump acquires table locks, but testing suggests that the increase in that window is not very much. Along the way, get rid of ugly special-case logic for deciding whether to dump procedural languages, FDWs, and foreign servers; dump decisions for those are now correct up-front, too. In 9.3 and up, this also fixes erroneous logic about when to dump event triggers (basically, they were *always* dumped before). In 9.5 and up, transform objects had that problem too. Since this problem came in with extensions, back-patch to all supported versions. | 13 January 2016, 23:55:27 UTC |
405635a | Tom Lane | 09 January 2016, 21:58:33 UTC | Clean up some lack-of-STRICT issues in the core code, too. A scan for missed proisstrict markings in the core code turned up these functions: brin_summarize_new_values pg_stat_reset_single_table_counters pg_stat_reset_single_function_counters pg_create_logical_replication_slot pg_create_physical_replication_slot pg_drop_replication_slot The first three of these take OID, so a null argument will normally look like a zero to them, resulting in "ERROR: could not open relation with OID 0" for brin_summarize_new_values, and no action for the pg_stat_reset_XXX functions. The other three will dump core on a null argument, though this is mitigated by the fact that they won't do so until after checking that the caller is superuser or has rolreplication privilege. In addition, the pg_logical_slot_get/peek[_binary]_changes family was intentionally marked nonstrict, but failed to make nullness checks on all the arguments; so again a null-pointer-dereference crash is possible but only for superusers and rolreplication users. Add the missing ARGISNULL checks to the latter functions, and mark the former functions as strict in pg_proc. Make that change in the back branches too, even though we can't force initdb there, just so that installations initdb'd in future won't have the issue. Since none of these bugs rise to the level of security issues (and indeed the pg_stat_reset_XXX functions hardly misbehave at all), it seems sufficient to do this. In addition, fix some order-of-operations oddities in the slot_get_changes family, mostly cosmetic, but not the part that moves the function's last few operations into the PG_TRY block. As it stood, there was significant risk for an error to exit without clearing historical information from the system caches. The slot_get_changes bugs go back to 9.4 where that code was introduced. Back-patch appropriate subsets of the pg_proc changes into all active branches, as well. | 09 January 2016, 21:58:33 UTC |
fe25785 | Tom Lane | 09 January 2016, 18:44:27 UTC | Clean up code for widget_in() and widget_out(). Given syntactically wrong input, widget_in() could call atof() with an indeterminate pointer argument, typically leading to a crash; or if it didn't do that, it might return a NULL pointer, which again would lead to a crash since old-style C functions aren't supposed to do things that way. Fix that by correcting the off-by-one syntax test and throwing a proper error rather than just returning NULL. Also, since widget_in and widget_out have been marked STRICT for a long time, their tests for null inputs are just dead code; remove 'em. In the oldest branches, also improve widget_out to use snprintf not sprintf, just to be sure. In passing, get rid of a long-since-useless sprintf into a local buffer that nothing further is done with, and make some other minor coding style cleanups. In the intended regression-testing usage of these functions, none of this is very significant; but if the regression test database were left around in a production installation, these bugs could amount to a minor security hazard. Piotr Stefaniak, Michael Paquier, and Tom Lane | 09 January 2016, 18:44:27 UTC |
e8808f3 | Tom Lane | 09 January 2016, 18:02:54 UTC | Add STRICT to some C functions created by the regression tests. These functions readily crash when passed a NULL input value. The tests themselves do not pass NULL values to them; but when the regression database is used as a basis for fuzz testing, they cause a lot of noise. Also, if someone were to leave a regression database lying about in a production installation, these would create a minor security hazard. Andreas Seltenreich | 09 January 2016, 18:03:27 UTC |
b05a347 | Tom Lane | 07 January 2016, 23:20:58 UTC | Fix unobvious interaction between -X switch and subdirectory creation. Turns out the only reason initdb -X worked is that pg_mkdir_p won't whine if you point it at something that's a symlink to a directory. Otherwise, the attempt to create pg_xlog/ just like all the other subdirectories would have failed. Let's be a little more explicit about what's happening. Oversight in my patch for bug #13853 (mea culpa for not testing -X ...) | 07 January 2016, 23:20:58 UTC |
099541e | Tom Lane | 07 January 2016, 20:22:01 UTC | Use plain mkdir() not pg_mkdir_p() to create subdirectories of PGDATA. When we're creating subdirectories of PGDATA during initdb, we know darn well that the parent directory exists (or should exist) and that the new subdirectory doesn't (or shouldn't). There is therefore no need to use anything more complicated than mkdir(). Using pg_mkdir_p() just opens us up to unexpected failure modes, such as the one exhibited in bug #13853 from Nuri Boardman. It's not very clear why pg_mkdir_p() went wrong there, but it is clear that we didn't need to be trying to create parent directories in the first place. We're not even saving any code, as proven by the fact that this patch nets out at minus five lines. Since this is a response to a field bug report, back-patch to all branches. | 07 January 2016, 20:22:01 UTC |
b96f6f4 | Alvaro Herrera | 07 January 2016, 14:59:08 UTC | Windows: Make pg_ctl reliably detect service status pg_ctl is using isatty() to verify whether the process is running in a terminal, and if not it sends its output to Windows' Event Log ... which does the wrong thing when the output has been redirected to a pipe, as reported in bug #13592. To fix, make pg_ctl use the code we already have to detect service-ness: in the master branch, move src/backend/port/win32/security.c to src/port (with suitable tweaks so that it runs properly in backend and frontend environments); pg_ctl already has access to pgport so it Just Works. In older branches, that's likely to cause trouble, so instead duplicate the required code in pg_ctl.c. Author: Michael Paquier Bug report and diagnosis: Egon Kocjan Backpatch: all supported branches | 07 January 2016, 14:59:08 UTC |
d05103b | Tom Lane | 04 January 2016, 22:41:33 UTC | Fix treatment of *lpNumberOfBytesRecvd == 0: that's a completion condition. pgwin32_recv() has treated a non-error return of zero bytes from WSARecv() as being a reason to block ever since the current implementation was introduced in commit a4c40f140d23cefb. However, so far as one can tell from Microsoft's documentation, that is just wrong: what it means is graceful connection closure (in stream protocols) or receipt of a zero-length message (in message protocols), and neither case should result in blocking here. The only reason the code worked at all was that control then fell into the retry loop, which did *not* treat zero bytes specially, so we'd get out after only wasting some cycles. But as of 9.5 we do not normally reach the retry loop and so the bug is exposed, as reported by Shay Rojansky and diagnosed by Andres Freund. Remove the unnecessary test on the byte count, and rearrange the code in the retry loop so that it looks identical to the initial sequence. Back-patch of commit 90e61df8130dc7051a108ada1219fb0680cb3eb6. The original plan was to apply this only to 9.5 and up, but after discussion and buildfarm testing, it seems better to back-patch. The noblock code path has been at risk of this problem since it was introduced (in 9.0); if it did happen in pre-9.5 branches, the symptom would be that a walsender would wait indefinitely rather than noticing a loss of connection. While we lack proof that the case has been seen in the field, it seems possible that it's happened without being reported. | 04 January 2016, 22:41:33 UTC |
e4959fb | Tom Lane | 03 January 2016, 00:04:45 UTC | Teach pg_dump to quote reloption values safely. Commit c7e27becd2e6eb93 fixed this on the backend side, but we neglected the fact that several code paths in pg_dump were printing reloptions values that had not gotten massaged by ruleutils. Apply essentially the same quoting logic in those places, too. | 03 January 2016, 00:04:45 UTC |
aa078a9 | Tom Lane | 02 January 2016, 20:29:03 UTC | Adjust back-branch release note description of commits a2a718b22 et al. As pointed out by Michael Paquier, recovery_min_apply_delay didn't exist in 9.0-9.3, making the release note text not very useful. Instead make it talk about recovery_target_xid, which did exist then. 9.0 is already out of support, but we can fix the text in the newer branches' copies of its release notes. | 02 January 2016, 20:29:03 UTC |
2da136d | Bruce Momjian | 02 January 2016, 18:33:39 UTC | Update copyright for 2016 Backpatch certain files through 9.1 | 02 January 2016, 18:33:39 UTC |
85dbc46 | Tom Lane | 01 January 2016, 20:27:53 UTC | Teach flatten_reloptions() to quote option values safely. flatten_reloptions() supposed that it didn't really need to do anything beyond inserting commas between reloption array elements. However, in principle the value of a reloption could be nearly anything, since the grammar allows a quoted string there. Any restrictions on it would come from validity checking appropriate to the particular option, if any. A reloption value that isn't a simple identifier or number could thus lead to dump/reload failures due to syntax errors in CREATE statements issued by pg_dump. We've gotten away with not worrying about this so far with the core-supported reloptions, but extensions might allow reloption values that cause trouble, as in bug #13840 from Kouhei Sutou. To fix, split the reloption array elements explicitly, and then convert any value that doesn't look like a safe identifier to a string literal. (The details of the quoting rule could be debated, but this way is safe and requires little code.) While we're at it, also quote reloption names if they're not safe identifiers; that may not be a likely problem in the field, but we might as well try to be bulletproof here. It's been like this for a long time, so back-patch to all supported branches. Kouhei Sutou, adjusted some by me | 01 January 2016, 20:27:53 UTC |
60f8cc9 | Tom Lane | 01 January 2016, 18:42:21 UTC | Add some more defenses against silly estimates to gincostestimate(). A report from Andy Colson showed that gincostestimate() was not being nearly paranoid enough about whether to believe the statistics it finds in the index metapage. The problem is that the metapage stats (other than the pending-pages count) are only updated by VACUUM, and in the worst case could still reflect the index's original empty state even when it has grown to many entries. We attempted to deal with that by scaling up the stats to match the current index size, but if nEntries is zero then scaling it up still gives zero. Moreover, the proportion of pages that are entry pages vs. data pages vs. pending pages is unlikely to be estimated very well by scaling if the index is now orders of magnitude larger than before. We can improve matters by expanding the use of the rule-of-thumb estimates I introduced in commit 7fb008c5ee59b040: if the index has grown by more than a cutoff amount (here set at 4X growth) since VACUUM, then use the rule-of-thumb numbers instead of scaling. This might not be exactly right but it seems much less likely to produce insane estimates. I also improved both the scaling estimate and the rule-of-thumb estimate to account for numPendingPages, since it's reasonable to expect that that is accurate in any case, and certainly pages that are in the pending list are not either entry or data pages. As a somewhat separate issue, adjust the estimation equations that are concerned with extra fetches for partial-match searches. These equations suppose that a fraction partialEntries / numEntries of the entry and data pages will be visited as a consequence of a partial-match search. Now, it's physically impossible for that fraction to exceed one, but our estimate of partialEntries is mostly bunk, and our estimate of numEntries isn't exactly gospel either, so we could arrive at a silly value. In the example presented by Andy we were coming out with a value of 100, leading to insane cost estimates. Clamp the fraction to one to avoid that. Like the previous patch, back-patch to all supported branches; this problem can be demonstrated in one form or another in all of them. | 01 January 2016, 18:42:48 UTC |
4388895 | Tom Lane | 28 December 2015, 17:09:00 UTC | Document the exponentiation operator as associating left to right. Common mathematical convention is that exponentiation associates right to left. We aren't going to change the parser for this, but we could note it in the operator's description. (It's already noted in the operator precedence/associativity table, but users might not look there.) Per bug #13829 from Henrik Pauli. | 28 December 2015, 17:09:40 UTC |
1b6102e | Alvaro Herrera | 27 December 2015, 16:03:19 UTC | Add forgotten CHECK_FOR_INTERRUPT calls in pgcrypto's crypt() Both Blowfish and DES implementations of crypt() can take arbitrarily long time, depending on the number of rounds specified by the caller; make sure they can be interrupted. Author: Andreas Karlsson Reviewer: Jeff Janes Backpatch to 9.1. | 27 December 2015, 16:03:19 UTC |
7e29e7f | Alvaro Herrera | 21 December 2015, 22:49:15 UTC | Rework internals of changing a type's ownership This is necessary so that REASSIGN OWNED does the right thing with composite types, to wit, that it also alters ownership of the type's pg_class entry -- previously, the pg_class entry remained owned by the original user, which caused later other failures such as the new owner's inability to use ALTER TYPE to rename an attribute of the affected composite. Also, if the original owner is later dropped, the pg_class entry becomes owned by a non-existant user which is bogus. To fix, create a new routine AlterTypeOwner_oid which knows whether to pass the request to ATExecChangeOwner or deal with it directly, and use that in shdepReassignOwner rather than calling AlterTypeOwnerInternal directly. AlterTypeOwnerInternal is now simpler in that it only modifies the pg_type entry and recurses to handle a possible array type; higher-level tasks are handled by either AlterTypeOwner directly or AlterTypeOwner_oid. I took the opportunity to add a few more objects to the test rig for REASSIGN OWNED, so that more cases are exercised. Additional ones could be added for superuser-only-ownable objects (such as FDWs and event triggers) but I didn't want to push my luck by adding a new superuser to the tests on a backpatchable bug fix. Per bug #13666 reported by Chris Pacejo. This is a backpatch of commit 756e7b4c9db1 to branches 9.1 -- 9.4. | 21 December 2015, 22:49:15 UTC |
ab14c13 | Alvaro Herrera | 21 December 2015, 22:16:15 UTC | adjust ACL owners for REASSIGN and ALTER OWNER TO When REASSIGN and ALTER OWNER TO are used, both the object owner and ACL list should be changed from the old owner to the new owner. This patch fixes types, foreign data wrappers, and foreign servers to change their ACL list properly; they already changed owners properly. Report by Alexey Bashtanov This is a backpatch of commit 59367fdf97c (for bug #9923) by Bruce Momjian to branches 9.1 - 9.4; it wasn't backpatched originally out of concerns that it would create a backwards compatibility problem, but per discussion related to bug #13666 that turns out to have been misguided. (Therefore, the entry in the 9.5 release notes should be removed.) Note that 9.1 didn't have privileges on types (which were introduced by commit 729205571e81), so this commit only changes foreign-data related objects in that branch. Discussion: http://www.postgresql.org/message-id/20151216224004.GL2618@alvherre.pgsql http://www.postgresql.org/message-id/10227.1450373793@sss.pgh.pa.us | 21 December 2015, 22:16:15 UTC |
6270ec1 | Tom Lane | 20 December 2015, 23:29:52 UTC | Remove silly completion for "DELETE FROM tabname ...". psql offered USING, WHERE, and SET in this context, but SET is not a valid possibility here. Seems to have been a thinko in commit f5ab0a14ea83eb6c which added DELETE's USING option. | 20 December 2015, 23:29:52 UTC |
db462a4 | Tom Lane | 17 December 2015, 21:55:23 UTC | Fix improper initialization order for readline. Turns out we must set rl_basic_word_break_characters *before* we call rl_initialize() the first time, because it will quietly copy that value elsewhere --- but only on the first call. (Love these undocumented dependencies.) I broke this yesterday in commit 2ec477dc8108339d; like that commit, back-patch to all active branches. Per report from Pavel Stehule. | 17 December 2015, 21:55:51 UTC |
03b138e | Tom Lane | 16 December 2015, 21:58:56 UTC | Cope with Readline's failure to track SIGWINCH events outside of input. It emerges that libreadline doesn't notice terminal window size change events unless they occur while collecting input. This is easy to stumble over if you resize the window while using a pager to look at query output, but it can be demonstrated without any pager involvement. The symptom is that queries exceeding one line are misdisplayed during subsequent input cycles, because libreadline has the wrong idea of the screen dimensions. The safest, simplest way to fix this is to call rl_reset_screen_size() just before calling readline(). That causes an extra ioctl(TIOCGWINSZ) for every command; but since it only happens when reading from a tty, the performance impact should be negligible. A more valid objection is that this still leaves a tiny window during entry to readline() wherein delivery of SIGWINCH will be missed; but the practical consequences of that are probably negligible. In any case, there doesn't seem to be any good way to avoid the race, since readline exposes no functions that seem safe to call from a generic signal handler --- rl_reset_screen_size() certainly isn't. It turns out that we also need an explicit rl_initialize() call, else rl_reset_screen_size() dumps core when called before the first readline() call. rl_reset_screen_size() is not present in old versions of libreadline, so we need a configure test for that. (rl_initialize() is present at least back to readline 4.0, so we won't bother with a test for it.) We would need a configure test anyway since libedit's emulation of libreadline doesn't currently include such a function. Fortunately, libedit seems not to have any corresponding bug. Merlin Moncure, adjusted a bit by me | 16 December 2015, 21:58:56 UTC |
c54bc78 | Alvaro Herrera | 14 December 2015, 19:44:40 UTC | Add missing CHECK_FOR_INTERRUPTS in lseg_inside_poly Apparently, there are bugs in this code that cause it to loop endlessly. That bug still needs more research, but in the meantime it's clear that the loop is missing a check for interrupts so that it can be cancelled timely. Backpatch to 9.1 -- this has been missing since 49475aab8d0d. | 14 December 2015, 19:44:40 UTC |
4b58ded | Heikki Linnakangas | 14 December 2015, 16:19:10 UTC | Fix out-of-memory error handling in ParameterDescription message processing. If libpq ran out of memory while constructing the result set, it would hang, waiting for more data from the server, which might never arrive. To fix, distinguish between out-of-memory error and not-enough-data cases, and give a proper error message back to the client on OOM. There are still similar issues in handling COPY start messages, but let's handle that as a separate patch. Michael Paquier, Amit Kapila and me. Backpatch to all supported versions. | 14 December 2015, 16:48:49 UTC |
476c54b | Andres Freund | 14 December 2015, 10:24:53 UTC | Correct statement to actually be the intended assert statement. e3f4cfc7 introduced a LWLockHeldByMe() call, without the corresponding Assert() surrounding it. Spotted by Coverity. Backpatch: 9.1+, like the previous commit | 14 December 2015, 10:24:53 UTC |
20f85bc | Tom Lane | 14 December 2015, 04:42:54 UTC | Docs: document that psql's "\i -" means read from stdin. This has worked that way for a long time, maybe always, but you would not have known it from the documentation. Also back-patch the notes I added to HEAD earlier today about behavior of the "-f -" switch, which likewise have been valid for many releases. | 14 December 2015, 04:42:54 UTC |